JDK 15 RFR of 8237450: JDK13 annotation processors not run when a supported annotation type specifies a module
Joe Darcy
joe.darcy at oracle.com
Sat Feb 15 21:42:30 UTC 2020
Hello,
Please review the small fix for
8237450: JDK13 annotation processors not run when a supported
annotation type specifies a module
http://cr.openjdk.java.net/~darcy/8237450.0/
Patch below. The modified test fails without the fix and passes with it.
Thanks,
-Joe
---
old/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
2020-02-15 13:09:24.235878000 -0800
+++
new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
2020-02-15 13:09:23.999995999 -0800
@@ -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 @@
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 + "/");
---
old/test/langtools/tools/javac/diags/examples/RedundantTypesWithWildcardProc/processors/AnnoProc.java
2020-02-15 13:09:24.715637999 -0800
+++
new/test/langtools/tools/javac/diags/examples/RedundantTypesWithWildcardProc/processors/AnnoProc.java
2020-02-15 13:09:24.475757999 -0800
@@ -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.*;
- at SupportedAnnotationTypes({"java.lang.SuppressWarnings", "*"})
+ at SupportedAnnotationTypes({"java.base/java.lang.SuppressWarnings", "*"})
public class AnnoProc extends AbstractProcessor {
public boolean process(Set<? extends TypeElement> elems,
RoundEnvironment renv) {
return true;
More information about the compiler-dev
mailing list