Skip to content

Commit

Permalink
AboutJavaVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Sep 18, 2022
1 parent 492f648 commit 8b2ed72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public String getDescription() {
@Override
protected TreeVisitor<?, ExecutionContext> getSingleSourceApplicableTest() {
return Applicability.and(
new UsesJavaVersion<>(11),
// new UsesJavaVersion<>(11),
new UsesType<>(LOMBOK_VAL));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package org.openrewrite.java.migrate.search;

import io.micrometer.core.instrument.util.StringUtils;
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.openrewrite.ExecutionContext;
Expand Down Expand Up @@ -43,12 +44,12 @@ public String getDisplayName() {

@Override
public String getDescription() {
return super.getDescription();
return "A diagnostic for studying the applicability of Java version constraints.";
}

@Override
protected @Nullable TreeVisitor<?, ExecutionContext> getSingleSourceApplicableTest() {
return whenUsesType == null ? null : new UsesType<>(whenUsesType);
return StringUtils.isBlank(whenUsesType) ? null : new UsesType<>(whenUsesType);
}

@Override
Expand Down

0 comments on commit 8b2ed72

Please sign in to comment.