Skip to content
Permalink
Browse files

8237450: JDK13 annotation processors not run when a supported annotat…

…ion type specifies a module

Initial fix suggested by jjg based on through analysis by Jeremy Kuhn.

Reviewed-by: jjg
  • Loading branch information
jddarcy committed Feb 19, 2020
1 parent 11386e7 commit d4a069b33be55c377d8c5e991bf28fb7e933eee3
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1758,7 +1758,7 @@ private static Pattern importStringToPattern(boolean allowModules, String s, Pro
pkg = s;
} else {
String moduleName = s.substring(0, slash);
if (!SourceVersion.isIdentifier(moduleName)) {
if (!SourceVersion.isName(moduleName)) {
return warnAndNoMatches(s, p, log, lint);
}
module = Pattern.quote(moduleName + "/");
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
import javax.lang.model.*;
import javax.lang.model.element.*;

@SupportedAnnotationTypes({"java.lang.SuppressWarnings", "*"})
@SupportedAnnotationTypes({"java.base/java.lang.SuppressWarnings", "*"})
public class AnnoProc extends AbstractProcessor {
public boolean process(Set<? extends TypeElement> elems, RoundEnvironment renv) {
return true;

0 comments on commit d4a069b

Please sign in to comment.