java-1.8.0-openjdk/1423421.patch

34 lines
1.4 KiB
Diff

# HG changeset patch
# User ksrini
# Date 1414764176 25200
# Fri Oct 31 07:02:56 2014 -0700
# Node ID 9fd9a50e7994a9659c5ef21296d0baee4c2eecff
# Parent fd59a2d4313440077fce3fbf39174755a15d285a
8061305: Javadoc crashes when method name ends with "Property"
Reviewed-by: jjg
diff --git jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
--- jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
+++ jdk8/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
@@ -656,6 +656,9 @@
// properties aren't named setA* or getA*
private final Pattern pattern = Pattern.compile("[sg]et\\p{Upper}.*");
private boolean isPropertyMethod(MethodDoc method) {
+ if (!configuration.javafx) {
+ return false;
+ }
if (!method.name().endsWith("Property")) {
return false;
}
@@ -667,7 +670,9 @@
if (pattern.matcher(method.name()).matches()) {
return false;
}
-
+ if (method.typeParameters().length > 0) {
+ return false;
+ }
return 0 == method.parameters().length
&& !"void".equals(method.returnType().simpleTypeName());
}