Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
|
|
@@ -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; |
|
|