diff --git a/.hgtags b/.hgtags index 84575326d76..abf74054aa4 100644 --- a/.hgtags +++ b/.hgtags @@ -48,3 +48,4 @@ bca2225b66d78c4bf4d9801f54cac7715a598650 jdk7-b68 c5d39b6be65cba0effb5f466ea48fe43764d0e0c jdk7-b71 df4bcd06e1d0ab306efa5a44f24a409dc0c0c742 jdk7-b72 ce74bd35ce948d629a356e168797f44b593b1578 jdk7-b73 +4e7661eaa211e186674f6cbefec4aef1144ac2a0 jdk7-b74 diff --git a/.hgtags-top-repo b/.hgtags-top-repo index 4511932e4a5..16a4362dac7 100644 --- a/.hgtags-top-repo +++ b/.hgtags-top-repo @@ -48,3 +48,4 @@ e1b972ff53cd58f825791f8ed9b2deffd16e768c jdk7-b68 4c36e9853dda27bdac5ef4839a610509fbe31d34 jdk7-b71 0d7e03b426df27c21dcc44ffb9178eacd1b04f10 jdk7-b72 3ac6dcf7823205546fbbc3d4ea59f37358d0b0d4 jdk7-b73 +2c88089b6e1c053597418099a14232182c387edc jdk7-b74 diff --git a/corba/.hgtags b/corba/.hgtags index d5a056ab705..8ec093cf9c3 100644 --- a/corba/.hgtags +++ b/corba/.hgtags @@ -48,3 +48,4 @@ a12ea7c7b497b4ba7830550095ef633bd6f43971 jdk7-b67 3f1ef7f899ea2aec189c4fb67e5c8fa374437c50 jdk7-b71 c793a31209263fbb867c23c752599d85c21abb73 jdk7-b72 b751c528c55560cf2adeaeef24b39ca1f4d1cbf7 jdk7-b73 +5d0cf59a3203b9f57aceebc33ae656b884987955 jdk7-b74 diff --git a/hotspot/.hgtags b/hotspot/.hgtags index 92383ca276a..76fc22cd617 100644 --- a/hotspot/.hgtags +++ b/hotspot/.hgtags @@ -48,3 +48,4 @@ d07e68298d4e17ebf93d8299e43fcc3ded26472a jdk7-b68 50a95aa4a247f0cbbf66df285a8b1d78ffb153d9 jdk7-b71 a94714c550658fd6741793ef036cb9625dc2ab1a jdk7-b72 faf94d94786b621f8e13cbcc941ca69c6d967c3f jdk7-b73 +f4b900403d6e4b0af51447bd13bbe23fe3a1dac7 jdk7-b74 diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index 480b8edfc1a..fb936811281 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009 HS_MAJOR_VER=17 HS_MINOR_VER=0 -HS_BUILD_NUMBER=03 +HS_BUILD_NUMBER=04 JDK_MAJOR_VER=1 JDK_MINOR_VER=7 diff --git a/jaxp/.hgtags b/jaxp/.hgtags index f9500dfdb66..a840b3ac5ea 100644 --- a/jaxp/.hgtags +++ b/jaxp/.hgtags @@ -48,3 +48,4 @@ c83f0106b78a85c7e614d27a328675460b2081cf jdk7-b70 ff94d8ce0daded647bb326630e643d010357afce jdk7-b71 37c805b6156fd492c12301688b54a6bcca39e729 jdk7-b72 feb05980f9f2964e6bc2b3a8532f9b3054c2289b jdk7-b73 +ea7b88c676dd8b269bc858a4a17c14dc96c8aed1 jdk7-b74 diff --git a/jaxws/.hgtags b/jaxws/.hgtags index 426d82a99b4..ecbc1811a5f 100644 --- a/jaxws/.hgtags +++ b/jaxws/.hgtags @@ -48,3 +48,4 @@ dd3c5f3ec28d5d5e5c0dc3229fdd52d85d04274d jdk7-b70 03314cf56a7212bbb6c186dbc9f15aca988a48ec jdk7-b71 4c990aa99bc037fd81dd1b1b269690e9bea8a0b4 jdk7-b72 558985e26fe16f5a6ebb2edb9180a42e1c8e8202 jdk7-b73 +f4466e1b608088c90e11beaa4b600f102608c6a1 jdk7-b74 diff --git a/jdk/.hgtags b/jdk/.hgtags index edcf31c99c5..8c3ca49faa6 100644 --- a/jdk/.hgtags +++ b/jdk/.hgtags @@ -48,3 +48,4 @@ b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68 b3f3240135f0c10b9f2481c174b81b7fcf0daa60 jdk7-b71 460639b036f327282832a4fe52b7aa45688afd50 jdk7-b72 f708138c9aca4b389872838fe6773872fce3609e jdk7-b73 +eacb36e30327e7ae33baa068e82ddccbd91eaae2 jdk7-b74 diff --git a/jdk/make/common/shared/Defs-java.gmk b/jdk/make/common/shared/Defs-java.gmk index eb63179f6d3..f9ed6353131 100644 --- a/jdk/make/common/shared/Defs-java.gmk +++ b/jdk/make/common/shared/Defs-java.gmk @@ -165,11 +165,6 @@ else JAVADOC_CMD = $(JAVA_TOOLS_DIR)/javadoc $(JAVA_TOOLS_FLAGS:%=-J%) endif -#always use the bootstrap javah until bug-ID 6889255 is fixed. These -#five lines should be removed as part of that fix: -JAVAH_CMD = $(JAVA_TOOLS_DIR)/javah \ - $(JAVAHFLAGS) - # Override of what javac to use (see deploy workspace) ifdef JAVAC JAVAC_CMD = $(JAVAC) diff --git a/jdk/make/java/java/FILES_java.gmk b/jdk/make/java/java/FILES_java.gmk index 2ad599cbe23..d9b7e153d72 100644 --- a/jdk/make/java/java/FILES_java.gmk +++ b/jdk/make/java/java/FILES_java.gmk @@ -258,6 +258,7 @@ JAVA_JAVA_java = \ java/util/ServiceConfigurationError.java \ java/util/Timer.java \ java/util/TimerTask.java \ + java/util/Objects.java \ java/util/UUID.java \ java/util/concurrent/AbstractExecutorService.java \ java/util/concurrent/ArrayBlockingQueue.java \ diff --git a/jdk/make/java/redist/Makefile b/jdk/make/java/redist/Makefile index 0d32cd141dc..929504f55d1 100644 --- a/jdk/make/java/redist/Makefile +++ b/jdk/make/java/redist/Makefile @@ -211,7 +211,7 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME): $(HOTSPOT_CLIENT_PATH)/$(JVM_NAM $(LIB_LOCATION)/$(KERNEL_LOCATION)/$(JVM_NAME): $(HOTSPOT_KERNEL_PATH)/$(JVM_NAME) $(install-file) -$(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_SERVER_PATH)/$(LIBJSIG_NAME) +$(LIB_LOCATION)/$(LIBJSIG_NAME): $(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/$(LIBJSIG_NAME) $(install-import-file) $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) \ diff --git a/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java b/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java index d02faa63cba..ec46bfdf2c0 100644 --- a/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java +++ b/jdk/src/share/classes/com/sun/naming/internal/ResourceManager.java @@ -25,11 +25,12 @@ package com.sun.naming.internal; -import java.applet.Applet; import java.io.InputStream; import java.io.IOException; import java.net.URL; import java.lang.ref.WeakReference; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.util.Enumeration; import java.util.HashMap; import java.util.Hashtable; @@ -112,6 +113,52 @@ public final class ResourceManager { private static final WeakHashMap urlFactoryCache = new WeakHashMap(11); private static final WeakReference NO_FACTORY = new WeakReference(null); + /** + * A class to allow JNDI properties be specified as applet parameters + * without creating a static dependency on java.applet. + */ + private static class AppletParameter { + private static final Class clazz = getClass("java.applet.Applet"); + private static final Method getMethod = + getMethod(clazz, "getParameter", String.class); + private static Class getClass(String name) { + try { + return Class.forName(name, true, null); + } catch (ClassNotFoundException e) { + return null; + } + } + private static Method getMethod(Class clazz, + String name, + Class... paramTypes) + { + if (clazz != null) { + try { + return clazz.getMethod(name, paramTypes); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } + } else { + return null; + } + } + + /** + * Returns the value of the applet's named parameter. + */ + static Object get(Object applet, String name) { + // if clazz is null then applet cannot be an Applet. + if (clazz == null || !clazz.isInstance(applet)) + throw new ClassCastException(applet.getClass().getName()); + try { + return getMethod.invoke(applet, name); + } catch (InvocationTargetException e) { + throw new AssertionError(e); + } catch (IllegalAccessException iae) { + throw new AssertionError(iae); + } + } + } // There should be no instances of this class. private ResourceManager() { @@ -143,7 +190,7 @@ public final class ResourceManager { if (env == null) { env = new Hashtable(11); } - Applet applet = (Applet)env.get(Context.APPLET); + Object applet = env.get(Context.APPLET); // Merge property values from env param, applet params, and system // properties. The first value wins: there's no concatenation of @@ -157,7 +204,7 @@ public final class ResourceManager { Object val = env.get(props[i]); if (val == null) { if (applet != null) { - val = applet.getParameter(props[i]); + val = AppletParameter.get(applet, props[i]); } if (val == null) { // Read system property. diff --git a/jdk/src/share/classes/java/io/FilePermission.java b/jdk/src/share/classes/java/io/FilePermission.java index 88c98fbddf3..aeab68b7907 100644 --- a/jdk/src/share/classes/java/io/FilePermission.java +++ b/jdk/src/share/classes/java/io/FilePermission.java @@ -209,7 +209,17 @@ public final class FilePermission extends Permission implements Serializable { cpath = AccessController.doPrivileged(new PrivilegedAction() { public String run() { try { - return sun.security.provider.PolicyFile.canonPath(cpath); + String path = cpath; + if (cpath.endsWith("*")) { + // call getCanonicalPath with a path with wildcard character + // replaced to avoid calling it with paths that are + // intended to match all entries in a directory + path = path.substring(0, path.length()-1) + "-"; + path = new File(path).getCanonicalPath(); + return path.substring(0, path.length()-1) + "*"; + } else { + return new File(path).getCanonicalPath(); + } } catch (IOException ioe) { return cpath; } diff --git a/jdk/src/share/classes/java/lang/Enum.java b/jdk/src/share/classes/java/lang/Enum.java index 5df8146c1d4..30ae3d8697b 100644 --- a/jdk/src/share/classes/java/lang/Enum.java +++ b/jdk/src/share/classes/java/lang/Enum.java @@ -40,10 +40,17 @@ import java.io.ObjectStreamException; * Edition, §8.9. * + *

Note that when using an enumeration type as the type of a set + * or as the type of the keys in a map, specialized and efficient + * {@linkplain java.util.EnumSet set} and {@linkplain + * java.util.EnumMap map} implementations are available. + * * @param The enum type subclass * @author Josh Bloch * @author Neal Gafter * @see Class#getEnumConstants() + * @see java.util.EnumSet + * @see java.util.EnumMap * @since 1.5 */ public abstract class Enum> diff --git a/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java b/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java index 1f94a4c5a15..a48f6b19867 100644 --- a/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java +++ b/jdk/src/share/classes/java/lang/reflect/AccessibleObject.java @@ -44,6 +44,8 @@ import java.lang.annotation.Annotation; * as Java Object Serialization or other persistence mechanisms, to * manipulate objects in a manner that would normally be prohibited. * + *

By default, a reflected object is not accessible. + * * @see Field * @see Method * @see Constructor diff --git a/jdk/src/share/classes/java/nio/file/Path.java b/jdk/src/share/classes/java/nio/file/Path.java index d9ba6de7835..8aa970c1364 100644 --- a/jdk/src/share/classes/java/nio/file/Path.java +++ b/jdk/src/share/classes/java/nio/file/Path.java @@ -412,7 +412,7 @@ public abstract class Path * dependent if {@code "a/b/../x"} would locate the same file as {@code "/a/x"}. * * @param other - * the resulting path + * the path to relativize against this path * * @return the resulting relative path, or {@code null} if both paths are * equal @@ -1615,23 +1615,23 @@ public abstract class Path * Tests if the file referenced by this object is the same file referenced * by another object. * - *

If this {@code FileRef} and the given {@code FileRef} are {@link + *

If this {@code Path} and the given {@code Path} are {@link * #equals(Object) equal} then this method returns {@code true} without checking - * if the file exists. If the {@code FileRef} and the given {@code FileRef} - * are associated with different providers, or the given {@code FileRef} is + * if the file exists. If the {@code Path} and the given {@code Path} + * are associated with different providers, or the given {@code Path} is * {@code null} then this method returns {@code false}. Otherwise, this method - * checks if both {@code FileRefs} locate the same file, and depending on the + * checks if both {@code Paths} locate the same file, and depending on the * implementation, may require to open or access both files. * *

If the file system and files remain static, then this method implements - * an equivalence relation for non-null {@code FileRefs}. + * an equivalence relation for non-null {@code Paths}. *