Skip to content

Commit c223f32

Browse files
BhavanaPidapabhavanapidapatimtebeekcjobinabo
authored
Recipe RemovedPolicy (#495)
* Java11 Recipe RemovedPolicy * Update src/main/resources/META-INF/rewrite/java-version-11.yml Co-authored-by: Tim te Beek <[email protected]> --------- Co-authored-by: bhavanapidapa <[email protected]> Co-authored-by: Tim te Beek <[email protected]> Co-authored-by: Chuka Obinabo <[email protected]> Co-authored-by: Tim te Beek <[email protected]>
1 parent 422f83c commit c223f32

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/main/resources/META-INF/rewrite/java-version-11.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2022 the original author or authors.
2+
# Copyright 2024 the original author or authors.
33
# <p>
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -66,6 +66,7 @@ recipeList:
6666
- org.openrewrite.java.migrate.InternalBindContextFactory
6767
- org.openrewrite.java.migrate.RemovedSecurityManagerMethods
6868
- org.openrewrite.java.migrate.UpgradePluginsForJava11
69+
- org.openrewrite.java.migrate.RemovedPolicy
6970

7071
---
7172
type: specs.openrewrite.org/v1beta/recipe
@@ -236,3 +237,15 @@ recipeList:
236237
oldFullyQualifiedTypeName: com.sun.xml.internal.bind.v2.ContextFactory
237238
newFullyQualifiedTypeName: com.sun.xml.bind.v2.ContextFactory
238239
ignoreDefinition: true
240+
---
241+
type: specs.openrewrite.org/v1beta/recipe
242+
name: org.openrewrite.java.migrate.RemovedPolicy
243+
displayName: Replace `javax.security.auth.Policy` with `java.security.Policy`
244+
description: The `javax.security.auth.Policy` class is not available from Java SE 11 onwards.
245+
tags:
246+
- java11
247+
recipeList:
248+
- org.openrewrite.java.ChangeType:
249+
oldFullyQualifiedTypeName: javax.security.auth.Policy
250+
newFullyQualifiedTypeName: java.security.Policy
251+
ignoreDefinition: true

0 commit comments

Comments
 (0)