Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Tim te Beek <timtebeek@gmail.com>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent 669f480 commit 0ee41df
Showing 1 changed file with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
package org.openrewrite.java.migrate.jakarta;
/*
* Copyright 2024 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
* <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.intellij.lang.annotations.Language;
import org.junit.jupiter.api.Test;

import org.openrewrite.DocumentExample;
import org.openrewrite.config.Environment;
import org.openrewrite.java.JavaParser;
import org.openrewrite.test.RecipeSpec;
Expand Down Expand Up @@ -49,7 +66,8 @@ void doNotChangeImportWhenPackageFromJavaSE() {
rewriteRun(
spec -> spec.parser(JavaParser.fromJavaVersion().dependsOn(javax_transaction_xa)),
//language=java
java("""
java(
"""
import javax.transaction.xa.*;
public class A {
XAResource xa;
Expand All @@ -58,12 +76,14 @@ public class A {
);
}

@DocumentExample
@Test
void changeImportWhenPackageFromJakartaTransaction() {
rewriteRun(
spec -> spec.parser(JavaParser.fromJavaVersion().dependsOn(javax_transaction, jakarta_transaction)),
//language=java
java("""
java(
"""
import javax.transaction.Transactional;
@Transactional
public class A {
Expand Down

0 comments on commit 0ee41df

Please sign in to comment.