Skip to content

Commit d569455

Browse files
committed
Improve pattern maching to avoid confusion with JsonNullable
1 parent ca30a5a commit d569455

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/TypeAnnotationsAssert.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public JavaFileAssert toType() {
2626
* @param name name of the annotation. For example "Nullable";
2727
*/
2828
public TypeAnnotationsAssert doesNotImportAnnotation(final String name) {
29-
String pattern = "import\\s+[\\w.]+(\\.\\*)?" + Pattern.quote(name) + ";";
29+
String pattern = "import\\s+[\\w.]+\\." + Pattern.quote(name) + ";";
3030
this.toType().fileDoesNotContainPattern(pattern);
3131
return this;
3232
}
@@ -37,7 +37,7 @@ public TypeAnnotationsAssert doesNotImportAnnotation(final String name) {
3737
* @param name name of the annotation. For example "Nullable";
3838
*/
3939
public TypeAnnotationsAssert doesImportAnnotation(final String name) {
40-
String pattern = "import\\s+[\\w.]+(\\.\\*)?" + Pattern.quote(name) + ";";
40+
String pattern = "import\\s+[\\w.]+\\." + Pattern.quote(name) + ";";
4141
this.toType().fileContainsPattern(pattern);
4242
return this;
4343
}

0 commit comments

Comments
 (0)