Mercurial > hg > release > icedtea7-forest-2.6 > jdk
changeset 7018:bcd02823f5f5
Merge
author | asaha |
---|---|
date | Wed, 03 Jul 2013 17:43:02 -0700 |
parents | 4fc1467017ea (current diff) b1012a7e71ce (diff) |
children | 0c8d67d9e6d3 |
files | .hgtags make/common/Release.gmk |
diffstat | 5 files changed, 50 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Wed Jul 03 14:50:03 2013 -0700 +++ b/.hgtags Wed Jul 03 17:43:02 2013 -0700 @@ -324,5 +324,6 @@ d3186a0676dbc7ab80e00fa67f952b67933d5a35 jdk7u40-b29 60d52db33828bf0355a94be2a82df90c901592f3 jdk7u40-b30 c2522d149ff6663ed1d3602c88c286cff25a43a7 jdk7u40-b31 +b9f86896cd0aa9b83e472a90b20ae7c253fba633 jdk7u40-b32 55f01444cf58c8004df9a9634c1bd7ff87caa370 jdk7u25-b32 b06abd965701459a868e88af9a3e564c0301971c jdk7u45-b01
--- a/make/common/Release.gmk Wed Jul 03 14:50:03 2013 -0700 +++ b/make/common/Release.gmk Wed Jul 03 17:43:02 2013 -0700 @@ -247,7 +247,7 @@ trim-image-jre trim-image-jdk \ identify-image-jre identify-image-jdk \ process-image-jre process-image-jdk sec-files sec-files-win \ - jgss-files $(EXTRA_IMAGE_TARGETS) server-jdk-image + jgss-files $(EXTRA_IMAGE_TARGETS) server-jdk-image else images:: sanity-images post-sanity-images \ @@ -423,7 +423,8 @@ ifdef BUILD_JFR JFR_CLASSES_DIRS= \ com/oracle/jrockit/jfr \ - oracle/jrockit/jfr + oracle/jrockit/jfr \ + jdk/internal/jfr endif # classes that go into jsse.jar @@ -540,7 +541,7 @@ $(JDK_IMAGE_DIR)/sample/SAMPLES_LICENSE: $(SHARE_JDK_DOC_SRC)/SAMPLES_LICENSE $(process-doc-file) -# JRE files +# JRE files $(JRE_IMAGE_DIR)/%: $(SHARE_JRE_DOC_SRC)/% $(process-doc-file) ifeq ($(PLATFORM), windows) @@ -638,6 +639,7 @@ $(ECHO) "oracle/jrockit/jfr/parser/" >> $@ $(ECHO) "oracle/jrockit/jfr/settings/" >> $@ $(ECHO) "oracle/jrockit/jfr/tools/" >> $@ + $(ECHO) "jdk/internal/jfr/events/" >> $@ endif @@ -931,7 +933,7 @@ done $(RM) $(JRE_BIN_LIST) -# Duplicate current j2re-image contents to server-j2re-image +# Duplicate current j2re-image contents to server-j2re-image # for the server version of jre, before deploy build server-jdk-image:: ifeq ($(PLATFORM), macosx)
--- a/src/share/classes/javax/management/remote/rmi/RMIServerImpl.java Wed Jul 03 14:50:03 2013 -0700 +++ b/src/share/classes/javax/management/remote/rmi/RMIServerImpl.java Wed Jul 03 17:43:02 2013 -0700 @@ -474,6 +474,15 @@ String clientHost = ""; try { clientHost = RemoteServer.getClientHost(); + /* + * According to the rules specified in the javax.management.remote + * package description, a numeric IPv6 address (detected by the + * presence of otherwise forbidden ":" character) forming a part + * of the connection id must be enclosed in square brackets. + */ + if (clientHost.contains(":")) { + clientHost = "[" + clientHost + "]"; + } } catch (ServerNotActiveException e) { logger.trace("makeConnectionId", "getClientHost", e); }
--- a/src/share/classes/sun/misc/URLClassPath.java Wed Jul 03 14:50:03 2013 -0700 +++ b/src/share/classes/sun/misc/URLClassPath.java Wed Jul 03 17:43:02 2013 -0700 @@ -705,8 +705,16 @@ /* Throws if the given jar file is does not start with the correct LOC */ static JarFile checkJar(JarFile jar) throws IOException { if (System.getSecurityManager() != null && !DISABLE_JAR_CHECKING - && !zipAccess.startsWithLocHeader(jar)) - throw new IOException("Invalid Jar file"); + && !zipAccess.startsWithLocHeader(jar)) { + IOException x = new IOException("Invalid Jar file"); + try { + jar.close(); + } catch (IOException ex) { + x.addSuppressed(ex); + } + throw x; + } + return jar; }
--- a/test/javax/management/remote/mandatory/connection/ConnectionTest.java Wed Jul 03 14:50:03 2013 -0700 +++ b/test/javax/management/remote/mandatory/connection/ConnectionTest.java Wed Jul 03 17:43:02 2013 -0700 @@ -44,6 +44,7 @@ import java.util.StringTokenizer; import java.security.Principal; +import java.util.regex.Pattern; import javax.security.auth.Subject; import javax.management.MBeanServer; @@ -239,6 +240,18 @@ return true; } + private static final String IPV4_PTN = "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}(\\:[1-9][0-9]{3})?$"; + + /** + * Checks the connection id for validity. + * The {@link + * javax.management.remote package description} describes the + * conventions for connection IDs. + * @param proto Connection protocol + * @param clientConnId The connection ID + * @return Returns {@code true} if the connection id conforms to the specification; {@code false} otherwise. + * @throws Exception + */ private static boolean checkConnectionId(String proto, String clientConnId) throws Exception { StringTokenizer tok = new StringTokenizer(clientConnId, " ", true); @@ -249,6 +262,17 @@ "\""); return false; } + + int hostAddrInd = s.indexOf("//"); + if (hostAddrInd > -1) { + s = s.substring(hostAddrInd + 2); + if (!Pattern.matches(IPV4_PTN, s)) { + if (!s.startsWith("[") || !s.endsWith("]")) { + System.out.println("IPv6 address must be enclosed in \"[]\""); + return false; + } + } + } s = tok.nextToken(); if (!s.equals(" ")) { System.out.println("Expected \" \", found \"" + s + "\"");