-
Notifications
You must be signed in to change notification settings - Fork 124
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: openrewrite/rewrite-migrate-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.4.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: openrewrite/rewrite-migrate-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.5.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 12 commits
- 11 files changed
- 5 contributors
Commits on Mar 12, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 356022d - Browse repository at this point
Copy the full SHA 356022dView commit details
Commits on Mar 19, 2025
-
Configuration menu - View commit details
-
Copy full SHA for de14da1 - Browse repository at this point
Copy the full SHA de14da1View commit details -
Fix #682: EE10 migration Jersey to 3.1.x (#684)
* Fix #682: EE10 migration Jersey to 3.1.x * Fix punctuation in Jakarta EE 10 YAML --------- Co-authored-by: Tim te Beek <tim@moderne.io>
Configuration menu - View commit details
-
Copy full SHA for 06893d0 - Browse repository at this point
Copy the full SHA 06893d0View commit details
Commits on Mar 20, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 01735a6 - Browse repository at this point
Copy the full SHA 01735a6View commit details
Commits on Mar 21, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 6ead191 - Browse repository at this point
Copy the full SHA 6ead191View commit details -
Fix #688: Update @ActivationConfigPropery/@JMSDestination (#691)
* Fix #688: Update @ActivationConfigPropery/@JMSDestination * Update src/main/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigProperty.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/main/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinations.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigPropertyTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigPropertyTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinationsTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/test/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinationsTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Merge recipes into one, and assert they work in composite diff --git c/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigProperty.java i/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigProperty.java deleted file mode 100644 index b3d0875..00000000 --- c/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigProperty.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2024 the original author or authors. - * <p> - * Licensed under the Moderne Source Available License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * <p> - * https://docs.moderne.io/licensing/moderne-source-available-license - * <p> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.openrewrite.java.migrate.jakarta; - -import org.openrewrite.ExecutionContext; -import org.openrewrite.Preconditions; -import org.openrewrite.Recipe; -import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.ListUtils; -import org.openrewrite.java.AnnotationMatcher; -import org.openrewrite.java.JavaIsoVisitor; -import org.openrewrite.java.search.UsesType; -import org.openrewrite.java.tree.J; -import org.openrewrite.java.tree.JavaType; - -public class UpdateActivationConfigProperty extends Recipe { - - @OverRide - public String getDisplayName() { - return "Migrate @ActivationConfigProperty annotations"; - } - - @OverRide - public String getDescription() { - return "Migrate `@ActivationConfigProperty` annotations in Java files to `jakarta` equivalents."; - } - - private static final AnnotationMatcher EJB_MATCHER = new AnnotationMatcher("@javax.ejb..*"); - - @OverRide - public TreeVisitor<?, ExecutionContext> getVisitor() { - return Preconditions.check(new UsesType<>("javax.ejb..*", true), - new JavaIsoVisitor<ExecutionContext>() { - @OverRide - public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ctx) { - J.Annotation a = super.visitAnnotation(annotation, ctx); - if (!EJB_MATCHER.matches(a)) { - return a; - } - return a.withArguments(ListUtils.map(a.getArguments(), arg -> { - if (arg instanceof J.Assignment) { - J.Assignment as = (J.Assignment) arg; - if (as.getAssignment() instanceof J.Literal) { - return as.withAssignment(maybeReplaceLiteralValue((J.Literal) as.getAssignment())); - } - } else if (arg instanceof J.Literal) { - return maybeReplaceLiteralValue((J.Literal) arg); - } - return arg; - })); - } - - private J.Literal maybeReplaceLiteralValue(J.Literal arg) { - if (arg.getType() == JavaType.Primitive.String) { - String oldValue = (String) arg.getValue(); - if (oldValue.contains("javax.")) { - String newValue = oldValue.replace("javax.", "jakarta."); - return arg.withValue(newValue).withValueSource('"' + newValue + '"'); - } - } - return arg; - } - } - ); - } -} diff --git c/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java i/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java new file mode 100644 index 00000000..fa4d263 --- /dev/null +++ i/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakarta.java @@ -0,0 +1,77 @@ +/* + * Copyright 2025 the original author or authors. + * <p> + * Licensed under the Moderne Source Available License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * <p> + * https://docs.moderne.io/licensing/moderne-source-available-license + * <p> + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.openrewrite.java.migrate.jakarta; + +import lombok.EqualsAndHashCode; +import lombok.Value; +import org.openrewrite.ExecutionContext; +import org.openrewrite.Option; +import org.openrewrite.Recipe; +import org.openrewrite.TreeVisitor; +import org.openrewrite.internal.ListUtils; +import org.openrewrite.java.trait.Traits; +import org.openrewrite.java.tree.J; +import org.openrewrite.java.tree.JavaType; + +@value +@EqualsAndHashCode(callSuper = false) +public class UpdateAnnotationAttributeJavaxToJakarta extends Recipe { + + @OverRide + public String getDisplayName() { + return "Update annotation attributes using `javax` to `jakarta`"; + } + + @OverRide + public String getDescription() { + return "Replace `javax` with `jakarta` in annotation attributes for matching annotation signatures."; + } + + @option( + displayName = "Annotation signature", + description = "An annotation signature to match.", + example = "@javax.jms..*", + required = false + ) + String signature; + + @OverRide + public TreeVisitor<?, ExecutionContext> getVisitor() { + return Traits.annotated(signature).asVisitor(ann -> ann.getTree() + .withArguments(ListUtils.map(ann.getTree().getArguments(), arg -> { + if (arg instanceof J.Assignment) { + J.Assignment as = (J.Assignment) arg; + if (as.getAssignment() instanceof J.Literal) { + return as.withAssignment(maybeReplaceLiteralValue((J.Literal) as.getAssignment())); + } + } else if (arg instanceof J.Literal) { + return maybeReplaceLiteralValue((J.Literal) arg); + } + return arg; + }))); + } + + private J.Literal maybeReplaceLiteralValue(J.Literal arg) { + if (arg.getType() == JavaType.Primitive.String && arg.getValue() instanceof String) { + String oldValue = (String) arg.getValue(); + if (oldValue.contains("javax.")) { + String newValue = oldValue.replace("javax.", "jakarta."); + return arg.withValue(newValue).withValueSource('"' + newValue + '"'); + } + } + return arg; + } +} diff --git c/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinations.java i/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinations.java deleted file mode 100644 index cb13706..00000000 --- c/src/main/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinations.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2024 the original author or authors. - * <p> - * Licensed under the Moderne Source Available License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * <p> - * https://docs.moderne.io/licensing/moderne-source-available-license - * <p> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.openrewrite.java.migrate.jakarta; - -import org.openrewrite.ExecutionContext; -import org.openrewrite.Preconditions; -import org.openrewrite.Recipe; -import org.openrewrite.TreeVisitor; -import org.openrewrite.internal.ListUtils; -import org.openrewrite.java.AnnotationMatcher; -import org.openrewrite.java.JavaIsoVisitor; -import org.openrewrite.java.search.UsesType; -import org.openrewrite.java.tree.J; -import org.openrewrite.java.tree.JavaType; - -public class UpdateJmsDestinations extends Recipe { - - @OverRide - public String getDisplayName() { - return "Migrate JMS destinations"; - } - - @OverRide - public String getDescription() { - return "Migrate `@JMSDestinationDefinition` annotations in Java files to `jakarta` equivalents."; - } - - private static final AnnotationMatcher JMS_MATCHER = new AnnotationMatcher("@javax.jms..*"); - - @OverRide - public TreeVisitor<?, ExecutionContext> getVisitor() { - return Preconditions.check(new UsesType<>("javax.jms..*", true), - new JavaIsoVisitor<ExecutionContext>() { - @OverRide - public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ctx) { - J.Annotation a = super.visitAnnotation(annotation, ctx); - if (!JMS_MATCHER.matches(a)) { - return a; - } - return a.withArguments(ListUtils.map(a.getArguments(), arg -> { - if (arg instanceof J.Assignment) { - J.Assignment as = (J.Assignment) arg; - if (as.getAssignment() instanceof J.Literal) { - return as.withAssignment(maybeReplaceLiteralValue((J.Literal) as.getAssignment())); - } - } else if (arg instanceof J.Literal) { - return maybeReplaceLiteralValue((J.Literal) arg); - } - return arg; - })); - } - - private J.Literal maybeReplaceLiteralValue(J.Literal arg) { - if (arg.getType() == JavaType.Primitive.String) { - String oldValue = (String) arg.getValue(); - if (oldValue.contains("javax.")) { - String newValue = oldValue.replace("javax.", "jakarta."); - return arg.withValue(newValue).withValueSource('"' + newValue + '"'); - } - } - return arg; - } - } - ); - } -} diff --git c/src/main/resources/META-INF/rewrite/jakarta-ee-10.yml i/src/main/resources/META-INF/rewrite/jakarta-ee-10.yml index fa02383..60f5b82 100644 --- c/src/main/resources/META-INF/rewrite/jakarta-ee-10.yml +++ i/src/main/resources/META-INF/rewrite/jakarta-ee-10.yml @@ -33,8 +33,10 @@ recipeList: - org.openrewrite.java.migrate.jakarta.DeprecatedCDIAPIsRemoved40 - org.openrewrite.java.migrate.BeanDiscovery - org.openrewrite.java.migrate.jakarta.BeanValidationMessages - - org.openrewrite.java.migrate.jakarta.UpdateJmsDestinations - - org.openrewrite.java.migrate.jakarta.UpdateActivationConfigProperty + - org.openrewrite.java.migrate.jakarta.UpdateAnnotationAttributeJavaxToJakarta: + signature: "@jakarta.ejb..*" + - org.openrewrite.java.migrate.jakarta.UpdateAnnotationAttributeJavaxToJakarta: + signature: "@jakarta.jms..*" - org.openrewrite.java.migrate.jakarta.JavaxBeansXmlToJakartaBeansXml - org.openrewrite.java.migrate.jakarta.JavaxEjbJarXmlToJakartaEjbJarXml - org.openrewrite.java.migrate.jakarta.JavaxBeanValidationXmlToJakartaBeanValidationXml @@ -463,4 +465,4 @@ recipeList: groupId: org.eclipse.persistence artifactId: "*" newVersion: 4.x ---- \ No newline at end of file +--- diff --git c/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigPropertyTest.java i/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigPropertyTest.java deleted file mode 100644 index 1672c8e..00000000 --- c/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateActivationConfigPropertyTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2024 the original author or authors. - * <p> - * Licensed under the Moderne Source Available License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * <p> - * https://docs.moderne.io/licensing/moderne-source-available-license - * <p> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.openrewrite.java.migrate.jakarta; - -import org.junit.jupiter.api.Test; -import org.openrewrite.DocumentExample; -import org.openrewrite.Issue; -import org.openrewrite.java.JavaParser; -import org.openrewrite.test.RecipeSpec; -import org.openrewrite.test.RewriteTest; - -import static org.openrewrite.java.Assertions.java; - -class UpdateActivationConfigPropertyTest implements RewriteTest { - - @OverRide - public void defaults(RecipeSpec spec) { - spec.recipe(new UpdateActivationConfigProperty()) - .parser(JavaParser.fromJavaVersion() - //language=java - .dependsOn( - """ - package javax.ejb; - - import java.lang.annotation.ElementType; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - import java.lang.annotation.Target; - - /** - * Specifies a name/value pair for a configuration property that is passed to - * the endpoint deployment. - * - * @SInCE EJB 3.0 - */ - @target({ ElementType.METHOD, ElementType.TYPE }) - @retention(RetentionPolicy.RUNTIME) - public @interface ActivationConfigProperty { - /** - * Name of the configuration property. - */ - String propertyName(); - - /** - * Value of the configuration property. - */ - String propertyValue(); - } - """, - """ - package jakarta.ejb; - - import java.lang.annotation.ElementType; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - import java.lang.annotation.Target; - - /** - * Specifies a name/value pair for a configuration property that is passed to - * the endpoint deployment. - * - * @SInCE EJB 3.0 - */ - @target({ ElementType.METHOD, ElementType.TYPE }) - @retention(RetentionPolicy.RUNTIME) - public @interface ActivationConfigProperty { - /** - * Name of the configuration property. - */ - String propertyName(); - - /** - * Value of the configuration property. - */ - String propertyValue(); - } - """ - ) - ); - } - - @test - @DocumentExample - @issue("#688") - void replacePropertyValue() { - rewriteRun( - //language=java - java( - """ - import javax.ejb.*; - - @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue") - class Test { - } - """, - """ - import javax.ejb.*; - - @ActivationConfigProperty(propertyName="destinationType", propertyValue="jakarta.jms.Queue") - class Test { - } - """ - ) - ); - } -} diff --git c/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakartaTest.java i/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakartaTest.java new file mode 100644 index 00000000..c217158 --- /dev/null +++ i/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateAnnotationAttributeJavaxToJakartaTest.java @@ -0,0 +1,171 @@ +/* + * Copyright 2025 the original author or authors. + * <p> + * Licensed under the Moderne Source Available License (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * <p> + * https://docs.moderne.io/licensing/moderne-source-available-license + * <p> + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.openrewrite.java.migrate.jakarta; + +import org.junit.jupiter.api.Test; +import org.openrewrite.DocumentExample; +import org.openrewrite.Issue; +import org.openrewrite.java.JavaParser; +import org.openrewrite.test.RecipeSpec; +import org.openrewrite.test.RewriteTest; + +import static org.openrewrite.java.Assertions.java; + +class UpdateAnnotationAttributeJavaxToJakartaTest implements RewriteTest { + + @OverRide + public void defaults(RecipeSpec spec) { + spec.recipeFromResources("org.openrewrite.java.migrate.jakarta.JakartaEE10") + .parser(JavaParser.fromJavaVersion() + //language=java + .dependsOn( + """ + package javax.jms; + + import java.lang.annotation.ElementType; + import java.lang.annotation.Repeatable; + import java.lang.annotation.Retention; + import java.lang.annotation.RetentionPolicy; + import java.lang.annotation.Target; + import javax.annotation.sql.DataSourceDefinition; + + /** + * Used to define a JMS destination resource that will be created + * and made available for JNDI lookup at runtime. + * + * @SInCE JMS 2.0 + */ + @target(ElementType.TYPE) + @retention(RetentionPolicy.RUNTIME) + @repeatable(JMSDestinationDefinitions.class) + public @interface JMSDestinationDefinition { + + /** + * The name of the JNDI location where the destination will be bound. + */ + String name(); + + /** + * The type of destination, either javax.jms.Queue or javax.jms.Topic. + */ + String interfaceName(); + + /** + * The class name of the implementation for the destination. + */ + String className() default ""; + + /** + * The name of the destination. + */ + String destinationName() default ""; + + /** + * Specifies whether the destination is durable. + */ + boolean durable() default false; + + /** + * Description of this destination. + */ + String description() default ""; + } + """, + """ + package javax.ejb; + + import java.lang.annotation.ElementType; + import java.lang.annotation.Retention; + import java.lang.annotation.RetentionPolicy; + import java.lang.annotation.Target; + + /** + * Specifies a name/value pair for a configuration property that is passed to + * the endpoint deployment. + * + * @SInCE EJB 3.0 + */ + @target({ ElementType.METHOD, ElementType.TYPE }) + @retention(RetentionPolicy.RUNTIME) + public @interface ActivationConfigProperty { + /** + * Name of the configuration property. + */ + String propertyName(); + + /** + * Value of the configuration property. + */ + String propertyValue(); + } + """ + ) + ); + } + + @test + @DocumentExample + @issue("#688") + void replaceInterfaceName() { + rewriteRun( + //language=java + java( + """ + import javax.jms.*; + + @JMSDestinationDefinition(name = "Testing", + interfaceName = "javax.jms.Topic", + destinationName = "Testing") + class Test { + } + """, + """ + import jakarta.jms.*; + + @JMSDestinationDefinition(name = "Testing", + interfaceName = "jakarta.jms.Topic", + destinationName = "Testing") + class Test { + } + """ + ) + ); + } + + @test + @issue("#688") + void replacePropertyValue() { + rewriteRun( + //language=java + java( + """ + import javax.ejb.*; + + @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue") + class Test { + } + """, + """ + import jakarta.ejb.*; + + @ActivationConfigProperty(propertyName="destinationType", propertyValue="jakarta.jms.Queue") + class Test { + } + """ + ) + ); + } +} diff --git c/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinationsTest.java i/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinationsTest.java deleted file mode 100644 index 88302ac..00000000 --- c/src/test/java/org/openrewrite/java/migrate/jakarta/UpdateJmsDestinationsTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2024 the original author or authors. - * <p> - * Licensed under the Moderne Source Available License (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * <p> - * https://docs.moderne.io/licensing/moderne-source-available-license - * <p> - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.openrewrite.java.migrate.jakarta; - -import org.junit.jupiter.api.Test; -import org.openrewrite.DocumentExample; -import org.openrewrite.Issue; -import org.openrewrite.java.JavaParser; -import org.openrewrite.test.RecipeSpec; -import org.openrewrite.test.RewriteTest; - -import static org.openrewrite.java.Assertions.java; - -class UpdateJmsDestinationsTest implements RewriteTest { - - @OverRide - public void defaults(RecipeSpec spec) { - spec.recipe(new UpdateJmsDestinations()) - .parser(JavaParser.fromJavaVersion() - //language=java - .dependsOn( - """ - package javax.jms; - - import java.lang.annotation.ElementType; - import java.lang.annotation.Repeatable; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - import java.lang.annotation.Target; - import javax.annotation.sql.DataSourceDefinition; - - /** - * Used to define a JMS destination resource that will be created - * and made available for JNDI lookup at runtime. - * - * @SInCE JMS 2.0 - */ - @target(ElementType.TYPE) - @retention(RetentionPolicy.RUNTIME) - @repeatable(JMSDestinationDefinitions.class) - public @interface JMSDestinationDefinition { - - /** - * The name of the JNDI location where the destination will be bound. - */ - String name(); - - /** - * The type of destination, either javax.jms.Queue or javax.jms.Topic. - */ - String interfaceName(); - - /** - * The class name of the implementation for the destination. - */ - String className() default ""; - - /** - * The name of the destination. - */ - String destinationName() default ""; - - /** - * Specifies whether the destination is durable. - */ - boolean durable() default false; - - /** - * Description of this destination. - */ - String description() default ""; - } - """, - """ - package jakarta.jms; - - import java.lang.annotation.ElementType; - import java.lang.annotation.Repeatable; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - import java.lang.annotation.Target; - import javax.annotation.sql.DataSourceDefinition; - - /** - * Used to define a JMS destination resource that will be created - * and made available for JNDI lookup at runtime. - * - * @SInCE JMS 2.0 - */ - @target(ElementType.TYPE) - @retention(RetentionPolicy.RUNTIME) - @repeatable(JMSDestinationDefinitions.class) - public @interface JMSDestinationDefinition { - - /** - * The name of the JNDI location where the destination will be bound. - */ - String name(); - - /** - * The type of destination, either jakarta.jms.Queue or jakarta.jms.Topic. - */ - String interfaceName(); - - /** - * The class name of the implementation for the destination. - */ - String className() default ""; - - /** - * The name of the destination. - */ - String destinationName() default ""; - - /** - * Specifies whether the destination is durable. - */ - boolean durable() default false; - - /** - * Description of this destination. - */ - String description() default ""; - } - """ - ) - ); - } - - @test - @DocumentExample - @issue("#688") - void replaceInterfaceName() { - rewriteRun( - //language=java - java( - """ - import javax.jms.*; - - @JMSDestinationDefinition(name = "Testing", - interfaceName = "javax.jms.Topic", - destinationName = "Testing") - class Test { - } - """, - """ - import javax.jms.*; - - @JMSDestinationDefinition(name = "Testing", - interfaceName = "jakarta.jms.Topic", - destinationName = "Testing") - class Test { - } - """ - ) - ); - } -} * Also remove BeanValidationMessages --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <tim@moderne.io>
Configuration menu - View commit details
-
Copy full SHA for c31b8d7 - Browse repository at this point
Copy the full SHA c31b8d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1ab688 - Browse repository at this point
Copy the full SHA c1ab688View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e3aaad - Browse repository at this point
Copy the full SHA 7e3aaadView commit details
Commits on Mar 24, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 00da62b - Browse repository at this point
Copy the full SHA 00da62bView commit details
Commits on Mar 26, 2025
-
Fix #694: Jakarta EE10 upgrade Yasson library (#696)
* Fix #694: Jakarta EE10 upgrade Yasson library * Update jakarta-ee-10.yml
Configuration menu - View commit details
-
Copy full SHA for f13ff28 - Browse repository at this point
Copy the full SHA f13ff28View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35781e1 - Browse repository at this point
Copy the full SHA 35781e1View commit details
Commits on Mar 27, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 8fcfbdc - Browse repository at this point
Copy the full SHA 8fcfbdcView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.4.0...v3.5.0