# HG changeset patch # User chegar # Date 1382441613 -3600 # Node ID 1c85f50e262233e484c1f613d3b743dab9223c2c # Parent d7ef65d3ee57c9d3244996d431cac0e26a0081ce# Parent f15ad52cffeda150e2ff5622847192d67394e975 Merge diff -r d7ef65d3ee57 -r 1c85f50e2622 make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java --- a/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java Mon Oct 21 15:00:56 2013 +0100 +++ b/make/tools/src/build/tools/tzdb/TzdbZoneRulesCompiler.java Tue Oct 22 12:33:33 2013 +0100 @@ -618,6 +618,11 @@ // remove ROC, which is not supported in j.u.tz builtZones.remove("ROC"); links.remove("ROC"); + // remove EST, HST and MST. They are supported via + // the short-id mapping + builtZones.remove("EST"); + builtZones.remove("HST"); + builtZones.remove("MST"); } /** diff -r d7ef65d3ee57 -r 1c85f50e2622 makefiles/Setup.gmk --- a/makefiles/Setup.gmk Mon Oct 21 15:00:56 2013 +0100 +++ b/makefiles/Setup.gmk Tue Oct 22 12:33:33 2013 +0100 @@ -27,7 +27,7 @@ # To build with all warnings enabled, do the following: # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000" -JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,classfile,dep-ann,divzero,varargs -Werror +JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs -Werror # Any java code executed during a JDK build to build other parts of the JDK must be # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this diff -r d7ef65d3ee57 -r 1c85f50e2622 src/share/classes/java/io/Closeable.java --- a/src/share/classes/java/io/Closeable.java Mon Oct 21 15:00:56 2013 +0100 +++ b/src/share/classes/java/io/Closeable.java Tue Oct 22 12:33:33 2013 +0100 @@ -34,7 +34,6 @@ * * @since 1.5 */ -@FunctionalInterface public interface Closeable extends AutoCloseable { /** diff -r d7ef65d3ee57 -r 1c85f50e2622 src/share/classes/java/io/Flushable.java --- a/src/share/classes/java/io/Flushable.java Mon Oct 21 15:00:56 2013 +0100 +++ b/src/share/classes/java/io/Flushable.java Tue Oct 22 12:33:33 2013 +0100 @@ -34,7 +34,6 @@ * * @since 1.5 */ -@FunctionalInterface public interface Flushable { /** diff -r d7ef65d3ee57 -r 1c85f50e2622 src/share/classes/java/lang/AutoCloseable.java --- a/src/share/classes/java/lang/AutoCloseable.java Mon Oct 21 15:00:56 2013 +0100 +++ b/src/share/classes/java/lang/AutoCloseable.java Tue Oct 22 12:33:33 2013 +0100 @@ -48,7 +48,6 @@ * @author Josh Bloch * @since 1.7 */ -@FunctionalInterface public interface AutoCloseable { /** * Closes this resource, relinquishing any underlying resources. diff -r d7ef65d3ee57 -r 1c85f50e2622 src/share/classes/java/lang/Class.java --- a/src/share/classes/java/lang/Class.java Mon Oct 21 15:00:56 2013 +0100 +++ b/src/share/classes/java/lang/Class.java Tue Oct 22 12:33:33 2013 +0100 @@ -1571,6 +1571,10 @@ *
If this {@code Class} object represents a primitive type or void, * then the returned array has length 0. * + *
Static methods declared in superinterfaces of the class or interface + * represented by this {@code Class} object are not considered members of + * the class or interface. + * *
The elements in the returned array are not sorted and are not in any * particular order. * @@ -1729,6 +1733,10 @@ *
If this {@code Class} object represents an array type, then this * method does not find the {@code clone()} method. * + *
Static methods declared in superinterfaces of the class or interface
+ * represented by this {@code Class} object are not considered members of
+ * the class or interface.
+ *
* @param name the name of the method
* @param parameterTypes the list of parameters
* @return the {@code Method} object that matches the specified
@@ -1752,7 +1760,7 @@
public Method getMethod(String name, Class>... parameterTypes)
throws NoSuchMethodException, SecurityException {
checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
- Method method = getMethod0(name, parameterTypes);
+ Method method = getMethod0(name, parameterTypes, true);
if (method == null) {
throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
}
@@ -2727,6 +2735,14 @@
}
}
+ void addAllNonStatic(Method[] methods) {
+ for (Method candidate : methods) {
+ if (!Modifier.isStatic(candidate.getModifiers())) {
+ add(candidate);
+ }
+ }
+ }
+
int length() {
return length;
}
@@ -2797,7 +2813,7 @@
MethodArray inheritedMethods = new MethodArray();
Class>[] interfaces = getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
- inheritedMethods.addAll(interfaces[i].privateGetPublicMethods());
+ inheritedMethods.addAllNonStatic(interfaces[i].privateGetPublicMethods());
}
if (!isInterface()) {
Class> c = getSuperclass();
@@ -2900,7 +2916,7 @@
}
- private Method getMethod0(String name, Class>[] parameterTypes) {
+ private Method getMethod0(String name, Class>[] parameterTypes, boolean includeStaticMethods) {
// Note: the intent is that the search algorithm this routine
// uses be equivalent to the ordering imposed by
// privateGetPublicMethods(). It fetches only the declared
@@ -2913,25 +2929,23 @@
if ((res = searchMethods(privateGetDeclaredMethods(true),
name,
parameterTypes)) != null) {
- return res;
+ if (includeStaticMethods || !Modifier.isStatic(res.getModifiers()))
+ return res;
}
// Search superclass's methods
if (!isInterface()) {
Class super T> c = getSuperclass();
if (c != null) {
- if ((res = c.getMethod0(name, parameterTypes)) != null) {
+ if ((res = c.getMethod0(name, parameterTypes, true)) != null) {
return res;
}
}
}
// Search superinterfaces' methods
Class>[] interfaces = getInterfaces();
- for (int i = 0; i < interfaces.length; i++) {
- Class> c = interfaces[i];
- if ((res = c.getMethod0(name, parameterTypes)) != null) {
+ for (Class> c : interfaces)
+ if ((res = c.getMethod0(name, parameterTypes, false)) != null)
return res;
- }
- }
// Not found
return null;
}
@@ -3300,7 +3314,10 @@
public A[] getAnnotationsByType(Class annotationClass) {
Objects.requireNonNull(annotationClass);
- return AnnotationSupport.getMultipleAnnotations(annotationData().annotations, annotationClass);
+ AnnotationData annotationData = annotationData();
+ return AnnotationSupport.getAssociatedAnnotations(annotationData.declaredAnnotations,
+ annotationData.annotations,
+ annotationClass);
}
/**
@@ -3330,7 +3347,8 @@
public A[] getDeclaredAnnotationsByType(Class annotationClass) {
Objects.requireNonNull(annotationClass);
- return AnnotationSupport.getMultipleAnnotations(annotationData().declaredAnnotations, annotationClass);
+ return AnnotationSupport.getDirectlyAndIndirectlyPresent(annotationData().declaredAnnotations,
+ annotationClass);
}
/**
diff -r d7ef65d3ee57 -r 1c85f50e2622 src/share/classes/java/lang/Comparable.java
--- a/src/share/classes/java/lang/Comparable.java Mon Oct 21 15:00:56 2013 +0100
+++ b/src/share/classes/java/lang/Comparable.java Tue Oct 22 12:33:33 2013 +0100
@@ -93,7 +93,6 @@
* @see java.util.Comparator
* @since 1.2
*/
-@FunctionalInterface
public interface Comparable