--- a/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
0d1f816217dce5e72187f167cc1816080cbeb453 jdk9-b12
1a30593dcb9802faec3b6edb24d86ca088594e4e jdk9-b13
97932f6ad950ae5a73a9da5c96e6e58503ff646b jdk9-b14
+74eb0778e4f2dbff6628e718378449fba27c4265 jdk9-b15
--- a/.hgtags-top-repo Tue Jun 03 07:34:35 2014 -0400
+++ b/.hgtags-top-repo Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
59f6350295f9681fe5956d8bc889bf341914c6cb jdk9-b12
5800456add07e1a68170a229fb5e27376f8875e5 jdk9-b13
4e3aa9723e9972623e3dafc321b368e7db7e9b3b jdk9-b14
+b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15
--- a/corba/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/corba/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
e212cdcc8c11f0ba5acf6f5ddb596c4c545a93f9 jdk9-b12
088eec4c36f4d7f250fcd19c4969bf698e3d2cdc jdk9-b13
a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14
+e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15
--- a/hotspot/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/hotspot/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -417,3 +417,4 @@
1c383bb39e2849ca62cb763f4e182a29b421d60a jdk9-b12
456ad9c99133803d4e1433124c85a6fd141b9ac9 jdk9-b13
bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14
+170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15
--- a/jaxp/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/jaxp/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
e88cecf5a21b760ff7d7761c2db6bb8c82bc9f0c jdk9-b12
5eaf717f6e36037a6d3744ffeee0e4c88e64a0d2 jdk9-b13
32b3fc4bc7374a34d52b7f4e2391b4b4b0c084e8 jdk9-b14
+6bad71866c7598587860e0981b0b0e51ec8c0476 jdk9-b15
--- a/jaxws/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/jaxws/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -260,3 +260,4 @@
779f8b21c75f83e3918dac8499e4d0ecb3a54ed7 jdk9-b12
3d42204854c9f703e3ccdc8891248e73057713ab jdk9-b13
02e58850b7062825308413d420f2b02c1f25a724 jdk9-b14
+e9780330017a6b464a385356d77e5136f9de8d09 jdk9-b15
--- a/jdk/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
83d9bc20973de232cae45b139fdff8a4549c130f jdk9-b12
c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
5c7a17a81afd0906b53ee31d95a3211c96ff6b25 jdk9-b14
+4537360f09fe23ab339ee588747b657feb12d0c8 jdk9-b15
--- a/jdk/make/CompileLaunchers.gmk Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/make/CompileLaunchers.gmk Tue Jun 03 07:35:35 2014 -0400
@@ -442,11 +442,6 @@
endif
-ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
- UNPACKEXE_CFLAGS += -xregs=no%appl
- UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s
-endif
-
UNPACKEXE_LANG := C
ifeq ($(OPENJDK_TARGET_OS), solaris)
UNPACKEXE_LANG := C++
--- a/jdk/make/CopyIntoClasses.gmk Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/make/CopyIntoClasses.gmk Tue Jun 03 07:35:35 2014 -0400
@@ -30,7 +30,6 @@
# These directories should not be copied at all
EXCLUDES += \
- com/sun/org/apache/xml/internal/security/resource/schema \
java/awt/doc-files \
java/lang/doc-files \
javax/swing/doc-files \
--- a/jdk/make/CreateJars.gmk Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/make/CreateJars.gmk Tue Jun 03 07:35:35 2014 -0400
@@ -552,40 +552,53 @@
##########################################################################################
-SRC_ZIP_INCLUDES = \
- com/sun/corba \
- com/sun/image/codec/jpeg \
- com/sun/imageio \
- com/sun/java_cup \
- com/sun/javadoc \
- com/sun/java/swing \
- com/sun/jmx \
- com/sun/naming \
- com/sun/org/apache \
- com/sun/security/auth \
- com/sun/security/jgss \
- com/sun/source \
- java \
- javax/accessibility \
- javax/annotation \
- javax/imageio \
- javax/lang \
- javax/management \
- javax/naming \
- javax/print \
- javax/rmi \
- javax/script \
- javax/security \
- javax/sound \
- javax/sql \
- javax/swing \
- javax/tools \
- javax/xml \
- org/ietf \
- org/omg \
- org/w3c/dom \
- org/xml/sax \
- #
+ifdef OPENJDK
+ SRC_ZIP_INCLUDES = \
+ com \
+ java \
+ javax \
+ jdk \
+ org \
+ sun \
+ #
+ SRC_ZIP_EXCLUDES =
+else
+ SRC_ZIP_INCLUDES = \
+ com/sun/corba \
+ com/sun/image/codec/jpeg \
+ com/sun/imageio \
+ com/sun/java_cup \
+ com/sun/javadoc \
+ com/sun/java/swing \
+ com/sun/jmx \
+ com/sun/naming \
+ com/sun/org/apache \
+ com/sun/security/auth \
+ com/sun/security/jgss \
+ com/sun/source \
+ java \
+ javax/accessibility \
+ javax/annotation \
+ javax/imageio \
+ javax/lang \
+ javax/management \
+ javax/naming \
+ javax/print \
+ javax/rmi \
+ javax/script \
+ javax/security \
+ javax/sound \
+ javax/sql \
+ javax/swing \
+ javax/tools \
+ javax/xml \
+ org/ietf \
+ org/omg \
+ org/w3c/dom \
+ org/xml/sax \
+ #
+ SRC_ZIP_EXCLUDES = javax/swing/beaninfo
+endif
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
@@ -616,7 +629,7 @@
$(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
- EXCLUDES := javax/swing/beaninfo, \
+ EXCLUDES := $(SRC_ZIP_EXCLUDES), \
SUFFIXES := .java .c .h, \
ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
--- a/jdk/make/Setup.gmk Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/make/Setup.gmk Tue Jun 03 07:35:35 2014 -0400
@@ -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,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,overloads,serial,static,try,varargs -Werror
+JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,cast,classfile,dep-ann,divzero,empty,fallthrough,overloads,serial,static,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
--- a/jdk/make/profile-rtjar-includes.txt Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/make/profile-rtjar-includes.txt Tue Jun 03 07:35:35 2014 -0400
@@ -88,7 +88,7 @@
java/sql \
javax/rmi/ssl \
javax/sql \
- javax/transaction \
+ javax/transaction/xa \
javax/xml \
org/w3c \
org/xml/sax \
@@ -223,7 +223,8 @@
javax/management/remote/rmi/_RMIConnection_Stub.class \
javax/management/remote/rmi/_RMIServerImpl_Tie.class \
javax/management/remote/rmi/_RMIServer_Stub.class \
- javax/rmi/*.class
+ javax/rmi/*.class \
+ javax/transaction/*.class
FULL_JRE_RTJAR_EXCLUDE_TYPES :=
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java Tue Jun 03 07:35:35 2014 -0400
@@ -512,7 +512,7 @@
}
static String qualifiedStringValue(String s1, String s234) {
// Qualification by dot must decompose uniquely. Second string might already be qualified.
- assert(s1.indexOf(".") < 0);
+ assert(s1.indexOf('.') < 0);
return s1+"."+s234;
}
--- a/jdk/src/share/classes/com/sun/jndi/cosnaming/CorbanameUrl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/jndi/cosnaming/CorbanameUrl.java Tue Jun 03 07:35:35 2014 -0400
@@ -102,7 +102,7 @@
}
location = url.substring(addrStart, addrEnd);
- int keyStart = location.indexOf("/");
+ int keyStart = location.indexOf('/');
if (keyStart >= 0) {
// Has key string
if (keyStart == (location.length() -1)) {
--- a/jdk/src/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/jndi/rmi/registry/RegistryContext.java Tue Jun 03 07:35:35 2014 -0400
@@ -336,7 +336,7 @@
String url = "rmi://";
// Enclose IPv6 literal address in '[' and ']'
- url = (host.indexOf(":") > -1) ? url + "[" + host + "]" :
+ url = (host.indexOf(':') > -1) ? url + "[" + host + "]" :
url + host;
if (port > 0) {
url += ":" + Integer.toString(port);
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java Tue Jun 03 07:35:35 2014 -0400
@@ -149,7 +149,7 @@
* foo:rest/of/name foo:
*/
protected String getURLPrefix(String url) throws NamingException {
- int start = url.indexOf(":");
+ int start = url.indexOf(':');
if (start < 0) {
throw new OperationNotSupportedException("Invalid URL: " + url);
@@ -160,7 +160,7 @@
start += 2; // skip double slash
// find last slash
- int posn = url.indexOf("/", start);
+ int posn = url.indexOf('/', start);
if (posn >= 0) {
start = posn;
} else {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,347 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
-<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" xsi:schemaLocation="http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd">
- <xsd:element name="Any" type="AnyType"/>
- <xsd:complexType name="AnyType" mixed="true">
- <xsd:sequence>
- <xsd:any namespace="##any"/>
- </xsd:sequence>
- <xsd:anyAttribute namespace="##any"/>
- </xsd:complexType>
- <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
- <xsd:complexType name="ObjectIdentifierType">
- <xsd:sequence>
- <xsd:element name="Identifier" type="IdentifierType"/>
- <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
- <xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="IdentifierType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:simpleType name="QualifierType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="OIDAsURI"/>
- <xsd:enumeration value="OIDAsURN"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="DocumentationReferencesType">
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="DocumentationReference" type="xsd:anyURI"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
- <xsd:complexType name="EncapsulatedPKIDataType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:base64Binary">
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:element name="TimeStamp" type="TimeStampType"/>
- <xsd:complexType name="TimeStampType">
- <xsd:sequence>
- <xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
- <xsd:element name="XMLTimeStamp" type="AnyType"/>
- </xsd:choice>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="HashDataInfoType">
- <xsd:sequence>
- <xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
- <xsd:complexType name="QualifyingPropertiesType">
- <xsd:sequence>
- <xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
- <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="SignedProperties" type="SignedPropertiesType"/>
- <xsd:complexType name="SignedPropertiesType">
- <xsd:sequence>
- <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
- <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
- <xsd:complexType name="UnsignedPropertiesType">
- <xsd:sequence>
- <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
- <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
- <xsd:complexType name="SignedSignaturePropertiesType">
- <xsd:sequence>
- <xsd:element name="SigningTime" type="xsd:dateTime"/>
- <xsd:element name="SigningCertificate" type="CertIDListType"/>
- <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
- <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
- <xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
- <xsd:complexType name="SignedDataObjectPropertiesType">
- <xsd:sequence>
- <xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
- <xsd:complexType name="UnsignedSignaturePropertiesType">
- <xsd:sequence>
- <xsd:element name="CounterSignature" type="CounterSignatureType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="SignatureTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType" minOccurs="0"/>
- <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType" minOccurs="0"/>
- <xsd:choice>
- <xsd:element name="SigAndRefsTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="RefsOnlyTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:element name="CertificateValues" type="CertificateValuesType" minOccurs="0"/>
- <xsd:element name="RevocationValues" type="RevocationValuesType" minOccurs="0"/>
- <xsd:element name="ArchiveTimeStamp" type="TimeStampType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
- <xsd:complexType name="UnsignedDataObjectPropertiesType">
- <xsd:sequence>
- <xsd:element name="UnsignedDataObjectProperty" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
- <xsd:complexType name="QualifyingPropertiesReferenceType">
- <xsd:sequence>
- <xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="SigningTime" type="xsd:dateTime"/>
- <xsd:element name="SigningCertificate" type="CertIDListType"/>
- <xsd:complexType name="CertIDListType">
- <xsd:sequence>
- <xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CertIDType">
- <xsd:sequence>
- <xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
- <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="DigestAlgAndValueType">
- <xsd:sequence>
- <xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
- <xsd:element name="DigestValue" type="ds:DigestValueType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
- <xsd:complexType name="SignaturePolicyIdentifierType">
- <xsd:choice>
- <xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
- <xsd:element name="SignaturePolicyImplied"/>
- </xsd:choice>
- </xsd:complexType>
- <xsd:complexType name="SignaturePolicyIdType">
- <xsd:sequence>
- <xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
- <xsd:element ref="ds:Transforms" minOccurs="0"/>
- <xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
- <xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="SigPolicyQualifiersListType">
- <xsd:sequence>
- <xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SPURI" type="xsd:anyURI"/>
- <xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
- <xsd:complexType name="SPUserNoticeType">
- <xsd:sequence>
- <xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
- <xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="NoticeReferenceType">
- <xsd:sequence>
- <xsd:element name="Organization" type="xsd:string"/>
- <xsd:element name="NoticeNumbers" type="IntegerListType"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="IntegerListType">
- <xsd:sequence>
- <xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="CounterSignature" type="CounterSignatureType"/>
- <xsd:complexType name="CounterSignatureType">
- <xsd:sequence>
- <xsd:element ref="ds:Signature"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
- <xsd:complexType name="DataObjectFormatType">
- <xsd:sequence>
- <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
- <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
- <xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
- <xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
- <xsd:complexType name="CommitmentTypeIndicationType">
- <xsd:sequence>
- <xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
- <xsd:choice>
- <xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="AllSignedDataObjects"/>
- </xsd:choice>
- <xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CommitmentTypeQualifiersListType">
- <xsd:sequence>
- <xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
- <xsd:complexType name="SignatureProductionPlaceType">
- <xsd:sequence>
- <xsd:element name="City" type="xsd:string" minOccurs="0"/>
- <xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
- <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
- <xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SignerRole" type="SignerRoleType"/>
- <xsd:complexType name="SignerRoleType">
- <xsd:sequence>
- <xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
- <xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="ClaimedRolesListType">
- <xsd:sequence>
- <xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CertifiedRolesListType">
- <xsd:sequence>
- <xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
- <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
- <xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
- <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
- <xsd:complexType name="CompleteCertificateRefsType">
- <xsd:sequence>
- <xsd:element name="CertRefs" type="CertIDListType"/>
- </xsd:sequence>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
- <xsd:complexType name="CompleteRevocationRefsType">
- <xsd:sequence>
- <xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
- <xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
- <xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:complexType name="CRLRefsType">
- <xsd:sequence>
- <xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CRLRefType">
- <xsd:sequence>
- <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
- <xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="CRLIdentifierType">
- <xsd:sequence>
- <xsd:element name="Issuer" type="xsd:string"/>
- <xsd:element name="IssueTime" type="xsd:dateTime"/>
- <xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
- </xsd:complexType>
- <xsd:complexType name="OCSPRefsType">
- <xsd:sequence>
- <xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="OCSPRefType">
- <xsd:sequence>
- <xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
- <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="OCSPIdentifierType">
- <xsd:sequence>
- <xsd:element name="ResponderID" type="xsd:string"/>
- <xsd:element name="ProducedAt" type="xsd:dateTime"/>
- </xsd:sequence>
- <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
- </xsd:complexType>
- <xsd:complexType name="OtherCertStatusRefsType">
- <xsd:sequence>
- <xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
- <xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
- <xsd:element name="CertificateValues" type="CertificateValuesType"/>
- <xsd:complexType name="CertificateValuesType">
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
- <xsd:element name="OtherCertificate" type="AnyType"/>
- </xsd:choice>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:element name="RevocationValues" type="RevocationValuesType"/>
- <xsd:complexType name="RevocationValuesType">
- <xsd:sequence>
- <xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
- <xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
- <xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
- </xsd:complexType>
- <xsd:complexType name="CRLValuesType">
- <xsd:sequence>
- <xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="OCSPValuesType">
- <xsd:sequence>
- <xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="OtherCertStatusValuesType">
- <xsd:sequence>
- <xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
-</xsd:schema>
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.rng Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- http://www.xml.com/lpt/a/2002/01/23/relaxng.html -->
-<!-- http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html -->
-<!-- http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_wildcards_st8.html -->
-<!-- http://lists.oasis-open.org/archives/relax-ng-comment/200206/maillist.html -->
-
-<grammar xmlns='http://relaxng.org/ns/structure/1.0'
- xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- ns="http://www.w3.org/2001/04/xmlenc#"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
- <include href="http://www.w3.org/Signature/Drafts/xmldsig-core/xmldsig-core-schema.rng">
- <!-- Used for DigestMethod, KeyInfoType and anyThing -->
- <!-- Since xmldsig-core also has a start, I have to include it
- in the include for redefinition. -->
- <start>
- <choice>
- <!-- We get to define the permissible root elements! -->
- <element name="EncryptedData"><ref name="EncryptedDataType"/></element>
- <element name="EncryptedKey"><ref name="EncryptedKeyType"/></element>
- </choice>
- </start>
-
- <define name='anyThing'>
- <zeroOrMore>
- <choice>
- <text/>
- <element>
- <anyName>
- <except>
- <nsName/>
- <nsName ns='http://www.w3.org/2000/09/xmldsig#'/>
- </except>
- </anyName>
- <ref name='anyThing'/>
- <zeroOrMore>
- <attribute>
- <anyName/>
- </attribute>
- </zeroOrMore>
- </element>
- </choice>
- </zeroOrMore>
- </define>
-
-
- </include>
-
- <!-- Import definitions from the xmldsig rng -->
-
- <define name="KeyInfoType" combine="interleave">
- <zeroOrMore>
- <choice>
- <element name="EncryptedKey"><ref name="EncryptedKeyType"/></element>
- <element name="AgreementMethod"><ref name="AgreementMethodType"/></element>
- </choice>
- </zeroOrMore>
- </define>
-
- <define name="DigestMethodType" combine="choice">
- <notAllowed/>
- </define>
-
- <define name="TransformType" combine="choice">
- <notAllowed/>
- </define>
-
- <!-- Now redefined in the include statement
- <define name="anyThing" combine="choice">
- <notAllowed/>
- </define>
- -->
-
- <!-- End import -->
-
-
- <define name="EncryptedDataType">
- <ref name="EncryptedType"/>
- </define>
-
-
- <define name="EncryptedKeyType">
- <ref name="EncryptedType"/>
- <optional><element name='ReferenceList'>
- <ref name="ReferenceListType"/></element>
- </optional>
- <optional><element name='CarriedKeyName'><data type="string"/></element></optional>
- <optional><attribute name='Recipient'> <data type="string"/></attribute></optional>
- </define>
-
-
- <define name="EncryptedType">
- <element name="EncryptionMethod"><ref name="EncryptionMethodType"/></element>
- <optional>
- <element name="KeyInfo" ns="http://www.w3.org/2000/09/xmldsig#">
- <ref name="KeyInfoType"/>
- </element>
- </optional>
- <optional>
- <element name="CipherData"><ref name="CipherDataType"/></element>
- </optional>
- <optional>
- <element name="EncryptionProperties"><ref name="EncryptionPropertiesType"/></element>
- </optional>
- <optional><attribute name="Id"><data type="ID"/></attribute></optional>
- <optional><attribute name="Type"><data type="anyURI"/></attribute></optional>
- <optional><attribute name="MimeType"><data type="string"/></attribute></optional>
- <optional><attribute name="Encoding"><data type="anyURI"/></attribute></optional>
- <optional><attribute name='xsi:schemaLocation'/></optional>
- </define>
-
- <define name="EncryptionMethodType">
- <zeroOrMore>
- <choice>
- <element name="KeySize">
- <data type="integer"/>
- </element>
- <element name="OAEPparams">
- <data type="base64Binary"/>
- </element>
- <text/>
- <element name='DigestMethod' ns="http://www.w3.org/2000/09/xmldsig#">
- <ref name="DigestMethodType"/>
- </element>
- </choice>
- </zeroOrMore>
- <attribute name="Algorithm"><data type="anyURI"/></attribute>
- </define>
-
-
- <define name="AgreementMethodType">
- <zeroOrMore>
- <choice>
- <element name="KA-Nonce">
- <data type="base64Binary"/>
- </element>
- <element name='DigestMethod' ns="http://www.w3.org/2000/09/xmldsig#">
- <ref name="DigestMethodType"/>
- </element>
- <text/>
- <element>
- <nsName ns="http://www.w3.org/2000/09/xmldsig#"/>
- <ref name="anyThing"/>
- </element>
- <element name="OriginatorKeyInfo"><ref name="KeyInfoType"/></element>
- <element name="RecipientKeyInfo"><ref name="KeyInfoType"/></element>
- </choice>
- </zeroOrMore>
- <attribute name="Algorithm"><data type="anyURI"/></attribute>
- </define>
-
-
- <define name="ReferenceListType">
- <oneOrMore>
- <choice>
- <element name="DataReference">
- <text/>
- <attribute name="URI"><data type="anyURI"/></attribute>
- </element>
- <element name="KeyReference">
- <text/>
- <attribute name="URI"><data type="anyURI"/></attribute>
- </element>
- </choice>
- </oneOrMore>
- </define>
-
-
- <define name="CipherDataType">
- <choice>
- <element name="CipherValue"><data type="base64Binary"/></element>
- <element name="CipherReference">
- <element name="Transforms">
- <oneOrMore>
- <element name='Transform' ns="http://www.w3.org/2000/09/xmldsig#">
- <ref name='TransformType'/>
- </element>
- </oneOrMore>
- </element>
- <attribute name="URI">
- <data type="anyURI"/>
- </attribute>
- </element>
- </choice>
- </define>
-
-
- <define name="EncryptionPropertiesType">
- <element name="EncryptionProperty">
- <zeroOrMore>
- <element>
- <anyName/>
- <text/>
- </element>
- </zeroOrMore>
- <optional>
- <attribute name="Target">
- <data type="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="Id">
- <data type="ID"/>
- </attribute>
- </optional>
- </element>
-
- <optional>
- <attribute name="Id">
- <data type="ID"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <attribute><nsName ns="http://www.w3.org/XML/1998/namespace"/></attribute>
- </zeroOrMore>
- </define>
-
-</grammar>
\ No newline at end of file
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.xsd Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
- "http://www.w3.org/2001/XMLSchema.dtd"
- [
- <!ATTLIST schema
- xmlns:xenc CDATA #FIXED 'http://www.w3.org/2001/04/xmlenc#'
- xmlns:ds CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'>
- <!ENTITY xenc 'http://www.w3.org/2001/04/xmlenc#'>
- <!ENTITY % p ''>
- <!ENTITY % s ''>
- ]>
-
-<schema xmlns='http://www.w3.org/2001/XMLSchema' version='1.0'
- xmlns:xenc='http://www.w3.org/2001/04/xmlenc#'
- xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
- targetNamespace='http://www.w3.org/2001/04/xmlenc#'
- elementFormDefault='qualified'>
-
- <import namespace='http://www.w3.org/2000/09/xmldsig#'
- schemaLocation='http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'/>
-
- <complexType name='EncryptedType' abstract='true'>
- <sequence>
- <element name='EncryptionMethod' type='xenc:EncryptionMethodType'
- minOccurs='0'/>
- <element ref='ds:KeyInfo' minOccurs='0'/>
- <element ref='xenc:CipherData'/>
- <element ref='xenc:EncryptionProperties' minOccurs='0'/>
- </sequence>
- <attribute name='Id' type='ID' use='optional'/>
- <attribute name='Type' type='anyURI' use='optional'/>
- <attribute name='MimeType' type='string' use='optional'/>
- <attribute name='Encoding' type='anyURI' use='optional'/>
- </complexType>
-
- <complexType name='EncryptionMethodType' mixed='true'>
- <sequence>
- <element name='KeySize' minOccurs='0' type='xenc:KeySizeType'/>
- <element name='OAEPparams' minOccurs='0' type='base64Binary'/>
- <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
- </sequence>
- <attribute name='Algorithm' type='anyURI' use='required'/>
- </complexType>
-
- <simpleType name='KeySizeType'>
- <restriction base="integer"/>
- </simpleType>
-
- <element name='CipherData' type='xenc:CipherDataType'/>
- <complexType name='CipherDataType'>
- <choice>
- <element name='CipherValue' type='base64Binary'/>
- <element ref='xenc:CipherReference'/>
- </choice>
- </complexType>
-
- <element name='CipherReference' type='xenc:CipherReferenceType'/>
- <complexType name='CipherReferenceType'>
- <choice>
- <element name='Transforms' type='xenc:TransformsType' minOccurs='0'/>
- </choice>
- <attribute name='URI' type='anyURI' use='required'/>
- </complexType>
-
- <complexType name='TransformsType'>
- <sequence>
- <element ref='ds:Transform' maxOccurs='unbounded'/>
- </sequence>
- </complexType>
-
-
- <element name='EncryptedData' type='xenc:EncryptedDataType'/>
- <complexType name='EncryptedDataType'>
- <complexContent>
- <extension base='xenc:EncryptedType'>
- </extension>
- </complexContent>
- </complexType>
-
- <!-- Children of ds:KeyInfo -->
-
- <element name='EncryptedKey' type='xenc:EncryptedKeyType'/>
- <complexType name='EncryptedKeyType'>
- <complexContent>
- <extension base='xenc:EncryptedType'>
- <sequence>
- <element ref='xenc:ReferenceList' minOccurs='0'/>
- <element name='CarriedKeyName' type='string' minOccurs='0'/>
- </sequence>
- <attribute name='Recipient' type='string'
- use='optional'/>
- </extension>
- </complexContent>
- </complexType>
-
- <element name="AgreementMethod" type="xenc:AgreementMethodType"/>
- <complexType name="AgreementMethodType" mixed="true">
- <sequence>
- <element name="KA-Nonce" minOccurs="0" type="base64Binary"/>
- <!-- <element ref="ds:DigestMethod" minOccurs="0"/> -->
- <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- <element name="OriginatorKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
- <element name="RecipientKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
- </sequence>
- <attribute name="Algorithm" type="anyURI" use="required"/>
- </complexType>
-
- <!-- End Children of ds:KeyInfo -->
-
- <element name='ReferenceList'>
- <complexType>
- <choice minOccurs='1' maxOccurs='unbounded'>
- <element name='DataReference' type='xenc:ReferenceType'/>
- <element name='KeyReference' type='xenc:ReferenceType'/>
- </choice>
- </complexType>
- </element>
-
- <complexType name='ReferenceType'>
- <sequence>
- <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
- </sequence>
- <attribute name='URI' type='anyURI' use='required'/>
- </complexType>
-
-
- <element name='EncryptionProperties' type='xenc:EncryptionPropertiesType'/>
- <complexType name='EncryptionPropertiesType'>
- <sequence>
- <element ref='xenc:EncryptionProperty' maxOccurs='unbounded'/>
- </sequence>
- <attribute name='Id' type='ID' use='optional'/>
- </complexType>
-
- <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/>
- <complexType name='EncryptionPropertyType' mixed='true'>
- <choice maxOccurs='unbounded'>
- <any namespace='##other' processContents='lax'/>
- </choice>
- <attribute name='Target' type='anyURI' use='optional'/>
- <attribute name='Id' type='ID' use='optional'/>
- <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/>
- </complexType>
-
-</schema>
-
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.dtd Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-<!-- DTD for XML Signatures
- http://www.w3.org/2000/09/xmldsig#
- Joseph Reagle $last changed 20001215$
-
- http://www.w3.org/2000/09/xmldsig#
- $Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
-
- Copyright 2001 The Internet Society and W3C (Massachusetts Institute
- of Technology, Institut National de Recherche en Informatique et en
- Automatique, Keio University). All Rights Reserved.
- http://www.w3.org/Consortium/Legal/
-
- This document is governed by the W3C Software License [1] as described
- in the FAQ [2].
-
- [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
- [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
--->
-
-
-<!--
-
-The following entity declarations enable external/flexible content in
-the Signature content model.
-
-#PCDATA emulates schema string; when combined with element types it
-emulates schema's mixed content type.
-
-%foo.ANY permits the user to include their own element types from
-other namespaces, for example:
- <!ENTITY % KeyValue.ANY '| ecds:ECDSAKeyValue'>
- ...
- <!ELEMENT ecds:ECDSAKeyValue (#PCDATA) >
-
--->
-
-<!ENTITY % Object.ANY ''>
-<!ENTITY % Method.ANY ''>
-<!ENTITY % Transform.ANY ''>
-<!ENTITY % SignatureProperty.ANY ''>
-<!ENTITY % KeyInfo.ANY ''>
-<!ENTITY % KeyValue.ANY ''>
-<!ENTITY % PGPData.ANY ''>
-<!ENTITY % X509Data.ANY ''>
-<!ENTITY % SPKIData.ANY ''>
-
-
-
-<!-- Start Core Signature declarations, these should NOT be altered -->
-
-<!ELEMENT Signature (SignedInfo, SignatureValue, KeyInfo?, Object*) >
-<!ATTLIST Signature
- xmlns CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'
- Id ID #IMPLIED >
-
-<!ELEMENT SignatureValue (#PCDATA) >
-<!ATTLIST SignatureValue
- Id ID #IMPLIED>
-
-<!ELEMENT SignedInfo (CanonicalizationMethod,
- SignatureMethod, Reference+) >
-<!ATTLIST SignedInfo
- Id ID #IMPLIED
->
-
-<!ELEMENT CanonicalizationMethod (#PCDATA %Method.ANY;)* >
-<!ATTLIST CanonicalizationMethod
- Algorithm CDATA #REQUIRED >
-
-<!ELEMENT SignatureMethod (#PCDATA|HMACOutputLength %Method.ANY;)* >
-<!ATTLIST SignatureMethod
- Algorithm CDATA #REQUIRED >
-
-<!ELEMENT Reference (Transforms?, DigestMethod, DigestValue) >
-<!ATTLIST Reference
- Id ID #IMPLIED
- URI CDATA #IMPLIED
- Type CDATA #IMPLIED>
-
-
-<!ELEMENT Transforms (Transform+)>
-
-<!ELEMENT Transform (#PCDATA|XPath %Transform.ANY;)* >
-<!ATTLIST Transform
- Algorithm CDATA #REQUIRED >
-
-<!ELEMENT XPath (#PCDATA) >
-
-<!ELEMENT DigestMethod (#PCDATA %Method.ANY;)* >
-<!ATTLIST DigestMethod
- Algorithm CDATA #REQUIRED >
-
-<!ELEMENT DigestValue (#PCDATA) >
-
-<!ELEMENT KeyInfo (#PCDATA|KeyName|KeyValue|RetrievalMethod|
- X509Data|PGPData|SPKIData|MgmtData %KeyInfo.ANY;)* >
-<!ATTLIST KeyInfo
- Id ID #IMPLIED >
-
-<!-- Key Information -->
-
-<!ELEMENT KeyName (#PCDATA) >
-<!ELEMENT KeyValue (#PCDATA|DSAKeyValue|RSAKeyValue %KeyValue.ANY;)* >
-<!ELEMENT MgmtData (#PCDATA) >
-
-<!ELEMENT RetrievalMethod (Transforms?) >
-<!ATTLIST RetrievalMethod
- URI CDATA #REQUIRED
- Type CDATA #IMPLIED >
-
-<!-- X.509 Data -->
-
-<!ELEMENT X509Data ((X509IssuerSerial | X509SKI | X509SubjectName |
- X509Certificate | X509CRL )+ %X509Data.ANY;)>
-<!ELEMENT X509IssuerSerial (X509IssuerName, X509SerialNumber) >
-<!ELEMENT X509IssuerName (#PCDATA) >
-<!ELEMENT X509SubjectName (#PCDATA) >
-<!ELEMENT X509SerialNumber (#PCDATA) >
-<!ELEMENT X509SKI (#PCDATA) >
-<!ELEMENT X509Certificate (#PCDATA) >
-<!ELEMENT X509CRL (#PCDATA) >
-
-<!-- PGPData -->
-
-<!ELEMENT PGPData ((PGPKeyID, PGPKeyPacket?) | (PGPKeyPacket) %PGPData.ANY;) >
-<!ELEMENT PGPKeyPacket (#PCDATA) >
-<!ELEMENT PGPKeyID (#PCDATA) >
-
-<!-- SPKI Data -->
-
-<!ELEMENT SPKIData (SPKISexp %SPKIData.ANY;) >
-<!ELEMENT SPKISexp (#PCDATA) >
-
-<!-- Extensible Content -->
-
-<!ELEMENT Object (#PCDATA|Signature|SignatureProperties|Manifest %Object.ANY;)* >
-<!ATTLIST Object
- Id ID #IMPLIED
- MimeType CDATA #IMPLIED
- Encoding CDATA #IMPLIED >
-
-<!ELEMENT Manifest (Reference+) >
-<!ATTLIST Manifest
- Id ID #IMPLIED >
-
-<!ELEMENT SignatureProperties (SignatureProperty+) >
-<!ATTLIST SignatureProperties
- Id ID #IMPLIED >
-
-<!ELEMENT SignatureProperty (#PCDATA %SignatureProperty.ANY;)* >
-<!ATTLIST SignatureProperty
- Target CDATA #REQUIRED
- Id ID #IMPLIED >
-
-<!-- Algorithm Parameters -->
-
-<!ELEMENT HMACOutputLength (#PCDATA) >
-
-<!ELEMENT DSAKeyValue ((P, Q)?, G?, Y, J?, (Seed, PgenCounter)?) >
-<!ELEMENT P (#PCDATA) >
-<!ELEMENT Q (#PCDATA) >
-<!ELEMENT G (#PCDATA) >
-<!ELEMENT Y (#PCDATA) >
-<!ELEMENT J (#PCDATA) >
-<!ELEMENT Seed (#PCDATA) >
-<!ELEMENT PgenCounter (#PCDATA) >
-
-<!ELEMENT RSAKeyValue (Modulus, Exponent) >
-<!ELEMENT Modulus (#PCDATA) >
-<!ELEMENT Exponent (#PCDATA) >
-
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.rng Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- http://www.xml.com/lpt/a/2002/01/23/relaxng.html -->
-<!-- http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html -->
-<!-- http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_wildcards_st8.html -->
-<!-- http://lists.oasis-open.org/archives/relax-ng-comment/200206/maillist.html -->
-
-<grammar xmlns='http://relaxng.org/ns/structure/1.0'
- xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
- xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
- ns='http://www.w3.org/2000/09/xmldsig#'
- datatypeLibrary='http://www.w3.org/2001/XMLSchema-datatypes'>
-
- <start>
- <element name='Signature'><ref name='SignatureType'/></element>
- </start>
-
- <define name='CryptoBinary'>
- <data type='base64Binary'/>
- </define>
-
- <define name='SignatureType'>
- <element name='SignedInfo'><ref name='SignedInfoType'/></element>
- <element name='SignatureValue'><ref name='SignatureValueType'/></element>
- <optional><element name='KeyInfo'><ref name='KeyInfoType'/></element></optional>
- <zeroOrMore><element name='Object'><ref name='ObjectType'/></element></zeroOrMore>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
- <optional><attribute name='xsi:schemaLocation'/></optional>
- </define>
-
- <define name='SignatureValueType'>
- <data type='base64Binary'/>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
- </define>
-
-<!-- Start SignedInfo -->
-
- <define name='SignedInfoType'>
- <element name='CanonicalizationMethod'><ref name='CanonicalizationMethodType'/></element>
- <element name='SignatureMethod'><ref name='SignatureMethodType'/></element>
- <optional><element name='KeyInfo'><ref name='KeyInfoType'/></element></optional>
- <oneOrMore><element name='Reference'><ref name='ReferenceType'/></element></oneOrMore>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
- </define>
-
- <define name='CanonicalizationMethodType'>
- <zeroOrMore><ref name='anyThing'/></zeroOrMore>
- <optional><attribute name='Algorithm'><data type='anyURI'/></attribute></optional>
- </define>
-
-
- <define name='SignatureMethodType'>
- <optional><element name='HMACOutputLength'><data type='integer'/></element></optional>
- <zeroOrMore><ref name='anyThing'/></zeroOrMore>
- <optional><attribute name='Algorithm'><data type='anyURI'/></attribute></optional>
- </define>
-
-<!-- Start Reference -->
-
- <define name='ReferenceType'>
- <optional><element name='Transforms'><ref name='TransformsType'/></element></optional>
- <element name='DigestMethod'><ref name='DigestMethodType'/></element>
- <element name='DigestValue'><ref name='DigestValueType'/></element>
- <optional><attribute name='Type'><data type='anyURI'/></attribute></optional>
- <optional><attribute name='URI'><data type='anyURI'/></attribute></optional>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
- </define>
-
- <define name='TransformsType'>
- <oneOrMore><element name='Transform'><ref name='TransformType'/></element></oneOrMore>
- </define>
-
- <define name='TransformType'>
- <optional><element name='XPath'><data type='string'/></element></optional>
- <zeroOrMore><ref name='anyThing'/></zeroOrMore>
- <attribute name='Algorithm'><data type='anyURI'/></attribute>
- </define>
-
-<!-- End Reference -->
-
- <define name='DigestMethodType'>
- <zeroOrMore><ref name='anyThing'/></zeroOrMore>
- <attribute name='Algorithm'><data type='anyURI'/></attribute>
- </define>
-
- <define name='DigestValueType'>
- <data type='base64Binary'/>
- </define>
-
-<!-- End SignedInfo -->
-
-<!-- Start KeyInfo -->
-
- <define name='KeyInfoType'>
- <oneOrMore>
- <choice>
- <element name='KeyName'><data type='string'/></element>
- <element name='KeyValue'><ref name='KeyValueType'/></element>
- <element name='RetrievalMethod'><ref name='RetrievalMethodType'/></element>
- <element name='X509Data'><ref name='X509DataType'/></element>
- <element name='PGPData'><ref name='PGPDataType'/></element>
- <element name='SPKIData'><ref name='SPKIDataType'/></element>
- <element name='MgmtData'><data type='string'/></element>
- <ref name='anyThing'/>
- </choice>
- </oneOrMore>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
-</define>
-
- <define name='KeyValueType'>
- <choice>
- <text/>
- <element name='DSAKeyValue'><ref name='DSAKeyValueType'/></element>
- <element name='RSAKeyValue'><ref name='RSAKeyValueType'/></element>
- <ref name='anyThing'/>
- </choice>
- </define>
-
- <define name='RetrievalMethodType'>
- <optional><element name='Transforms'><ref name='TransformsType'/></element></optional>
- <optional><attribute name='Type'><data type='anyURI'/></attribute></optional>
- <optional><attribute name='URI'><data type='anyURI'/></attribute></optional>
- </define>
-
-<!-- Start X509Data -->
-
- <define name='X509DataType'>
- <oneOrMore>
- <choice>
- <element name='X509IssuerSerial'>
- <element name='X509IssuerName'>
- <data type='string'/>
- </element>
- <element name='X509SerialNumber'>
- <data type='integer'/>
- </element>
- </element>
- <element name='X509SKI'>
- <data type='base64Binary'/>
- </element>
- <element name='X509SubjectName'>
- <data type='string'/>
- </element>
- <element name='X509Certificate'>
- <data type='base64Binary'/>
- </element>
- <element name='X509CRL'>
- <data type='base64Binary'/>
- </element>
- <ref name='anyThing'/>
- </choice>
- </oneOrMore>
- </define>
-
-<!-- End X509Data -->
-
-<!-- Begin PGPData -->
-
- <define name='PGPDataType'>
- <choice>
- <group>
- <element name='PGPKeyID'>
- <data type='base64Binary'/>
- </element>
- <optional>
- <element name='PGPKeyPacket'>
- <data type='base64Binary'/>
- </element>
- </optional>
- <zeroOrMore>
- <ref name='anyThing'/>
- </zeroOrMore>
- </group>
- <group>
- <element name='PGPKeyPacket'>
- <data type='base64Binary'/>
- </element>
- <zeroOrMore>
- <ref name='anyThing'/>
- </zeroOrMore>
- </group>
- </choice>
- </define>
-
-<!-- End PGPData -->
-
-<!-- Begin SPKIData -->
-
- <define name='SPKIDataType'>
- <oneOrMore>
- <element name='SPKISexp'>
- <data type='base64Binary'/>
- </element>
- <optional>
- <ref name='anyThing'/>
- </optional>
- </oneOrMore>
- </define>
-
-<!-- End SPKIData -->
-
-<!-- End KeyInfo -->
-
-
-<!-- Start Object (Manifest, SignatureProperty) -->
-
- <define name='ObjectType'>
- <zeroOrMore>
- <choice>
- <element name='Manifest'><ref name='ManifestType'/></element>
- <element name='SignatureProperties'><ref name='SignaturePropertiesType'/></element>
- <ref name='anyThing'/>
- </choice>
- </zeroOrMore>
- <optional>
- <attribute name='Encoding'>
- <data type='anyURI'/>
- </attribute>
- </optional>
- <optional>
- <attribute name='MimeType'>
- <data type='string'/>
- </attribute>
- </optional>
- <optional>
- <attribute name='Id'>
- <data type='ID'/>
- </attribute>
- </optional>
- </define>
-
- <define name='ManifestType'>
- <oneOrMore>
- <element name='Reference'><ref name='ReferenceType'/></element>
- </oneOrMore>
- <optional><attribute name='Id'><data type='ID'/></attribute></optional>
- </define>
-
- <define name='SignaturePropertiesType'>
- <oneOrMore>
- <element name='SignatureProperty'><ref name='SignaturePropertyType'/></element>
- </oneOrMore>
- <optional>
- <attribute name='Id'>
- <data type='ID'/>
- </attribute>
- </optional>
- </define>
-
- <define name='SignaturePropertyType'>
- <oneOrMore><ref name='anyThing'/></oneOrMore>
- <optional>
- <attribute name='Id'>
- <data type='ID'/>
- </attribute>
- </optional>
- <attribute name='Target'>
- <data type='anyURI'/>
- </attribute>
- </define>
-
-<!-- End Object (Manifest, SignatureProperty) -->
-
-
-<!-- Start KeyValue Element-types -->
-
- <define name='DSAKeyValueType'>
- <optional>
- <element name='P'>
- <ref name='CryptoBinary'/>
- </element>
- <element name='Q'>
- <ref name='CryptoBinary'/>
- </element>
- </optional>
- <optional>
- <element name='G'>
- <ref name='CryptoBinary'/>
- </element>
- </optional>
- <element name='Y'>
- <ref name='CryptoBinary'/>
- </element>
- <optional>
- <element name='J'>
- <ref name='CryptoBinary'/>
- </element>
- </optional>
- <optional>
- <element name='Seed'>
- <ref name='CryptoBinary'/>
- </element>
- <element name='PgenCounter'>
- <ref name='CryptoBinary'/>
- </element>
- </optional>
- </define>
-
- <define name='RSAKeyValueType'>
- <element name='Modulus'>
- <ref name='CryptoBinary'/>
- </element>
- <element name='Exponent'>
- <ref name='CryptoBinary'/>
- </element>
- </define>
-
-
-<!-- End KeyValue Element-types -->
-
-<!-- End Signature -->
-
-
- <!-- This should emulate the ANY content model under lax validation -->
- <define name='anyThing'>
- <zeroOrMore>
- <choice>
- <text/>
- <element>
- <!-- "except" provided for DTD compatibility -->
- <!-- [1] ns='http://www.oasis-open.org/committees/relax-ng/compatibility.html#id' -->
- <anyName>
- <except>
- <nsName/>
- <!-- <nsName ns='http://www.w3.org/2001/04/xmlenc#'/> -->
- </except>
- </anyName>
- <ref name='anyThing'/>
- <zeroOrMore>
- <attribute>
- <anyName/>
- </attribute>
- </zeroOrMore>
- </element>
- </choice>
- </zeroOrMore>
- </define>
-
-
-</grammar>
\ No newline at end of file
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.xsd Tue Jun 03 07:34:35 2014 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE schema
- PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
- [
- <!ATTLIST schema
- xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
- <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
- <!ENTITY % p ''>
- <!ENTITY % s ''>
- ]>
-
-<!-- Schema for XML Signatures
- http://www.w3.org/2000/09/xmldsig#
- $Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
-
- Copyright 2001 The Internet Society and W3C (Massachusetts Institute
- of Technology, Institut National de Recherche en Informatique et en
- Automatique, Keio University). All Rights Reserved.
- http://www.w3.org/Consortium/Legal/
-
- This document is governed by the W3C Software License [1] as described
- in the FAQ [2].
-
- [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
- [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
--->
-
-
-<schema xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
- targetNamespace="http://www.w3.org/2000/09/xmldsig#"
- version="0.1" elementFormDefault="qualified">
-
-<!-- Basic Types Defined for Signatures -->
-
-<simpleType name="CryptoBinary">
- <restriction base="base64Binary">
- </restriction>
-</simpleType>
-
-<!-- Start Signature -->
-
-<element name="Signature" type="ds:SignatureType"/>
-<complexType name="SignatureType">
- <sequence>
- <element ref="ds:SignedInfo"/>
- <element ref="ds:SignatureValue"/>
- <element ref="ds:KeyInfo" minOccurs="0"/>
- <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
-</complexType>
-
- <element name="SignatureValue" type="ds:SignatureValueType"/>
- <complexType name="SignatureValueType">
- <simpleContent>
- <extension base="base64Binary">
- <attribute name="Id" type="ID" use="optional"/>
- </extension>
- </simpleContent>
- </complexType>
-
-<!-- Start SignedInfo -->
-
-<element name="SignedInfo" type="ds:SignedInfoType"/>
-<complexType name="SignedInfoType">
- <sequence>
- <element ref="ds:CanonicalizationMethod"/>
- <element ref="ds:SignatureMethod"/>
- <element ref="ds:Reference" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
-</complexType>
-
- <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
- <complexType name="CanonicalizationMethodType" mixed="true">
- <sequence>
- <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
- <!-- (0,unbounded) elements from (1,1) namespace -->
- </sequence>
- <attribute name="Algorithm" type="anyURI" use="required"/>
- </complexType>
-
- <element name="SignatureMethod" type="ds:SignatureMethodType"/>
- <complexType name="SignatureMethodType" mixed="true">
- <sequence>
- <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
- <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
- <!-- (0,unbounded) elements from (1,1) external namespace -->
- </sequence>
- <attribute name="Algorithm" type="anyURI" use="required"/>
- </complexType>
-
-<!-- Start Reference -->
-
-<element name="Reference" type="ds:ReferenceType"/>
-<complexType name="ReferenceType">
- <sequence>
- <element ref="ds:Transforms" minOccurs="0"/>
- <element ref="ds:DigestMethod"/>
- <element ref="ds:DigestValue"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
- <attribute name="URI" type="anyURI" use="optional"/>
- <attribute name="Type" type="anyURI" use="optional"/>
-</complexType>
-
- <element name="Transforms" type="ds:TransformsType"/>
- <complexType name="TransformsType">
- <sequence>
- <element ref="ds:Transform" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
-
- <element name="Transform" type="ds:TransformType"/>
- <complexType name="TransformType" mixed="true">
- <choice minOccurs="0" maxOccurs="unbounded">
- <any namespace="##other" processContents="lax"/>
- <!-- (1,1) elements from (0,unbounded) namespaces -->
- <element name="XPath" type="string"/>
- </choice>
- <attribute name="Algorithm" type="anyURI" use="required"/>
- </complexType>
-
-<!-- End Reference -->
-
-<element name="DigestMethod" type="ds:DigestMethodType"/>
-<complexType name="DigestMethodType" mixed="true">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="Algorithm" type="anyURI" use="required"/>
-</complexType>
-
-<element name="DigestValue" type="ds:DigestValueType"/>
-<simpleType name="DigestValueType">
- <restriction base="base64Binary"/>
-</simpleType>
-
-<!-- End SignedInfo -->
-
-<!-- Start KeyInfo -->
-
-<element name="KeyInfo" type="ds:KeyInfoType"/>
-<complexType name="KeyInfoType" mixed="true">
- <choice maxOccurs="unbounded">
- <element ref="ds:KeyName"/>
- <element ref="ds:KeyValue"/>
- <element ref="ds:RetrievalMethod"/>
- <element ref="ds:X509Data"/>
- <element ref="ds:PGPData"/>
- <element ref="ds:SPKIData"/>
- <element ref="ds:MgmtData"/>
- <any processContents="lax" namespace="##other"/>
- <!-- (1,1) elements from (0,unbounded) namespaces -->
- </choice>
- <attribute name="Id" type="ID" use="optional"/>
-</complexType>
-
- <element name="KeyName" type="string"/>
- <element name="MgmtData" type="string"/>
-
- <element name="KeyValue" type="ds:KeyValueType"/>
- <complexType name="KeyValueType" mixed="true">
- <choice>
- <element ref="ds:DSAKeyValue"/>
- <element ref="ds:RSAKeyValue"/>
- <any namespace="##other" processContents="lax"/>
- </choice>
- </complexType>
-
- <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
- <complexType name="RetrievalMethodType">
- <sequence>
- <element ref="ds:Transforms" minOccurs="0"/>
- </sequence>
- <attribute name="URI" type="anyURI"/>
- <attribute name="Type" type="anyURI" use="optional"/>
- </complexType>
-
-<!-- Start X509Data -->
-
-<element name="X509Data" type="ds:X509DataType"/>
-<complexType name="X509DataType">
- <sequence maxOccurs="unbounded">
- <choice>
- <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
- <element name="X509SKI" type="base64Binary"/>
- <element name="X509SubjectName" type="string"/>
- <element name="X509Certificate" type="base64Binary"/>
- <element name="X509CRL" type="base64Binary"/>
- <any namespace="##other" processContents="lax"/>
- </choice>
- </sequence>
-</complexType>
-
-<complexType name="X509IssuerSerialType">
- <sequence>
- <element name="X509IssuerName" type="string"/>
- <element name="X509SerialNumber" type="integer"/>
- </sequence>
-</complexType>
-
-<!-- End X509Data -->
-
-<!-- Begin PGPData -->
-
-<element name="PGPData" type="ds:PGPDataType"/>
-<complexType name="PGPDataType">
- <choice>
- <sequence>
- <element name="PGPKeyID" type="base64Binary"/>
- <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
- <any namespace="##other" processContents="lax" minOccurs="0"
- maxOccurs="unbounded"/>
- </sequence>
- <sequence>
- <element name="PGPKeyPacket" type="base64Binary"/>
- <any namespace="##other" processContents="lax" minOccurs="0"
- maxOccurs="unbounded"/>
- </sequence>
- </choice>
-</complexType>
-
-<!-- End PGPData -->
-
-<!-- Begin SPKIData -->
-
-<element name="SPKIData" type="ds:SPKIDataType"/>
-<complexType name="SPKIDataType">
- <sequence maxOccurs="unbounded">
- <element name="SPKISexp" type="base64Binary"/>
- <any namespace="##other" processContents="lax" minOccurs="0"/>
- </sequence>
-</complexType>
-
-<!-- End SPKIData -->
-
-<!-- End KeyInfo -->
-
-<!-- Start Object (Manifest, SignatureProperty) -->
-
-<element name="Object" type="ds:ObjectType"/>
-<complexType name="ObjectType" mixed="true">
- <sequence minOccurs="0" maxOccurs="unbounded">
- <any namespace="##any" processContents="lax"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
- <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
- <attribute name="Encoding" type="anyURI" use="optional"/>
-</complexType>
-
-<element name="Manifest" type="ds:ManifestType"/>
-<complexType name="ManifestType">
- <sequence>
- <element ref="ds:Reference" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
-</complexType>
-
-<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
-<complexType name="SignaturePropertiesType">
- <sequence>
- <element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="Id" type="ID" use="optional"/>
-</complexType>
-
- <element name="SignatureProperty" type="ds:SignaturePropertyType"/>
- <complexType name="SignaturePropertyType" mixed="true">
- <choice maxOccurs="unbounded">
- <any namespace="##other" processContents="lax"/>
- <!-- (1,1) elements from (1,unbounded) namespaces -->
- </choice>
- <attribute name="Target" type="anyURI" use="required"/>
- <attribute name="Id" type="ID" use="optional"/>
- </complexType>
-
-<!-- End Object (Manifest, SignatureProperty) -->
-
-<!-- Start Algorithm Parameters -->
-
-<simpleType name="HMACOutputLengthType">
- <restriction base="integer"/>
-</simpleType>
-
-<!-- Start KeyValue Element-types -->
-
-<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
-<complexType name="DSAKeyValueType">
- <sequence>
- <sequence minOccurs="0">
- <element name="P" type="ds:CryptoBinary"/>
- <element name="Q" type="ds:CryptoBinary"/>
- </sequence>
- <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
- <element name="Y" type="ds:CryptoBinary"/>
- <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
- <sequence minOccurs="0">
- <element name="Seed" type="ds:CryptoBinary"/>
- <element name="PgenCounter" type="ds:CryptoBinary"/>
- </sequence>
- </sequence>
-</complexType>
-
-<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
-<complexType name="RSAKeyValueType">
- <sequence>
- <element name="Modulus" type="ds:CryptoBinary"/>
- <element name="Exponent" type="ds:CryptoBinary"/>
- </sequence>
-</complexType>
-
-<!-- End KeyValue Element-types -->
-
-<!-- End Signature -->
-
-</schema>
--- a/jdk/src/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -303,7 +303,7 @@
offset = pname.length() - 1;
- while ((last = pname.lastIndexOf(".", offset)) != -1) {
+ while ((last = pname.lastIndexOf('.', offset)) != -1) {
pname = pname.substring(0, last+1) + "*";
x = permissions.get(pname);
@@ -318,7 +318,7 @@
pname = p.getName();
offset = pname.length() - 1;
- while ((last = pname.lastIndexOf("=", offset)) != -1) {
+ while ((last = pname.lastIndexOf('=', offset)) != -1) {
pname = pname.substring(0, last+1) + "*";
x = permissions.get(pname);
--- a/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -6831,7 +6831,7 @@
// table name else isolate table name.
indexFrom = command.toLowerCase().indexOf("from");
- indexComma = command.indexOf(",", indexFrom);
+ indexComma = command.indexOf(',', indexFrom);
if(indexComma == -1) {
// implies only one table
--- a/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rowset/JoinRowSetImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -910,7 +910,7 @@
// now remove the last ","
strWhereClause = strWhereClause.substring
- (0, strWhereClause.lastIndexOf(","));
+ (0, strWhereClause.lastIndexOf(','));
// Add from clause
strWhereClause = strWhereClause.concat(" from ");
@@ -920,7 +920,7 @@
//Remove the last ","
strWhereClause = strWhereClause.substring
- (0, strWhereClause.lastIndexOf(","));
+ (0, strWhereClause.lastIndexOf(','));
// Add the where clause
strWhereClause = strWhereClause.concat(" where ");
--- a/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlWriter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rowset/internal/WebRowSetXmlWriter.java Tue Jun 03 07:35:35 2014 -0400
@@ -240,7 +240,7 @@
// Remove the string after "@xxxx"
// before writing it to the xml file.
String strProviderInstance = (caller.getSyncProvider()).toString();
- String strProvider = strProviderInstance.substring(0, (caller.getSyncProvider()).toString().indexOf("@"));
+ String strProvider = strProviderInstance.substring(0, (caller.getSyncProvider()).toString().indexOf('@'));
propString("sync-provider-name", strProvider);
propString("sync-provider-vendor", "Oracle Corporation");
--- a/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java Tue Jun 03 07:35:35 2014 -0400
@@ -1147,7 +1147,7 @@
if (nullValue) {
rs.setSyncProvider(null);
} else {
- String str = s.substring(0,s.indexOf("@")+1);
+ String str = s.substring(0,s.indexOf('@')+1);
rs.setSyncProvider(str);
}
break;
--- a/jdk/src/share/classes/com/sun/rowset/internal/XmlResolver.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/rowset/internal/XmlResolver.java Tue Jun 03 07:35:35 2014 -0400
@@ -39,7 +39,7 @@
public class XmlResolver implements EntityResolver {
public InputSource resolveEntity(String publicId, String systemId) {
- String schemaName = systemId.substring(systemId.lastIndexOf("/"));
+ String schemaName = systemId.substring(systemId.lastIndexOf('/'));
if(systemId.startsWith("http://java.sun.com/xml/ns/jdbc")) {
return new InputSource(this.getClass().getResourceAsStream(schemaName));
--- a/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/security/auth/module/JndiLoginModule.java Tue Jun 03 07:35:35 2014 -0400
@@ -694,7 +694,7 @@
throw new LoginException("Error: no CallbackHandler available " +
"to garner authentication information from the user");
- String protocol = userProvider.substring(0, userProvider.indexOf(":"));
+ String protocol = userProvider.substring(0, userProvider.indexOf(':'));
Callback[] callbacks = new Callback[2];
callbacks[0] = new NameCallback(protocol + " "
--- a/jdk/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/security/auth/module/LdapLoginModule.java Tue Jun 03 07:35:35 2014 -0400
@@ -400,7 +400,7 @@
// Add any JNDI properties to the environment
for (String key : options.keySet()) {
- if (key.indexOf(".") > -1) {
+ if (key.indexOf('.') > -1) {
ldapEnvironment.put(key, options.get(key));
}
}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java Tue Jun 03 07:35:35 2014 -0400
@@ -857,7 +857,7 @@
bpSpec = runtime.createClassLineBreakpoint(classId, lineNumber);
} else {
// Try stripping method from class.method token.
- int idot = token.lastIndexOf(".");
+ int idot = token.lastIndexOf('.');
if ( (idot <= 0) || /* No dot or dot in first char */
(idot >= token.length() - 1) ) { /* dot in last char */
return null;
--- a/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/tty/Commands.java Tue Jun 03 07:35:35 2014 -0400
@@ -1079,7 +1079,7 @@
}
} else {
// Try stripping method from class.method token.
- int idot = token.lastIndexOf(".");
+ int idot = token.lastIndexOf('.');
if ( (idot <= 0) || /* No dot or dot in first char */
(idot >= token.length() - 1) ) { /* dot in last char */
printBreakpointCommandUsage(atForm, inForm);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java Tue Jun 03 07:35:35 2014 -0400
@@ -67,7 +67,7 @@
continue;
}
String name = clazz.getName();
- int pos = name.lastIndexOf(".");
+ int pos = name.lastIndexOf('.');
String pkg;
if (name.startsWith("[")) { // Only in ancient heap dumps
pkg = "<Arrays>";
--- a/jdk/src/share/classes/java/awt/geom/Path2D.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/awt/geom/Path2D.java Tue Jun 03 07:35:35 2014 -0400
@@ -1926,9 +1926,9 @@
* maintains, but it may contain no more precision either.
* If the tradeoff of precision vs. storage size in the result is
* important then the convenience constructors in the
- * {@link Path2D.Float#Path2D.Float(Shape, AffineTransform) Path2D.Float}
+ * {@link Path2D.Float#Float(Shape, AffineTransform) Path2D.Float}
* and
- * {@link Path2D.Double#Path2D.Double(Shape, AffineTransform) Path2D.Double}
+ * {@link Path2D.Double#Double(Shape, AffineTransform) Path2D.Double}
* subclasses should be used to make the choice explicit.
*
* @param at the {@code AffineTransform} used to transform a
--- a/jdk/src/share/classes/java/lang/Class.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/Class.java Tue Jun 03 07:35:35 2014 -0400
@@ -1296,7 +1296,7 @@
String simpleName = getSimpleBinaryName();
if (simpleName == null) { // top level class
simpleName = getName();
- return simpleName.substring(simpleName.lastIndexOf(".")+1); // strip the package name
+ return simpleName.substring(simpleName.lastIndexOf('.')+1); // strip the package name
}
// According to JLS3 "Binary Compatibility" (13.1) the binary
// name of non-package classes (not top level) is the binary
--- a/jdk/src/share/classes/java/lang/ClassLoader.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java Tue Jun 03 07:35:35 2014 -0400
@@ -2133,7 +2133,7 @@
return result.booleanValue();
// Check for most specific package entry
- int dotIndex = className.lastIndexOf(".");
+ int dotIndex = className.lastIndexOf('.');
if (dotIndex < 0) { // default package
result = packageAssertionStatus.get(null);
if (result != null)
@@ -2144,7 +2144,7 @@
result = packageAssertionStatus.get(className);
if (result != null)
return result.booleanValue();
- dotIndex = className.lastIndexOf(".", dotIndex-1);
+ dotIndex = className.lastIndexOf('.', dotIndex-1);
}
// Return the classloader default
--- a/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Tue Jun 03 07:35:35 2014 -0400
@@ -85,7 +85,7 @@
private InvokerBytecodeGenerator(LambdaForm lambdaForm, int localsMapSize,
String className, String invokerName, MethodType invokerType) {
if (invokerName.contains(".")) {
- int p = invokerName.indexOf(".");
+ int p = invokerName.indexOf('.');
className = invokerName.substring(0, p);
invokerName = invokerName.substring(p+1);
}
--- a/jdk/src/share/classes/java/lang/invoke/LambdaForm.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/LambdaForm.java Tue Jun 03 07:35:35 2014 -0400
@@ -607,7 +607,7 @@
assert(m.getName().equals("interpret" + sig.substring(sig.indexOf('_'))));
LambdaForm form = new LambdaForm(sig);
form.vmentry = m;
- mt.form().setCachedLambdaForm(MethodTypeForm.LF_COUNTER, form);
+ form = mt.form().setCachedLambdaForm(MethodTypeForm.LF_COUNTER, form);
// FIXME: get rid of PREPARED_FORMS; use MethodTypeForm cache only
forms.put(sig, form);
}
--- a/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -692,8 +692,7 @@
lform = new LambdaForm("guardWithCatch", lambdaType.parameterCount(), names);
- basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWC, lform);
- return lform;
+ return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_GWC, lform);
}
static
--- a/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/lang/invoke/MethodTypeForm.java Tue Jun 03 07:35:35 2014 -0400
@@ -91,8 +91,10 @@
return lambdaForms[which];
}
- public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
- // Should we perform some sort of CAS, to avoid racy duplication?
+ synchronized public LambdaForm setCachedLambdaForm(int which, LambdaForm form) {
+ // Simulate a CAS, to avoid racy duplication of results.
+ LambdaForm prev = lambdaForms[which];
+ if (prev != null) return prev;
return lambdaForms[which] = form;
}
--- a/jdk/src/share/classes/java/net/CookieManager.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/CookieManager.java Tue Jun 03 07:35:35 2014 -0400
@@ -294,7 +294,7 @@
// the path is the directory of the page/doc
String path = uri.getPath();
if (!path.endsWith("/")) {
- int i = path.lastIndexOf("/");
+ int i = path.lastIndexOf('/');
if (i > 0) {
path = path.substring(0, i + 1);
} else {
@@ -364,7 +364,7 @@
static private boolean isInPortList(String lst, int port) {
- int i = lst.indexOf(",");
+ int i = lst.indexOf(',');
int val = -1;
while (i > 0) {
try {
@@ -375,7 +375,7 @@
} catch (NumberFormatException numberFormatException) {
}
lst = lst.substring(i+1);
- i = lst.indexOf(",");
+ i = lst.indexOf(',');
}
if (!lst.isEmpty()) {
try {
--- a/jdk/src/share/classes/java/net/InetAddress.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/InetAddress.java Tue Jun 03 07:35:35 2014 -0400
@@ -1138,7 +1138,7 @@
// This is supposed to be an IPv6 literal
// Check if a numeric or string zone id is present
int pos;
- if ((pos=host.indexOf ("%")) != -1) {
+ if ((pos=host.indexOf ('%')) != -1) {
numericZone = checkNumericZone (host);
if (numericZone == -1) { /* remainder of string must be an ifname */
ifname = host.substring (pos+1);
--- a/jdk/src/share/classes/java/net/Socket.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/Socket.java Tue Jun 03 07:35:35 2014 -0400
@@ -1017,7 +1017,7 @@
if (isClosed())
throw new SocketException("Socket is closed");
if (!on) {
- getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(on));
+ getImpl().setOption(SocketOptions.SO_LINGER, on);
} else {
if (linger < 0) {
throw new IllegalArgumentException("invalid value for SO_LINGER");
--- a/jdk/src/share/classes/java/net/SocketPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/SocketPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -777,7 +777,7 @@
// Literal IPv6 address
host = getName().substring(1, getName().indexOf(']'));
} else {
- int i = getName().indexOf(":");
+ int i = getName().indexOf(':');
if (i == -1)
host = getName();
else {
--- a/jdk/src/share/classes/java/net/SocksSocketImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -368,7 +368,7 @@
String host = epoint.getHostString();
// IPv6 litteral?
if (epoint.getAddress() instanceof Inet6Address &&
- (!host.startsWith("[")) && (host.indexOf(":") >= 0)) {
+ (!host.startsWith("[")) && (host.indexOf(':') >= 0)) {
host = "[" + host + "]";
}
try {
@@ -688,7 +688,7 @@
String host = saddr.getHostString();
// IPv6 litteral?
if (saddr.getAddress() instanceof Inet6Address &&
- (!host.startsWith("[")) && (host.indexOf(":") >= 0)) {
+ (!host.startsWith("[")) && (host.indexOf(':') >= 0)) {
host = "[" + host + "]";
}
try {
--- a/jdk/src/share/classes/java/net/URI.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/net/URI.java Tue Jun 03 07:35:35 2014 -0400
@@ -1851,9 +1851,9 @@
sb.append("//");
if (authority.startsWith("[")) {
// authority should (but may not) contain an embedded IPv6 address
- int end = authority.indexOf("]");
+ int end = authority.indexOf(']');
String doquote = authority, dontquote = "";
- if (end != -1 && authority.indexOf(":") != -1) {
+ if (end != -1 && authority.indexOf(':') != -1) {
// the authority contains an IPv6 address
if (end == authority.length()) {
dontquote = authority;
@@ -1889,8 +1889,8 @@
* because we must not quote a literal IPv6 address
*/
if (opaquePart.startsWith("//[")) {
- int end = opaquePart.indexOf("]");
- if (end != -1 && opaquePart.indexOf(":")!=-1) {
+ int end = opaquePart.indexOf(']');
+ if (end != -1 && opaquePart.indexOf(':')!=-1) {
String doquote, dontquote;
if (end == opaquePart.length()) {
dontquote = opaquePart;
--- a/jdk/src/share/classes/java/security/BasicPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/security/BasicPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -430,7 +430,7 @@
offset = path.length()-1;
- while ((last = path.lastIndexOf(".", offset)) != -1) {
+ while ((last = path.lastIndexOf('.', offset)) != -1) {
path = path.substring(0, last+1) + "*";
//System.out.println("check "+path);
--- a/jdk/src/share/classes/java/security/Provider.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/security/Provider.java Tue Jun 03 07:35:35 2014 -0400
@@ -931,7 +931,7 @@
}
private String[] getTypeAndAlgorithm(String key) {
- int i = key.indexOf(".");
+ int i = key.indexOf('.');
if (i < 1) {
if (debug != null) {
debug.println("Ignoring invalid entry in provider "
--- a/jdk/src/share/classes/java/security/Security.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/security/Security.java Tue Jun 03 07:35:35 2014 -0400
@@ -1114,7 +1114,7 @@
// implementation of an algorithm. We are only interested
// in entries which lead to the implementation
// classes.
- if (currentKey.indexOf(" ") < 0) {
+ if (currentKey.indexOf(' ') < 0) {
result.add(currentKey.substring(
serviceName.length() + 1));
}
--- a/jdk/src/share/classes/java/util/PropertyPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/util/PropertyPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -546,7 +546,7 @@
offset = name.length()-1;
- while ((last = name.lastIndexOf(".", offset)) != -1) {
+ while ((last = name.lastIndexOf('.', offset)) != -1) {
name = name.substring(0, last+1) + "*";
//System.out.println("check "+name);
--- a/jdk/src/share/classes/java/util/jar/JarVerifier.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java Tue Jun 03 07:35:35 2014 -0400
@@ -276,7 +276,7 @@
// now we are parsing a signature block file
- String key = uname.substring(0, uname.lastIndexOf("."));
+ String key = uname.substring(0, uname.lastIndexOf('.'));
if (signerCache == null)
signerCache = new ArrayList<>();
--- a/jdk/src/share/classes/java/util/logging/LogManager.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/util/logging/LogManager.java Tue Jun 03 07:35:35 2014 -0400
@@ -779,7 +779,7 @@
int ix = 1;
for (;;) {
- int ix2 = name.indexOf(".", ix);
+ int ix2 = name.indexOf('.', ix);
if (ix2 < 0) {
break;
}
@@ -802,7 +802,7 @@
}
LogNode node = root;
while (name.length() > 0) {
- int ix = name.indexOf(".");
+ int ix = name.indexOf('.');
String head;
if (ix > 0) {
head = name.substring(0, ix);
--- a/jdk/src/share/classes/java/util/logging/XMLFormatter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/java/util/logging/XMLFormatter.java Tue Jun 03 07:35:35 2014 -0400
@@ -174,7 +174,7 @@
// Check to see if the parameter was not a messagetext format
// or was not null or empty
if (parameters != null && parameters.length != 0
- && record.getMessage().indexOf("{") == -1 ) {
+ && record.getMessage().indexOf('{') == -1 ) {
for (Object parameter : parameters) {
sb.append(" <param>");
try {
--- a/jdk/src/share/classes/javax/management/MBeanPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/javax/management/MBeanPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -290,7 +290,7 @@
// Parse ObjectName
- int openingBracket = name.indexOf("[");
+ int openingBracket = name.indexOf('[');
if (openingBracket == -1) {
// If "[on]" missing then ObjectName("*:*")
//
@@ -329,7 +329,7 @@
// Parse member
- int poundSign = name.indexOf("#");
+ int poundSign = name.indexOf('#');
if (poundSign == -1)
setMember("*");
--- a/jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/javax/management/modelmbean/DescriptorSupport.java Tue Jun 03 07:35:35 2014 -0400
@@ -329,7 +329,7 @@
inFld = false;
} else if (inFld && inDesc) {
// want kw=value, eg, name="myname" value="myvalue"
- int eq_separator = tok.indexOf("=");
+ int eq_separator = tok.indexOf('=');
if (eq_separator > 0) {
String kwPart = tok.substring(0,eq_separator);
String valPart = tok.substring(eq_separator+1);
@@ -458,7 +458,7 @@
if ((fields[i] == null) || (fields[i].equals(""))) {
continue;
}
- int eq_separator = fields[i].indexOf("=");
+ int eq_separator = fields[i].indexOf('=');
if (eq_separator < 0) {
// illegal if no = or is first character
if (MODELMBEAN_LOGGER.isLoggable(Level.FINEST)) {
--- a/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Tue Jun 03 07:35:35 2014 -0400
@@ -934,7 +934,7 @@
String opMethodName;
// Parse for class name and method
- int opSplitter = opName.lastIndexOf(".");
+ int opSplitter = opName.lastIndexOf('.');
if (opSplitter > 0) {
opClassName = opName.substring(0,opSplitter);
opMethodName = opName.substring(opSplitter+1);
@@ -943,7 +943,7 @@
/* Ignore anything after a left paren. We keep this for
compatibility but it isn't specified. */
- opSplitter = opMethodName.indexOf("(");
+ opSplitter = opMethodName.indexOf('(');
if (opSplitter > 0)
opMethodName = opMethodName.substring(0,opSplitter);
--- a/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/javax/security/auth/PrivateCredentialPermission.java Tue Jun 03 07:35:35 2014 -0400
@@ -495,7 +495,7 @@
// perform new initialization from the permission name
- if (getName().indexOf(" ") == -1 && getName().indexOf("\"") == -1) {
+ if (getName().indexOf(' ') == -1 && getName().indexOf('"') == -1) {
// name only has a credential class specified
credentialClass = getName();
--- a/jdk/src/share/classes/javax/security/sasl/Sasl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/javax/security/sasl/Sasl.java Tue Jun 03 07:35:35 2014 -0400
@@ -600,7 +600,7 @@
// implementation of an algorithm. We are only interested
// in entries which lead to the implementation
// classes.
- if (currentKey.indexOf(" ") < 0) {
+ if (currentKey.indexOf(' ') < 0) {
String className = providers[i].getProperty(currentKey);
if (!classes.contains(className)) {
classes.add(className);
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/ClassWriter.java Tue Jun 03 07:35:35 2014 -0400
@@ -785,11 +785,29 @@
if (innerClasses == null) {
innerClasses = new ByteVector();
}
- ++innerClassesCount;
- innerClasses.putShort(name == null ? 0 : newClass(name));
- innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
- innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
- innerClasses.putShort(access);
+ // Sec. 4.7.6 of the JVMS states "Every CONSTANT_Class_info entry in the
+ // constant_pool table which represents a class or interface C that is
+ // not a package member must have exactly one corresponding entry in the
+ // classes array". To avoid duplicates we keep track in the intVal field
+ // of the Item of each CONSTANT_Class_info entry C whether an inner
+ // class entry has already been added for C (this field is unused for
+ // class entries, and changing its value does not change the hashcode
+ // and equality tests). If so we store the index of this inner class
+ // entry (plus one) in intVal. This hack allows duplicate detection in
+ // O(1) time.
+ Item nameItem = newClassItem(name);
+ if (nameItem.intVal == 0) {
+ ++innerClassesCount;
+ innerClasses.putShort(nameItem.index);
+ innerClasses.putShort(outerName == null ? 0 : newClass(outerName));
+ innerClasses.putShort(innerName == null ? 0 : newUTF8(innerName));
+ innerClasses.putShort(access);
+ nameItem.intVal = innerClassesCount;
+ } else {
+ // Compare the inner classes entry nameItem.intVal - 1 with the
+ // arguments of this method and throw an exception if there is a
+ // difference?
+ }
}
@Override
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Frame.java Tue Jun 03 07:35:35 2014 -0400
@@ -1455,16 +1455,20 @@
| cw.getMergedType(t & BASE_VALUE, u & BASE_VALUE);
} else {
// if u and t are array types, but not with the same element
- // type, merge(u,t)=java/lang/Object
- v = OBJECT | cw.addType("java/lang/Object");
+ // type, merge(u,t) = dim(u) - 1 | java/lang/Object
+ int vdim = ELEMENT_OF + (u & DIM);
+ v = vdim | OBJECT | cw.addType("java/lang/Object");
}
} else if ((t & BASE_KIND) == OBJECT || (t & DIM) != 0) {
// if t is any other reference or array type, the merged type
- // is Object, or min(dim(u), dim(t)) | java/lang/Object is u
- // and t have different array dimensions
- int tdim = t & DIM;
- int udim = u & DIM;
- v = (udim != tdim ? Math.min(tdim, udim) : 0) | OBJECT
+ // is min(udim, tdim) | java/lang/Object, where udim is the
+ // array dimension of u, minus 1 if u is an array type with a
+ // primitive element type (and similarly for tdim).
+ int tdim = (((t & DIM) == 0 || (t & BASE_KIND) == OBJECT) ? 0
+ : ELEMENT_OF) + (t & DIM);
+ int udim = (((u & DIM) == 0 || (u & BASE_KIND) == OBJECT) ? 0
+ : ELEMENT_OF) + (u & DIM);
+ v = Math.min(tdim, udim) | OBJECT
| cw.addType("java/lang/Object");
} else {
// if t is any other type, merge(u,t)=TOP
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Item.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Item.java Tue Jun 03 07:35:35 2014 -0400
@@ -230,6 +230,7 @@
* @param strVal3
* third part of the value of this item.
*/
+ @SuppressWarnings("fallthrough")
void set(final int type, final String strVal1, final String strVal2,
final String strVal3) {
this.type = type;
@@ -237,9 +238,10 @@
this.strVal2 = strVal2;
this.strVal3 = strVal3;
switch (type) {
+ case ClassWriter.CLASS:
+ this.intVal = 0; // intVal of a class must be zero, see visitInnerClass
case ClassWriter.UTF8:
case ClassWriter.STR:
- case ClassWriter.CLASS:
case ClassWriter.MTYPE:
case ClassWriter.TYPE_NORMAL:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Label.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Label.java Tue Jun 03 07:35:35 2014 -0400
@@ -502,7 +502,7 @@
void addToSubroutine(final long id, final int nbSubroutines) {
if ((status & VISITED) == 0) {
status |= VISITED;
- srcAndRefPositions = new int[(nbSubroutines - 1) / 32 + 1];
+ srcAndRefPositions = new int[nbSubroutines / 32 + 1];
}
srcAndRefPositions[(int) (id >>> 32)] |= (int) id;
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/MethodWriter.java Tue Jun 03 07:35:35 2014 -0400
@@ -1430,6 +1430,14 @@
@Override
public void visitMaxs(final int maxStack, final int maxLocals) {
+ if (resize) {
+ // replaces the temporary jump opcodes introduced by Label.resolve.
+ if (ClassReader.RESIZE) {
+ resizeInstructions();
+ } else {
+ throw new RuntimeException("Method code too large!");
+ }
+ }
if (ClassReader.FRAMES && compute == FRAMES) {
// completes the control flow graph with exception handler blocks
Handler handler = firstHandler;
@@ -1987,43 +1995,43 @@
stackMap.putByte(v);
}
} else {
- StringBuffer buf = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
d >>= 28;
while (d-- > 0) {
- buf.append('[');
+ sb.append('[');
}
if ((t & Frame.BASE_KIND) == Frame.OBJECT) {
- buf.append('L');
- buf.append(cw.typeTable[t & Frame.BASE_VALUE].strVal1);
- buf.append(';');
+ sb.append('L');
+ sb.append(cw.typeTable[t & Frame.BASE_VALUE].strVal1);
+ sb.append(';');
} else {
switch (t & 0xF) {
case 1:
- buf.append('I');
+ sb.append('I');
break;
case 2:
- buf.append('F');
+ sb.append('F');
break;
case 3:
- buf.append('D');
+ sb.append('D');
break;
case 9:
- buf.append('Z');
+ sb.append('Z');
break;
case 10:
- buf.append('B');
+ sb.append('B');
break;
case 11:
- buf.append('C');
+ sb.append('C');
break;
case 12:
- buf.append('S');
+ sb.append('S');
break;
default:
- buf.append('J');
+ sb.append('J');
}
}
- stackMap.putByte(7).putShort(cw.newClass(buf.toString()));
+ stackMap.putByte(7).putShort(cw.newClass(sb.toString()));
}
}
}
@@ -2051,14 +2059,6 @@
if (classReaderOffset != 0) {
return 6 + classReaderLength;
}
- if (resize) {
- // replaces the temporary jump opcodes introduced by Label.resolve.
- if (ClassReader.RESIZE) {
- resizeInstructions();
- } else {
- throw new RuntimeException("Method code too large!");
- }
- }
int size = 8;
if (code.length > 0) {
if (code.length > 65536) {
@@ -2715,49 +2715,50 @@
}
}
- // recomputes the stack map frames
- if (frameCount > 0) {
- if (compute == FRAMES) {
- frameCount = 0;
- stackMap = null;
- previousFrame = null;
- frame = null;
- Frame f = new Frame();
- f.owner = labels;
- Type[] args = Type.getArgumentTypes(descriptor);
- f.initInputFrame(cw, access, args, maxLocals);
- visitFrame(f);
- Label l = labels;
- while (l != null) {
- /*
- * here we need the original label position. getNewOffset
- * must therefore never have been called for this label.
- */
- u = l.position - 3;
- if ((l.status & Label.STORE) != 0 || (u >= 0 && resize[u])) {
- getNewOffset(allIndexes, allSizes, l);
- // TODO update offsets in UNINITIALIZED values
- visitFrame(l.frame);
- }
- l = l.successor;
+ // updates the stack map frame labels
+ if (compute == FRAMES) {
+ Label l = labels;
+ while (l != null) {
+ /*
+ * Detects the labels that are just after an IF instruction that
+ * has been resized with the IFNOT GOTO_W pattern. These labels
+ * are now the target of a jump instruction (the IFNOT
+ * instruction). Note that we need the original label position
+ * here. getNewOffset must therefore never have been called for
+ * this label.
+ */
+ u = l.position - 3;
+ if (u >= 0 && resize[u]) {
+ l.status |= Label.TARGET;
}
- } else {
- /*
- * Resizing an existing stack map frame table is really hard.
- * Not only the table must be parsed to update the offets, but
- * new frames may be needed for jump instructions that were
- * inserted by this method. And updating the offsets or
- * inserting frames can change the format of the following
- * frames, in case of packed frames. In practice the whole table
- * must be recomputed. For this the frames are marked as
- * potentially invalid. This will cause the whole class to be
- * reread and rewritten with the COMPUTE_FRAMES option (see the
- * ClassWriter.toByteArray method). This is not very efficient
- * but is much easier and requires much less code than any other
- * method I can think of.
- */
- cw.invalidFrames = true;
+ getNewOffset(allIndexes, allSizes, l);
+ l = l.successor;
+ }
+ // Update the offsets in the uninitialized types
+ for (i = 0; i < cw.typeTable.length; ++i) {
+ Item item = cw.typeTable[i];
+ if (item != null && item.type == ClassWriter.TYPE_UNINIT) {
+ item.intVal = getNewOffset(allIndexes, allSizes, 0,
+ item.intVal);
+ }
}
+ // The stack map frames are not serialized yet, so we don't need
+ // to update them. They will be serialized in visitMaxs.
+ } else if (frameCount > 0) {
+ /*
+ * Resizing an existing stack map frame table is really hard. Not
+ * only the table must be parsed to update the offets, but new
+ * frames may be needed for jump instructions that were inserted by
+ * this method. And updating the offsets or inserting frames can
+ * change the format of the following frames, in case of packed
+ * frames. In practice the whole table must be recomputed. For this
+ * the frames are marked as potentially invalid. This will cause the
+ * whole class to be reread and rewritten with the COMPUTE_FRAMES
+ * option (see the ClassWriter.toByteArray method). This is not very
+ * efficient but is much easier and requires much less code than any
+ * other method I can think of.
+ */
+ cw.invalidFrames = true;
}
// updates the exception handler block labels
Handler h = firstHandler;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Type.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/Type.java Tue Jun 03 07:35:35 2014 -0400
@@ -585,11 +585,11 @@
case DOUBLE:
return "double";
case ARRAY:
- StringBuffer b = new StringBuffer(getElementType().getClassName());
+ StringBuilder sb = new StringBuilder(getElementType().getClassName());
for (int i = getDimensions(); i > 0; --i) {
- b.append("[]");
+ sb.append("[]");
}
- return b.toString();
+ return sb.toString();
case OBJECT:
return new String(buf, off, len).replace('/', '.');
default:
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java Tue Jun 03 07:35:35 2014 -0400
@@ -1089,7 +1089,7 @@
@Deprecated
public void invokestatic(final String owner, final String name,
final String desc) {
- if (api < Opcodes.ASM5) {
+ if (api >= Opcodes.ASM5) {
invokestatic(owner, name, desc, false);
return;
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/Method.java Tue Jun 03 07:35:35 2014 -0400
@@ -205,7 +205,7 @@
}
String returnType = method.substring(0, space);
String methodName = method.substring(space + 1, start - 1).trim();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append('(');
int p;
do {
@@ -229,7 +229,7 @@
return type;
}
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
int index = 0;
while ((index = type.indexOf("[]", index) + 1) > 0) {
sb.append('[');
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/Remapper.java Tue Jun 03 07:35:35 2014 -0400
@@ -147,17 +147,17 @@
}
Type[] args = Type.getArgumentTypes(desc);
- StringBuffer s = new StringBuffer("(");
+ StringBuilder sb = new StringBuilder("(");
for (int i = 0; i < args.length; i++) {
- s.append(mapDesc(args[i].getDescriptor()));
+ sb.append(mapDesc(args[i].getDescriptor()));
}
Type returnType = Type.getReturnType(desc);
if (returnType == Type.VOID_TYPE) {
- s.append(")V");
- return s.toString();
+ sb.append(")V");
+ return sb.toString();
}
- s.append(')').append(mapDesc(returnType.getDescriptor()));
- return s.toString();
+ sb.append(')').append(mapDesc(returnType.getDescriptor()));
+ return sb.toString();
}
public Object mapValue(Object value) {
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java Tue Jun 03 07:35:35 2014 -0400
@@ -239,7 +239,9 @@
if (computeSVUID) {
this.name = name;
this.access = access;
- this.interfaces = Arrays.copyOf(interfaces, interfaces.length);
+ this.interfaces = new String[interfaces.length];
+ System.arraycopy(interfaces, 0, this.interfaces, 0,
+ interfaces.length);
}
super.visit(version, access, name, signature, superName, interfaces);
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/MethodNode.java Tue Jun 03 07:35:35 2014 -0400
@@ -351,7 +351,7 @@
}
@Override
- @SuppressWarnings("serial") // Anonymous class
+ @SuppressWarnings("serial")
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationNode(new ArrayList<Object>(0) {
@Override
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java Tue Jun 03 07:35:35 2014 -0400
@@ -66,7 +66,7 @@
* @author Bing Ran
* @author Eric Bruneton
*/
-@SuppressWarnings("serial") // implementation class
+@SuppressWarnings("serial")
public class AnalyzerException extends Exception {
public final AbstractInsnNode node;
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/Frame.java Tue Jun 03 07:35:35 2014 -0400
@@ -754,14 +754,14 @@
*/
@Override
public String toString() {
- StringBuffer b = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (int i = 0; i < getLocals(); ++i) {
- b.append(getLocal(i));
+ sb.append(getLocal(i));
}
- b.append(' ');
+ sb.append(' ');
for (int i = 0; i < getStackSize(); ++i) {
- b.append(getStack(i).toString());
+ sb.append(getStack(i).toString());
}
- return b.toString();
+ return sb.toString();
}
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/ASMifier.java Tue Jun 03 07:35:35 2014 -0400
@@ -206,7 +206,6 @@
}
text.add("import java.util.*;\n");
text.add("import jdk.internal.org.objectweb.asm.*;\n");
- text.add("import jdk.internal.org.objectweb.asm.attrs.*;\n");
text.add("public class " + simpleName + "Dump implements Opcodes {\n\n");
text.add("public static byte[] dump () throws Exception {\n\n");
text.add("ClassWriter cw = new ClassWriter(0);\n");
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/CheckClassAdapter.java Tue Jun 03 07:35:35 2014 -0400
@@ -298,26 +298,26 @@
for (int j = 0; j < method.instructions.size(); ++j) {
method.instructions.get(j).accept(mv);
- StringBuffer s = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
Frame<BasicValue> f = frames[j];
if (f == null) {
- s.append('?');
+ sb.append('?');
} else {
for (int k = 0; k < f.getLocals(); ++k) {
- s.append(getShortName(f.getLocal(k).toString()))
+ sb.append(getShortName(f.getLocal(k).toString()))
.append(' ');
}
- s.append(" : ");
+ sb.append(" : ");
for (int k = 0; k < f.getStackSize(); ++k) {
- s.append(getShortName(f.getStack(k).toString()))
+ sb.append(getShortName(f.getStack(k).toString()))
.append(' ');
}
}
- while (s.length() < method.maxStack + method.maxLocals + 1) {
- s.append(' ');
+ while (sb.length() < method.maxStack + method.maxLocals + 1) {
+ sb.append(' ');
}
pw.print(Integer.toString(j + 100000).substring(1));
- pw.print(" " + s + " : " + t.text.get(t.text.size() - 1));
+ pw.print(" " + sb + " : " + t.text.get(t.text.size() - 1));
}
for (int j = 0; j < method.tryCatchBlocks.size(); ++j) {
method.tryCatchBlocks.get(j).accept(mv);
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/util/Textifier.java Tue Jun 03 07:35:35 2014 -0400
@@ -443,7 +443,7 @@
}
buf.append(tab);
- appendAccess(access);
+ appendAccess(access & ~Opcodes.ACC_VOLATILE);
if ((access & Opcodes.ACC_NATIVE) != 0) {
buf.append("native ");
}
--- a/jdk/src/share/classes/jdk/internal/org/objectweb/asm/version.txt Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/jdk/internal/org/objectweb/asm/version.txt Tue Jun 03 07:35:35 2014 -0400
@@ -1,12 +1,12 @@
Path: .
-Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-03-12
+Working Copy Root Path: /hudson/jobs/objectweb-pull/workspace/asm-svn-2014-05-27
URL: file:///svnroot/asm/trunk/asm
Repository Root: file:///svnroot/asm
Repository UUID: 271bd773-ee82-43a6-9b2b-1890ed8ce7f9
-Revision: 1721
+Revision: 1748
Node Kind: directory
Schedule: normal
Last Changed Author: ebruneton
-Last Changed Rev: 1721
-Last Changed Date: 2014-03-02 17:25:35 +0100 (Sun, 02 Mar 2014)
+Last Changed Rev: 1747
+Last Changed Date: 2014-05-24 10:22:13 +0200 (Sat, 24 May 2014)
--- a/jdk/src/share/classes/sun/jvmstat/monitor/AbstractMonitor.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/jvmstat/monitor/AbstractMonitor.java Tue Jun 03 07:35:35 2014 -0400
@@ -84,7 +84,7 @@
* {@inheritDoc}
*/
public String getBaseName() {
- int baseIndex = name.lastIndexOf(".")+1;
+ int baseIndex = name.lastIndexOf('.') + 1;
return name.substring(baseIndex);
}
--- a/jdk/src/share/classes/sun/jvmstat/monitor/HostIdentifier.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/jvmstat/monitor/HostIdentifier.java Tue Jun 03 07:35:35 2014 -0400
@@ -138,8 +138,8 @@
String frag = u.getFragment();
URI u2 = null;
- int c1index = uriString.indexOf(":");
- int c2index = uriString.lastIndexOf(":");
+ int c1index = uriString.indexOf(':');
+ int c2index = uriString.lastIndexOf(':');
if (c2index != c1index) {
/*
* this is the scheme:hostname:port case. Attempt to
--- a/jdk/src/share/classes/sun/management/StackTraceElementCompositeData.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/management/StackTraceElementCompositeData.java Tue Jun 03 07:35:35 2014 -0400
@@ -68,7 +68,7 @@
ste.getMethodName(),
ste.getFileName(),
new Integer(ste.getLineNumber()),
- new Boolean(ste.isNativeMethod()),
+ ste.isNativeMethod(),
};
try {
return new CompositeDataSupport(stackTraceElementCompositeType,
--- a/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/management/ThreadInfoCompositeData.java Tue Jun 03 07:35:35 2014 -0400
@@ -120,8 +120,8 @@
new Long(threadInfo.getLockOwnerId()),
threadInfo.getLockOwnerName(),
stackTraceData,
- new Boolean(threadInfo.isSuspended()),
- new Boolean(threadInfo.isInNative()),
+ threadInfo.isSuspended(),
+ threadInfo.isInNative(),
lockedMonitorsData,
lockedSyncsData,
};
--- a/jdk/src/share/classes/sun/management/VMOptionCompositeData.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/management/VMOptionCompositeData.java Tue Jun 03 07:35:35 2014 -0400
@@ -59,7 +59,7 @@
final Object[] vmOptionItemValues = {
option.getName(),
option.getValue(),
- new Boolean(option.isWriteable()),
+ option.isWriteable(),
option.getOrigin().toString(),
};
--- a/jdk/src/share/classes/sun/management/snmp/jvminstr/NotificationTargetImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/management/snmp/jvminstr/NotificationTargetImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -70,8 +70,8 @@
String addrStr;
if (target.startsWith("[")) {
- final int index = target.indexOf("]");
- final int index2 = target.lastIndexOf(":");
+ final int index = target.indexOf(']');
+ final int index2 = target.lastIndexOf(':');
if(index == -1)
throw new IllegalArgumentException("Host starts with [ but " +
"does not end with ]");
@@ -85,8 +85,8 @@
if (addrStr.startsWith("["))
throw new IllegalArgumentException("More than one [[...]]");
} else {
- final int index = target.indexOf(":");
- final int index2 = target.lastIndexOf(":");
+ final int index = target.indexOf(':');
+ final int index2 = target.lastIndexOf(':');
if(index == -1) throw new
IllegalArgumentException("Missing port separator \":\"");
addrStr = target.substring(0, index);
@@ -98,7 +98,7 @@
address = InetAddress.getByName(addrStr);
//THE CHECK SHOULD BE STRONGER!!!
- final int index = target.lastIndexOf(":");
+ final int index = target.lastIndexOf(':');
community = target.substring(index + 1, target.length());
--- a/jdk/src/share/classes/sun/misc/ExtensionInfo.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/misc/ExtensionInfo.java Tue Jun 03 07:35:35 2014 -0400
@@ -273,8 +273,8 @@
else
{
// Look for index of "." in the string
- int sIdx = source.indexOf(".");
- int tIdx = target.indexOf(".");
+ int sIdx = source.indexOf('.');
+ int tIdx = target.indexOf('.');
if (sIdx == -1)
sIdx = source.length() - 1;
@@ -304,10 +304,10 @@
String versionError = mf.format(args);
// Look for "-" for pre-release
- int prIndex = token.indexOf("-");
+ int prIndex = token.indexOf('-');
// Look for "_" for patch release
- int patchIndex = token.indexOf("_");
+ int patchIndex = token.indexOf('_');
if (prIndex == -1 && patchIndex == -1)
{
--- a/jdk/src/share/classes/sun/misc/JarIndex.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/misc/JarIndex.java Tue Jun 03 07:35:35 2014 -0400
@@ -172,7 +172,7 @@
if ((jarFiles = indexMap.get(fileName)) == null) {
/* try the package name again */
int pos;
- if((pos = fileName.lastIndexOf("/")) != -1) {
+ if((pos = fileName.lastIndexOf('/')) != -1) {
jarFiles = indexMap.get(fileName.substring(0, pos));
}
}
@@ -195,7 +195,7 @@
public void add(String fileName, String jarName) {
String packageName;
int pos;
- if((pos = fileName.lastIndexOf("/")) != -1) {
+ if((pos = fileName.lastIndexOf('/')) != -1) {
packageName = fileName.substring(0, pos);
} else {
packageName = fileName;
--- a/jdk/src/share/classes/sun/misc/URLClassPath.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/misc/URLClassPath.java Tue Jun 03 07:35:35 2014 -0400
@@ -793,7 +793,7 @@
boolean validIndex(final String name) {
String packageName = name;
int pos;
- if((pos = name.lastIndexOf("/")) != -1) {
+ if((pos = name.lastIndexOf('/')) != -1) {
packageName = name.substring(0, pos);
}
@@ -803,7 +803,7 @@
while (enum_.hasMoreElements()) {
entry = enum_.nextElement();
entryName = entry.getName();
- if((pos = entryName.lastIndexOf("/")) != -1)
+ if((pos = entryName.lastIndexOf('/')) != -1)
entryName = entryName.substring(0, pos);
if (entryName.equals(packageName)) {
return true;
@@ -900,7 +900,7 @@
*/
JarIndex newIndex = newLoader.getIndex();
if(newIndex != null) {
- int pos = jarName.lastIndexOf("/");
+ int pos = jarName.lastIndexOf('/');
newIndex.merge(this.index, (pos == -1 ?
null : jarName.substring(0, pos + 1)));
}
--- a/jdk/src/share/classes/sun/net/ftp/impl/FtpClient.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/net/ftp/impl/FtpClient.java Tue Jun 03 07:35:35 2014 -0400
@@ -258,7 +258,7 @@
d = null;
}
if (d != null && time != null) {
- int c = time.indexOf(":");
+ int c = time.indexOf(':');
now.setTime(d);
now.set(Calendar.HOUR, Integer.parseInt(time.substring(0, c)));
now.set(Calendar.MINUTE, Integer.parseInt(time.substring(c + 1)));
@@ -294,7 +294,7 @@
public FtpDirEntry parseLine(String line) {
String name = null;
- int i = line.lastIndexOf(";");
+ int i = line.lastIndexOf(';');
if (i > 0) {
name = line.substring(i + 1).trim();
line = line.substring(0, i);
@@ -305,7 +305,7 @@
FtpDirEntry file = new FtpDirEntry(name);
while (!line.isEmpty()) {
String s;
- i = line.indexOf(";");
+ i = line.indexOf(';');
if (i > 0) {
s = line.substring(0, i);
line = line.substring(i + 1);
@@ -313,7 +313,7 @@
s = line;
line = "";
}
- i = s.indexOf("=");
+ i = s.indexOf('=');
if (i > 0) {
String fact = s.substring(0, i);
String value = s.substring(i + 1);
--- a/jdk/src/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java Tue Jun 03 07:35:35 2014 -0400
@@ -325,7 +325,7 @@
while (i.hasNext()) {
String parentDomain = i.next();
int start = 0;
- while ((start = parentDomain.indexOf(".")) != -1
+ while ((start = parentDomain.indexOf('.')) != -1
&& start < parentDomain.length() -1) {
try {
results = resolve(ctx, host+"."+parentDomain, ids, 0);
--- a/jdk/src/share/classes/sun/net/util/IPAddressUtil.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/net/util/IPAddressUtil.java Tue Jun 03 07:35:35 2014 -0400
@@ -132,7 +132,7 @@
byte[] dst = new byte[INADDR16SZ];
int srcb_length = srcb.length;
- int pc = src.indexOf ("%");
+ int pc = src.indexOf ('%');
if (pc == srcb_length -1) {
return null;
}
--- a/jdk/src/share/classes/sun/net/www/ParseUtil.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/net/www/ParseUtil.java Tue Jun 03 07:35:35 2014 -0400
@@ -356,8 +356,8 @@
* because we must not quote a literal IPv6 address
*/
if (opaquePart.startsWith("//[")) {
- int end = opaquePart.indexOf("]");
- if (end != -1 && opaquePart.indexOf(":")!=-1) {
+ int end = opaquePart.indexOf(']');
+ if (end != -1 && opaquePart.indexOf(':')!=-1) {
String doquote, dontquote;
if (end == opaquePart.length()) {
dontquote = opaquePart;
@@ -408,8 +408,8 @@
} else if (authority != null) {
sb.append("//");
if (authority.startsWith("[")) {
- int end = authority.indexOf("]");
- if (end != -1 && authority.indexOf(":")!=-1) {
+ int end = authority.indexOf(']');
+ if (end != -1 && authority.indexOf(':')!=-1) {
String doquote, dontquote;
if (end == authority.length()) {
dontquote = authority;
--- a/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/reflect/misc/ReflectUtil.java Tue Jun 03 07:35:35 2014 -0400
@@ -341,6 +341,6 @@
* (not to be confused with a Java Language anonymous inner class).
*/
public static boolean isVMAnonymousClass(Class<?> cls) {
- return cls.getName().indexOf("/") > -1;
+ return cls.getName().indexOf('/') > -1;
}
}
--- a/jdk/src/share/classes/sun/rmi/runtime/Log.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/rmi/runtime/Log.java Tue Jun 03 07:35:35 2014 -0400
@@ -426,7 +426,7 @@
* Mimic old log messages that only contain unqualified names.
*/
private static String unqualifiedName(String name) {
- int lastDot = name.lastIndexOf(".");
+ int lastDot = name.lastIndexOf('.');
if (lastDot >= 0) {
name = name.substring(lastDot + 1);
}
--- a/jdk/src/share/classes/sun/rmi/transport/proxy/CGIHandler.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/rmi/transport/proxy/CGIHandler.java Tue Jun 03 07:35:35 2014 -0400
@@ -141,7 +141,7 @@
{
try {
String command, param;
- int delim = QueryString.indexOf("=");
+ int delim = QueryString.indexOf('=');
if (delim == -1) {
command = QueryString;
param = "";
--- a/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -50,8 +50,8 @@
if (osname.startsWith("SunOS") ||
osname.contains("OS X") ||
osname.startsWith("Linux")) {
- return new Boolean(System.getProperty
- (USE_NATIVE_PROP));
+ return Boolean.valueOf(System.getProperty
+ (USE_NATIVE_PROP));
}
return Boolean.FALSE;
}
--- a/jdk/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java Tue Jun 03 07:35:35 2014 -0400
@@ -39,7 +39,7 @@
static String getTGSName(GSSNameElement name)
throws GSSException {
String krbPrinc = name.getKrbName();
- int atIndex = krbPrinc.indexOf("@");
+ int atIndex = krbPrinc.indexOf('@');
String realm = krbPrinc.substring(atIndex + 1);
StringBuffer buf = new StringBuffer("krbtgt/");
buf.append(realm).append('@').append(realm);
--- a/jdk/src/share/classes/sun/security/krb5/KdcComm.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/krb5/KdcComm.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, 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
@@ -144,7 +144,8 @@
try {
Config cfg = Config.getInstance();
String temp = cfg.get("libdefaults", "kdc_timeout");
- timeout = parsePositiveIntString(temp);
+ timeout = parseTimeString(temp);
+
temp = cfg.get("libdefaults", "max_retries");
max_retries = parsePositiveIntString(temp);
temp = cfg.get("libdefaults", "udp_preference_limit");
@@ -426,6 +427,25 @@
}
/**
+ * Parses a time value string. If it ends with "s", parses as seconds.
+ * Otherwise, parses as milliseconds.
+ * @param s the time string
+ * @return the integer value in milliseconds, or -1 if input is null or
+ * has an invalid format
+ */
+ private static int parseTimeString(String s) {
+ if (s == null) {
+ return -1;
+ }
+ if (s.endsWith("s")) {
+ int seconds = parsePositiveIntString(s.substring(0, s.length()-1));
+ return (seconds < 0) ? -1 : (seconds*1000);
+ } else {
+ return parsePositiveIntString(s);
+ }
+ }
+
+ /**
* Returns krb5.conf setting of {@code key} for a specific realm,
* which can be:
* 1. defined in the sub-stanza for the given realm inside [realms], or
@@ -446,7 +466,11 @@
try {
String value =
Config.getInstance().get("realms", realm, key);
- temp = parsePositiveIntString(value);
+ if (key.equals("kdc_timeout")) {
+ temp = parseTimeString(value);
+ } else {
+ temp = parsePositiveIntString(value);
+ }
} catch (Exception exc) {
// Ignored, defValue will be picked up
}
--- a/jdk/src/share/classes/sun/security/provider/PolicyFile.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/provider/PolicyFile.java Tue Jun 03 07:35:35 2014 -0400
@@ -1271,7 +1271,7 @@
Boolean imp = AccessController.doPrivileged
(new PrivilegedAction<Boolean>() {
public Boolean run() {
- return new Boolean(entry.getCodeSource().implies(cs));
+ return entry.getCodeSource().implies(cs);
}
});
if (!imp.booleanValue()) {
@@ -1856,7 +1856,7 @@
int colonIndex;
String prefix = value;
String suffix;
- if ((colonIndex = value.indexOf(":")) != -1) {
+ if ((colonIndex = value.indexOf(':')) != -1) {
prefix = value.substring(0, colonIndex);
}
--- a/jdk/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -338,7 +338,7 @@
}
String sigType;
if (keyType.contains("_")) {
- int k = keyType.indexOf("_");
+ int k = keyType.indexOf('_');
sigType = keyType.substring(k + 1);
keyType = keyType.substring(0, k);
} else {
--- a/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/ssl/X509KeyManagerImpl.java Tue Jun 03 07:35:35 2014 -0400
@@ -302,7 +302,7 @@
final String sigKeyAlgorithm;
KeyType(String algorithm) {
- int k = algorithm.indexOf("_");
+ int k = algorithm.indexOf('_');
if (k == -1) {
keyAlgorithm = algorithm;
sigKeyAlgorithm = null;
--- a/jdk/src/share/classes/sun/security/util/HostnameChecker.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/util/HostnameChecker.java Tue Jun 03 07:35:35 2014 -0400
@@ -300,8 +300,8 @@
template = template.toLowerCase(Locale.ENGLISH);
// Retreive leftmost component
- int templateIdx = template.indexOf(".");
- int nameIdx = name.indexOf(".");
+ int templateIdx = template.indexOf('.');
+ int nameIdx = name.indexOf('.');
if (templateIdx == -1)
templateIdx = template.length();
@@ -326,7 +326,7 @@
*/
private static boolean matchWildCards(String name, String template) {
- int wildcardIdx = template.indexOf("*");
+ int wildcardIdx = template.indexOf('*');
if (wildcardIdx == -1)
return name.equals(template);
@@ -349,7 +349,7 @@
// update the match scope
name = name.substring(beforeStartIdx + beforeWildcard.length());
- wildcardIdx = afterWildcard.indexOf("*");
+ wildcardIdx = afterWildcard.indexOf('*');
}
return name.endsWith(afterWildcard);
}
--- a/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/util/SignatureFileVerifier.java Tue Jun 03 07:35:35 2014 -0400
@@ -98,7 +98,7 @@
} finally {
Providers.stopJarVerification(obj);
}
- this.name = name.substring(0, name.lastIndexOf("."))
+ this.name = name.substring(0, name.lastIndexOf('.'))
.toUpperCase(Locale.ENGLISH);
this.md = md;
this.signerCache = signerCache;
--- a/jdk/src/share/classes/sun/security/x509/CRLExtensions.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/security/x509/CRLExtensions.java Tue Jun 03 07:35:35 2014 -0400
@@ -185,7 +185,7 @@
String name;
String id = attr.getPrefix();
if (id.equalsIgnoreCase(X509CertImpl.NAME)) { // fully qualified
- int index = alias.lastIndexOf(".");
+ int index = alias.lastIndexOf('.');
name = alias.substring(index + 1);
} else
name = alias;
--- a/jdk/src/share/classes/sun/tools/jconsole/ConnectDialog.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/ConnectDialog.java Tue Jun 03 07:35:35 2014 -0400
@@ -325,7 +325,7 @@
} else {
String host = remoteTF.getText().trim();
String port = "0";
- int index = host.lastIndexOf(":");
+ int index = host.lastIndexOf(':');
if (index >= 0) {
port = host.substring(index + 1);
host = host.substring(0, index);
--- a/jdk/src/share/classes/sun/tools/jconsole/inspector/Utils.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/Utils.java Tue Jun 03 07:35:35 2014 -0400
@@ -210,7 +210,7 @@
public static String getArrayClassName(String name) {
String className = null;
if (name.startsWith("[")) {
- int index = name.lastIndexOf("[");
+ int index = name.lastIndexOf('[');
className = name.substring(index, name.length());
if (className.startsWith("[L")) {
className = className.substring(2, className.length() - 1);
@@ -241,7 +241,7 @@
if (className == null) {
return name;
}
- int index = name.lastIndexOf("[");
+ int index = name.lastIndexOf('[');
StringBuilder brackets = new StringBuilder(className);
for (int i = 0; i <= index; i++) {
brackets.append("[]");
--- a/jdk/src/share/classes/sun/tools/jconsole/inspector/XOperations.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XOperations.java Tue Jun 03 07:35:35 2014 -0400
@@ -113,7 +113,7 @@
if (methodLabel.getText().length() > 20) {
methodLabel.setText(methodLabel.getText().
substring(methodLabel.getText().
- lastIndexOf(".") + 1,
+ lastIndexOf('.') + 1,
methodLabel.getText().length()));
}
--- a/jdk/src/share/classes/sun/tools/jconsole/inspector/XTree.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/classes/sun/tools/jconsole/inspector/XTree.java Tue Jun 03 07:35:35 2014 -0400
@@ -475,7 +475,7 @@
private static Map<String, String> extractKeyValuePairs(
String props, ObjectName mbean) {
Map<String, String> map = new LinkedHashMap<String, String>();
- int eq = props.indexOf("=");
+ int eq = props.indexOf('=');
while (eq != -1) {
String key = props.substring(0, eq);
String value = mbean.getKeyProperty(key);
@@ -484,7 +484,7 @@
if (props.startsWith(",")) {
props = props.substring(1);
}
- eq = props.indexOf("=");
+ eq = props.indexOf('=');
}
return map;
}
@@ -821,7 +821,7 @@
}
private void buildKeyValue() {
- int index = tokenValue.indexOf("=");
+ int index = tokenValue.indexOf('=');
if (index < 0) {
key = tokenValue;
value = tokenValue;
--- a/jdk/src/share/lib/security/sunpkcs11-solaris.cfg Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/lib/security/sunpkcs11-solaris.cfg Tue Jun 03 07:35:35 2014 -0400
@@ -18,18 +18,5 @@
disabledMechanisms = {
CKM_DSA_KEY_PAIR_GEN
-# the following mechanisms are disabled due to performance issues
-# (Solaris bug 6337157)
- CKM_DSA_SHA1
- CKM_MD5_RSA_PKCS
- CKM_SHA1_RSA_PKCS
- CKM_SHA256_RSA_PKCS
- CKM_SHA384_RSA_PKCS
- CKM_SHA512_RSA_PKCS
-# the following mechanisms are disabled to ensure backward compatibility
-# (Solaris bug 6545046)
- CKM_DES_CBC_PAD
- CKM_DES3_CBC_PAD
- CKM_AES_CBC_PAD
}
--- a/jdk/src/share/native/sun/security/smartcardio/pcsc.c Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/src/share/native/sun/security/smartcardio/pcsc.c Tue Jun 03 07:35:35 2014 -0400
@@ -122,28 +122,35 @@
/**
* Convert a multi string to a java string array,
*/
-jobjectArray pcsc_multi2jstring(JNIEnv *env, char *spec, DWORD size) {
+jobjectArray pcsc_multi2jstring(JNIEnv *env, char *spec) {
jobjectArray result;
jclass stringClass;
- char* tab[PCSCLITE_MAX_READERS_CONTEXTS];
+ char *cp, **tab = NULL;
jstring js;
int cnt = 0;
- DWORD i;
+
+ cp = spec;
+ while (*cp != 0) {
+ cp += (strlen(cp) + 1);
+ ++cnt;
+ }
- if (spec && size) {
- spec[size - 1] = 0;
- for (i = 0; i < size && spec[i]; ++i) {
- tab[cnt++] = spec + i;
- if (cnt == PCSCLITE_MAX_READERS_CONTEXTS) {
- break;
- }
- for (++i; i < size && spec[i]; ++i) {
- }
- }
+ tab = (char **)malloc(cnt * sizeof(char *));
+ if (tab == NULL) {
+ throwOutOfMemoryError(env, NULL);
+ return NULL;
+ }
+
+ cnt = 0;
+ cp = spec;
+ while (*cp != 0) {
+ tab[cnt++] = cp;
+ cp += (strlen(cp) + 1);
}
stringClass = (*env)->FindClass(env, "java/lang/String");
if (stringClass == NULL) {
+ free(tab);
return NULL;
}
@@ -152,15 +159,18 @@
while (cnt-- > 0) {
js = (*env)->NewStringUTF(env, tab[cnt]);
if ((*env)->ExceptionCheck(env)) {
+ free(tab);
return NULL;
}
(*env)->SetObjectArrayElement(env, result, cnt, js);
if ((*env)->ExceptionCheck(env)) {
+ free(tab);
return NULL;
}
(*env)->DeleteLocalRef(env, js);
}
}
+ free(tab);
return result;
}
@@ -195,7 +205,7 @@
dprintf1("-String: %s\n", mszReaders);
}
- result = pcsc_multi2jstring(env, mszReaders, size);
+ result = pcsc_multi2jstring(env, mszReaders);
free(mszReaders);
return result;
}
--- a/jdk/test/ProblemList.txt Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/ProblemList.txt Tue Jun 03 07:35:35 2014 -0400
@@ -261,6 +261,10 @@
# 8041934
com/sun/jdi/RepStep.java generic-all
+# 8044419
+com/sun/jdi/JdbReadTwiceTest.sh generic-all
+
+
############################################################################
# jdk_util
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
@@ -937,18 +937,13 @@
equal(pb.redirectError(), Redirect.to(efile));
THROWS(IllegalArgumentException.class,
- new Fun(){void f() {
- pb.redirectInput(Redirect.to(ofile)); }},
- new Fun(){void f() {
- pb.redirectInput(Redirect.appendTo(ofile)); }},
- new Fun(){void f() {
- pb.redirectOutput(Redirect.from(ifile)); }},
- new Fun(){void f() {
- pb.redirectError(Redirect.from(ifile)); }});
+ () -> pb.redirectInput(Redirect.to(ofile)),
+ () -> pb.redirectOutput(Redirect.from(ifile)),
+ () -> pb.redirectError(Redirect.from(ifile)));
THROWS(IOException.class,
// Input file does not exist
- new Fun(){void f() throws Throwable { pb.start(); }});
+ () -> pb.start());
setFileContents(ifile, "standard input");
//----------------------------------------------------------------
@@ -1084,18 +1079,15 @@
= new FilePermission("<<ALL FILES>>", "read,write,execute");
THROWS(SecurityException.class,
- new Fun() { void f() throws IOException {
- policy.setPermissions(xPermission);
- redirectIO(pb, from(tmpFile), PIPE, PIPE);
- pb.start();}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(rxPermission);
- redirectIO(pb, PIPE, to(ofile), PIPE);
- pb.start();}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(rxPermission);
- redirectIO(pb, PIPE, PIPE, to(efile));
- pb.start();}});
+ () -> { policy.setPermissions(xPermission);
+ redirectIO(pb, from(tmpFile), PIPE, PIPE);
+ pb.start();},
+ () -> { policy.setPermissions(rxPermission);
+ redirectIO(pb, PIPE, to(ofile), PIPE);
+ pb.start();},
+ () -> { policy.setPermissions(rxPermission);
+ redirectIO(pb, PIPE, PIPE, to(efile));
+ pb.start();});
{
policy.setPermissions(rxPermission);
@@ -1258,10 +1250,10 @@
// System.getenv() is read-only.
//----------------------------------------------------------------
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ getenv().put("FOO","BAR");}},
- new Fun(){void f(){ getenv().remove("PATH");}},
- new Fun(){void f(){ getenv().keySet().remove("PATH");}},
- new Fun(){void f(){ getenv().values().remove("someValue");}});
+ () -> getenv().put("FOO","BAR"),
+ () -> getenv().remove("PATH"),
+ () -> getenv().keySet().remove("PATH"),
+ () -> getenv().values().remove("someValue"));
try {
Collection<Map.Entry<String,String>> c = getenv().entrySet();
@@ -1286,19 +1278,17 @@
{
final Map<String,String> m = new ProcessBuilder().environment();
THROWS(IllegalArgumentException.class,
- new Fun(){void f(){ m.put("FOO=","BAR");}},
- new Fun(){void f(){ m.put("FOO\u0000","BAR");}},
- new Fun(){void f(){ m.put("FOO","BAR\u0000");}});
+ () -> m.put("FOO=","BAR"),
+ () -> m.put("FOO\u0000","BAR"),
+ () -> m.put("FOO","BAR\u0000"));
}
//----------------------------------------------------------------
// Commands must never be null.
//----------------------------------------------------------------
THROWS(NullPointerException.class,
- new Fun(){void f(){
- new ProcessBuilder((List<String>)null);}},
- new Fun(){void f(){
- new ProcessBuilder().command((List<String>)null);}});
+ () -> new ProcessBuilder((List<String>)null),
+ () -> new ProcessBuilder().command((List<String>)null));
//----------------------------------------------------------------
// Put in a command; get the same one back out.
@@ -1323,25 +1313,18 @@
// Commands must contain at least one element.
//----------------------------------------------------------------
THROWS(IndexOutOfBoundsException.class,
- new Fun() { void f() throws IOException {
- new ProcessBuilder().start();}},
- new Fun() { void f() throws IOException {
- new ProcessBuilder(new ArrayList<String>()).start();}},
- new Fun() { void f() throws IOException {
- Runtime.getRuntime().exec(new String[]{});}});
+ () -> new ProcessBuilder().start(),
+ () -> new ProcessBuilder(new ArrayList<String>()).start(),
+ () -> Runtime.getRuntime().exec(new String[]{}));
//----------------------------------------------------------------
// Commands must not contain null elements at start() time.
//----------------------------------------------------------------
THROWS(NullPointerException.class,
- new Fun() { void f() throws IOException {
- new ProcessBuilder("foo",null,"bar").start();}},
- new Fun() { void f() throws IOException {
- new ProcessBuilder((String)null).start();}},
- new Fun() { void f() throws IOException {
- new ProcessBuilder(new String[]{null}).start();}},
- new Fun() { void f() throws IOException {
- new ProcessBuilder(new String[]{"foo",null,"bar"}).start();}});
+ () -> new ProcessBuilder("foo",null,"bar").start(),
+ () -> new ProcessBuilder((String)null).start(),
+ () -> new ProcessBuilder(new String[]{null}).start(),
+ () -> new ProcessBuilder(new String[]{"foo",null,"bar"}).start());
//----------------------------------------------------------------
// Command lists are growable.
@@ -1358,15 +1341,13 @@
try {
final Map<String,String> env = new ProcessBuilder().environment();
THROWS(NullPointerException.class,
- new Fun(){void f(){ env.put("foo",null);}},
- new Fun(){void f(){ env.put(null,"foo");}},
- new Fun(){void f(){ env.remove(null);}},
- new Fun(){void f(){
- for (Map.Entry<String,String> e : env.entrySet())
- e.setValue(null);}},
- new Fun() { void f() throws IOException {
- Runtime.getRuntime().exec(new String[]{"foo"},
- new String[]{null});}});
+ () -> env.put("foo",null),
+ () -> env.put(null,"foo"),
+ () -> env.remove(null),
+ () -> { for (Map.Entry<String,String> e : env.entrySet())
+ e.setValue(null);},
+ () -> Runtime.getRuntime().exec(new String[]{"foo"},
+ new String[]{null}));
} catch (Throwable t) { unexpected(t); }
//----------------------------------------------------------------
@@ -1375,10 +1356,10 @@
try {
final Map<String,String> env = new ProcessBuilder().environment();
THROWS(ClassCastException.class,
- new Fun(){void f(){ env.remove(TRUE);}},
- new Fun(){void f(){ env.keySet().remove(TRUE);}},
- new Fun(){void f(){ env.values().remove(TRUE);}},
- new Fun(){void f(){ env.entrySet().remove(TRUE);}});
+ () -> env.remove(TRUE),
+ () -> env.keySet().remove(TRUE),
+ () -> env.values().remove(TRUE),
+ () -> env.entrySet().remove(TRUE));
} catch (Throwable t) { unexpected(t); }
//----------------------------------------------------------------
@@ -1394,22 +1375,22 @@
// Nulls in environment queries are forbidden.
//----------------------------------------------------------------
THROWS(NullPointerException.class,
- new Fun(){void f(){ getenv(null);}},
- new Fun(){void f(){ env.get(null);}},
- new Fun(){void f(){ env.containsKey(null);}},
- new Fun(){void f(){ env.containsValue(null);}},
- new Fun(){void f(){ env.keySet().contains(null);}},
- new Fun(){void f(){ env.values().contains(null);}});
+ () -> getenv(null),
+ () -> env.get(null),
+ () -> env.containsKey(null),
+ () -> env.containsValue(null),
+ () -> env.keySet().contains(null),
+ () -> env.values().contains(null));
//----------------------------------------------------------------
// Non-String types in environment queries are forbidden.
//----------------------------------------------------------------
THROWS(ClassCastException.class,
- new Fun(){void f(){ env.get(TRUE);}},
- new Fun(){void f(){ env.containsKey(TRUE);}},
- new Fun(){void f(){ env.containsValue(TRUE);}},
- new Fun(){void f(){ env.keySet().contains(TRUE);}},
- new Fun(){void f(){ env.values().contains(TRUE);}});
+ () -> env.get(TRUE),
+ () -> env.containsKey(TRUE),
+ () -> env.containsValue(TRUE),
+ () -> env.keySet().contains(TRUE),
+ () -> env.values().contains(TRUE));
//----------------------------------------------------------------
// Illegal String values in environment queries are (grumble) OK
@@ -1427,12 +1408,11 @@
final Set<Map.Entry<String,String>> entrySet =
new ProcessBuilder().environment().entrySet();
THROWS(NullPointerException.class,
- new Fun(){void f(){ entrySet.contains(null);}});
+ () -> entrySet.contains(null));
THROWS(ClassCastException.class,
- new Fun(){void f(){ entrySet.contains(TRUE);}},
- new Fun(){void f(){
- entrySet.contains(
- new SimpleImmutableEntry<Boolean,String>(TRUE,""));}});
+ () -> entrySet.contains(TRUE),
+ () -> entrySet.contains(
+ new SimpleImmutableEntry<Boolean,String>(TRUE,"")));
check(! entrySet.contains
(new SimpleImmutableEntry<String,String>("", "")));
@@ -1902,8 +1882,7 @@
final ProcessBuilder pb =
new ProcessBuilder(new String[]{"unliKely"});
pb.environment().put("PATH", "suBdiR");
- THROWS(IOException.class,
- new Fun() {void f() throws Throwable {pb.start();}});
+ THROWS(IOException.class, () -> pb.start());
} catch (Throwable t) { unexpected(t);
} finally {
new File("suBdiR/unliKely").delete();
@@ -1976,10 +1955,8 @@
equal(SIZE, p.getInputStream().available());
equal(SIZE, p.getErrorStream().available());
THROWS(IOException.class,
- new Fun(){void f() throws IOException {
- p.getOutputStream().write((byte) '!');
- p.getOutputStream().flush();
- }});
+ () -> { p.getOutputStream().write((byte) '!');
+ p.getOutputStream().flush();});
final byte[] bytes = new byte[SIZE + 1];
equal(SIZE, p.getInputStream().read(bytes));
@@ -2006,12 +1983,9 @@
InputStream[] streams = { p.getInputStream(), p.getErrorStream() };
for (final InputStream in : streams) {
Fun[] ops = {
- new Fun(){void f() throws IOException {
- in.read(); }},
- new Fun(){void f() throws IOException {
- in.read(bytes); }},
- new Fun(){void f() throws IOException {
- in.available(); }}
+ () -> in.read(),
+ () -> in.read(bytes),
+ () -> in.available()
};
for (Fun op : ops) {
try {
@@ -2215,21 +2189,17 @@
} catch (Throwable t) { unexpected(t); }
THROWS(SecurityException.class,
- new Fun() { void f() throws IOException {
- policy.setPermissions(/* Nothing */);
- System.getenv("foo");}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(/* Nothing */);
- System.getenv();}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(/* Nothing */);
- new ProcessBuilder("echo").start();}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(/* Nothing */);
- Runtime.getRuntime().exec("echo");}},
- new Fun() { void f() throws IOException {
- policy.setPermissions(new RuntimePermission("getenv.bar"));
- System.getenv("foo");}});
+ () -> { policy.setPermissions(/* Nothing */);
+ System.getenv("foo");},
+ () -> { policy.setPermissions(/* Nothing */);
+ System.getenv();},
+ () -> { policy.setPermissions(/* Nothing */);
+ new ProcessBuilder("echo").start();},
+ () -> { policy.setPermissions(/* Nothing */);
+ Runtime.getRuntime().exec("echo");},
+ () -> { policy.setPermissions(
+ new RuntimePermission("getenv.bar"));
+ System.getenv("foo");});
try {
policy.setPermissions(new RuntimePermission("getenv.foo"));
@@ -2246,18 +2216,16 @@
= new FilePermission("<<ALL FILES>>", "execute");
THROWS(SecurityException.class,
- new Fun() { void f() throws IOException {
- // environment permission by itself insufficient
- policy.setPermissions(new RuntimePermission("getenv.*"));
- ProcessBuilder pb = new ProcessBuilder("env");
- pb.environment().put("foo","bar");
- pb.start();}},
- new Fun() { void f() throws IOException {
- // exec permission by itself insufficient
- policy.setPermissions(execPermission);
- ProcessBuilder pb = new ProcessBuilder("env");
- pb.environment().put("foo","bar");
- pb.start();}});
+ () -> { // environment permission by itself insufficient
+ policy.setPermissions(new RuntimePermission("getenv.*"));
+ ProcessBuilder pb = new ProcessBuilder("env");
+ pb.environment().put("foo","bar");
+ pb.start();},
+ () -> { // exec permission by itself insufficient
+ policy.setPermissions(execPermission);
+ ProcessBuilder pb = new ProcessBuilder("env");
+ pb.environment().put("foo","bar");
+ pb.start();});
try {
// Both permissions? OK.
@@ -2585,7 +2553,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/nio/charset/StandardCharsets/Standard.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/nio/charset/StandardCharsets/Standard.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -99,13 +99,6 @@
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new Exception("Some tests failed");
}
- private static abstract class Fun {abstract void f() throws Throwable;}
- private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
- for (Fun f : fs)
- try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
- catch (Throwable t) {
- if (k.isAssignableFrom(t.getClass())) pass();
- else unexpected(t);}}
static byte[] serializedForm(Object obj) {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
--- a/jdk/test/java/util/Collection/BiggernYours.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/Collection/BiggernYours.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -236,13 +236,6 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
- static void THROWS(Class<? extends Throwable> k, Fun... fs) {
- for (Fun f : fs)
- try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
- catch (Throwable t) {
- if (k.isAssignableFrom(t.getClass())) pass();
- else unexpected(t);}}
private static abstract class CheckedThread extends Thread {
abstract void realRun() throws Throwable;
public void run() {
--- a/jdk/test/java/util/Collection/IteratorAtEnd.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/Collection/IteratorAtEnd.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -84,9 +84,9 @@
try {
final Iterator it = c.iterator();
THROWS(NoSuchElementException.class,
- new Fun() {void f() { while (true) it.next(); }});
+ () -> { while (true) it.next(); });
try { it.remove(); }
- catch (UnsupportedOperationException _) { return; }
+ catch (UnsupportedOperationException exc) { return; }
pass();
} catch (Throwable t) { unexpected(t); }
@@ -96,10 +96,9 @@
final ListIterator it = list.listIterator(0);
it.next();
final Object x = it.previous();
- THROWS(NoSuchElementException.class,
- new Fun() {void f() { it.previous(); }});
+ THROWS(NoSuchElementException.class, () -> it.previous());
try { it.remove(); }
- catch (UnsupportedOperationException _) { return; }
+ catch (UnsupportedOperationException exc) { return; }
pass();
check(! list.get(0).equals(x));
} catch (Throwable t) { unexpected(t); }
@@ -108,10 +107,9 @@
final ListIterator it = list.listIterator(list.size());
it.previous();
final Object x = it.next();
- THROWS(NoSuchElementException.class,
- new Fun() {void f() { it.next(); }});
+ THROWS(NoSuchElementException.class, () -> it.next());
try { it.remove(); }
- catch (UnsupportedOperationException _) { return; }
+ catch (UnsupportedOperationException exc) { return; }
pass();
check(! list.get(list.size()-1).equals(x));
} catch (Throwable t) { unexpected(t); }
@@ -132,7 +130,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/Collection/MOAT.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/Collection/MOAT.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -117,10 +117,8 @@
final List<Integer> emptyArray = Arrays.asList(new Integer[]{});
testCollection(emptyArray);
testEmptyList(emptyArray);
- THROWS(IndexOutOfBoundsException.class,
- new Fun(){void f(){ emptyArray.set(0,1); }});
- THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ emptyArray.add(0,1); }});
+ THROWS(IndexOutOfBoundsException.class, () -> emptyArray.set(0,1));
+ THROWS(UnsupportedOperationException.class, () -> emptyArray.add(0,1));
List<Integer> noOne = nCopies(0,1);
testCollection(noOne);
@@ -204,8 +202,7 @@
if (rnd.nextBoolean())
check(! it.hasNext());
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){ it.next(); }});
+ THROWS(NoSuchElementException.class, () -> it.next());
try { it.remove(); }
catch (IllegalStateException ignored) { pass(); }
@@ -232,16 +229,15 @@
private static void testImmutableCollection(final Collection<Integer> c) {
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ c.add(99); }},
- new Fun(){void f(){ c.addAll(singleton(99)); }});
+ () -> c.add(99),
+ () -> c.addAll(singleton(99)));
if (! c.isEmpty()) {
final Integer first = c.iterator().next();
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ c.clear(); }},
- new Fun(){void f(){ c.remove(first); }},
- new Fun(){void f(){ c.removeAll(singleton(first)); }},
- new Fun(){void f(){ c.retainAll(emptyList()); }}
- );
+ () -> c.clear(),
+ () -> c.remove(first),
+ () -> c.removeAll(singleton(first)),
+ () -> c.retainAll(emptyList()));
}
}
@@ -253,17 +249,17 @@
testList(c);
testImmutableCollection(c);
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ c.set(0,42); }},
- new Fun(){void f(){ c.add(0,42); }},
- new Fun(){void f(){ c.addAll(0,singleton(86)); }});
+ () -> c.set(0,42),
+ () -> c.add(0,42),
+ () -> c.addAll(0,singleton(86)));
if (! c.isEmpty())
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){
- Iterator<Integer> it = c.iterator();
- it.next(); it.remove();}},
- new Fun(){void f(){
- ListIterator<Integer> it = c.listIterator();
- it.next(); it.remove();}});
+ () -> { Iterator<Integer> it = c.iterator();
+ it.next();
+ it.remove(); },
+ () -> { ListIterator<Integer> it = c.listIterator();
+ it.next();
+ it.remove(); });
}
private static void clear(Collection<Integer> c) {
@@ -290,19 +286,19 @@
private static void testImmutableMap(final Map<Integer,Integer> m) {
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ m.put(1,1); }},
- new Fun(){void f(){ m.putAll(singletonMap(1,1)); }});
+ () -> m.put(1,1),
+ () -> m.putAll(singletonMap(1,1)));
if (! m.isEmpty()) {
final Integer first = m.keySet().iterator().next();
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ m.remove(first); }},
- new Fun(){void f(){ m.clear(); }});
+ () -> m.remove(first),
+ () -> m.clear());
final Map.Entry<Integer,Integer> me
= m.entrySet().iterator().next();
Integer key = me.getKey();
Integer val = me.getValue();
THROWS(UnsupportedOperationException.class,
- new Fun(){void f(){ me.setValue(3); }});
+ () -> me.setValue(3));
equal(key, me.getKey());
equal(val, me.getValue());
}
@@ -492,9 +488,9 @@
// insert, query, remove element at head
if (isEmpty) {
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ deq.getFirst(); }},
- new Fun(){void f(){ deq.element(); }},
- new Fun(){void f(){ deq.iterator().next(); }});
+ () -> deq.getFirst(),
+ () -> deq.element(),
+ () -> deq.iterator().next());
check(deq.peekFirst() == null);
check(deq.peek() == null);
} else {
@@ -546,9 +542,9 @@
}
if (isEmpty) {
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ deq.getFirst(); }},
- new Fun(){void f(){ deq.element(); }},
- new Fun(){void f(){ deq.iterator().next(); }});
+ () -> deq.getFirst(),
+ () -> deq.element(),
+ () -> deq.iterator().next());
check(deq.peekFirst() == null);
check(deq.peek() == null);
} else {
@@ -571,8 +567,7 @@
// insert, query, remove element at tail
if (isEmpty) {
check(deq.peekLast() == null);
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){ deq.getLast(); }});
+ THROWS(NoSuchElementException.class, () -> deq.getLast());
} else {
check(deq.peekLast() != e);
check(deq.getLast() != e);
@@ -615,8 +610,7 @@
}
if (isEmpty) {
check(deq.peekLast() == null);
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){ deq.getLast(); }});
+ THROWS(NoSuchElementException.class, () -> deq.getLast());
} else {
check(deq.peekLast() != e);
check(deq.getLast() != e);
@@ -649,17 +643,17 @@
if (isList) {
check(!asList.listIterator().hasPrevious());
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ asList.listIterator().previous(); }});
+ () -> asList.listIterator().previous());
}
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ deq.iterator().next(); }},
- new Fun(){void f(){ deq.element(); }},
- new Fun(){void f(){ deq.getFirst(); }},
- new Fun(){void f(){ deq.getLast(); }},
- new Fun(){void f(){ deq.pop(); }},
- new Fun(){void f(){ deq.remove(); }},
- new Fun(){void f(){ deq.removeFirst(); }},
- new Fun(){void f(){ deq.removeLast(); }});
+ () -> deq.iterator().next(),
+ () -> deq.element(),
+ () -> deq.getFirst(),
+ () -> deq.getLast(),
+ () -> deq.pop(),
+ () -> deq.remove(),
+ () -> deq.removeFirst(),
+ () -> deq.removeLast());
check(deq.poll() == null);
check(deq.pollFirst() == null);
@@ -728,8 +722,8 @@
l.listIterator(0);
l.listIterator(l.size());
THROWS(IndexOutOfBoundsException.class,
- new Fun(){void f(){l.listIterator(-1);}},
- new Fun(){void f(){l.listIterator(l.size() + 1);}});
+ () -> l.listIterator(-1),
+ () -> l.listIterator(l.size() + 1));
if (l instanceof AbstractList) {
try {
@@ -1004,22 +998,22 @@
? (ConcurrentMap<T,Integer>) m
: null;
List<Fun> fs = new ArrayList<Fun>();
- fs.add(new Fun(){void f(){ check(! m.containsKey(null));}});
- fs.add(new Fun(){void f(){ equal(m.remove(null), null);}});
- fs.add(new Fun(){void f(){ equal(m.get(null), null);}});
- if (cm != null) {
- fs.add(new Fun(){void f(){ check(! cm.remove(null,null));}});}
+ fs.add(() -> check(! m.containsKey(null)));
+ fs.add(() -> equal(m.remove(null), null));
+ fs.add(() -> equal(m.get(null), null));
+ if (cm != null)
+ fs.add(() -> check(! cm.remove(null,null)));
throwsConsistently(NullPointerException.class, fs);
fs.clear();
final Map<T,Integer> sm = singletonMap(null,1);
- fs.add(new Fun(){void f(){ equal(m.put(null,1), null); m.clear();}});
- fs.add(new Fun(){void f(){ m.putAll(sm); m.clear();}});
+ fs.add(() -> { equal(m.put(null,1), null); m.clear();});
+ fs.add(() -> { m.putAll(sm); m.clear();});
if (cm != null) {
- fs.add(new Fun(){void f(){ check(! cm.remove(null,null));}});
- fs.add(new Fun(){void f(){ equal(cm.putIfAbsent(null,1), 1);}});
- fs.add(new Fun(){void f(){ equal(cm.replace(null,1), null);}});
- fs.add(new Fun(){void f(){ equal(cm.replace(null,1, 1), 1);}});
+ fs.add(() -> check(! cm.remove(null,null)));
+ fs.add(() -> equal(cm.putIfAbsent(null,1), 1));
+ fs.add(() -> equal(cm.replace(null,1), null));
+ fs.add(() -> equal(cm.replace(null,1, 1), 1));
}
throwsConsistently(NullPointerException.class, fs);
}
@@ -1180,8 +1174,7 @@
equalNext(it, 3);
equalNext(it, 1);
check(! it.hasNext());
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){it.next();}});
+ THROWS(NoSuchElementException.class, () -> it.next());
}
{
@@ -1191,8 +1184,7 @@
check(it.hasNext()); equal(it.next().getKey(), 3);
check(it.hasNext()); equal(it.next().getKey(), 1);
check(! it.hasNext());
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){it.next();}});
+ THROWS(NoSuchElementException.class, () -> it.next());
}
prepMapForDescItrTests(m);
@@ -1262,8 +1254,7 @@
equalNext(it, 3);
equalNext(it, 1);
check(! it.hasNext());
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){it.next();}});
+ THROWS(NoSuchElementException.class, () -> it.next());
}
prepSetForDescItrTests(s);
@@ -1365,7 +1356,7 @@
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new Exception("Some tests failed");
}
- private static abstract class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/Collections/AsLifoQueue.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/Collections/AsLifoQueue.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -56,8 +56,7 @@
equal(q.size(), 3);
check(! q.offer("d"));
equal(q.size(), 3);
- THROWS(IllegalStateException.class,
- new Fun(){void f(){ q.add("d"); }});
+ THROWS(IllegalStateException.class, () -> q.add("d"));
equal(q.size(), 3);
equal(q.toString(), "[c, b, a]");
equal(q.peek(), "c");
@@ -66,8 +65,7 @@
equal(q.poll(), "b");
equal(q.peek(), "a");
equal(q.remove(), "a");
- THROWS(NoSuchElementException.class,
- new Fun(){void f(){ q.remove(); }});
+ THROWS(NoSuchElementException.class, () -> q.remove());
equal(q.poll(), null);
check(q.isEmpty());
equal(q.size(), 0);
@@ -88,7 +86,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- static abstract class Fun { abstract void f() throws Throwable; }
+ interface Fun {void f() throws Throwable;}
private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/NavigableMap/LockStep.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/NavigableMap/LockStep.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -236,8 +236,8 @@
Comparator cmp = comparator(s);
if (s.isEmpty()) {
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ s.first(); }},
- new Fun(){void f(){ s.last(); }});
+ () -> s.first(),
+ () -> s.last());
equal(null, s.lower(1));
equal(null, s.floor(1));
equal(null, s.ceiling(1));
@@ -265,8 +265,7 @@
};
for (final Iterator it : its)
if (maybe(4))
- THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ THROWS(IllegalStateException.class, () -> it.remove());
Object prev = null;
for (Object e : s) {
check(s.contains(e));
@@ -284,7 +283,7 @@
for (final Iterator it : its) {
if (maybe(2))
check(! it.hasNext());
- Fun fun = new Fun(){void f(){ it.next(); }};
+ Fun fun = () -> it.next();
THROWS(NoSuchElementException.class, fun, fun, fun);
}
}
@@ -380,8 +379,8 @@
Comparator cmp = comparator(m);
if (m.isEmpty()) {
THROWS(NoSuchElementException.class,
- new Fun(){void f(){ m.firstKey(); }},
- new Fun(){void f(){ m.lastKey(); }});
+ () -> m.firstKey(),
+ () -> m.lastKey());
equal(null, m.firstEntry());
equal(null, m.lastEntry());
equal(null, m.pollFirstEntry());
@@ -430,8 +429,7 @@
Iterator[] its = concat(kits, vits, eits);
for (final Iterator it : its)
if (maybe(4))
- THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ THROWS(IllegalStateException.class, () -> it.remove());
Map.Entry prev = null;
for (Map.Entry e : (Set<Map.Entry>) m.entrySet()) {
Object k = e.getKey();
@@ -459,7 +457,7 @@
for (final Iterator it : its) {
if (maybe(2))
check(! it.hasNext());
- Fun fun = new Fun(){void f(){ it.next(); }};
+ Fun fun = () -> it.next();
THROWS(NoSuchElementException.class, fun, fun, fun);
}
}
@@ -633,7 +631,7 @@
}
static Fun remover(final Iterator it) {
- return new Fun(){void f(){ it.remove(); }};
+ return () -> it.remove();
}
static MapFrobber randomRemover(NavigableMap m) {
@@ -663,7 +661,7 @@
it.remove();
if (maybe(2))
THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ () -> it.remove());
}
checkUnusedKey(m, k);}},
new MapFrobber() {void frob(NavigableMap m) {
@@ -673,7 +671,7 @@
it.remove();
if (maybe(2))
THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ () -> it.remove());
}
checkUnusedKey(m, k);}},
new MapFrobber() {void frob(NavigableMap m) {
@@ -718,7 +716,7 @@
it.remove();
if (maybe(2))
THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ () -> it.remove());
}
checkUnusedElt(s, e);}},
new SetFrobber() {void frob(NavigableSet s) {
@@ -728,7 +726,7 @@
it.remove();
if (maybe(2))
THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ () -> it.remove());
}
checkUnusedElt(s, e);}},
new SetFrobber() {void frob(NavigableSet s) {
@@ -738,7 +736,7 @@
it.remove();
if (maybe(2))
THROWS(IllegalStateException.class,
- new Fun(){void f(){ it.remove(); }});
+ () -> it.remove());
}
checkUnusedElt(s, e);}}
};
@@ -769,12 +767,12 @@
for (final NavigableMap m : maps) {
final Object e = usedKey(m);
THROWS(IllegalArgumentException.class,
- new Fun(){void f(){m.subMap(e,true,e,false)
- .subMap(e,true,e,true);}},
- new Fun(){void f(){m.subMap(e,false,e,true)
- .subMap(e,true,e,true);}},
- new Fun(){void f(){m.tailMap(e,false).tailMap(e,true);}},
- new Fun(){void f(){m.headMap(e,false).headMap(e,true);}});
+ () -> {m.subMap(e,true,e,false)
+ .subMap(e,true,e,true);},
+ () -> {m.subMap(e,false,e,true)
+ .subMap(e,true,e,true);},
+ () -> m.tailMap(e,false).tailMap(e,true),
+ () -> m.headMap(e,false).headMap(e,true));
}
//System.out.printf("%s%n", m1);
for (int i = size; i > 0; i--) {
@@ -811,12 +809,12 @@
for (final NavigableSet s : sets) {
final Object e = usedElt(s);
THROWS(IllegalArgumentException.class,
- new Fun(){void f(){s.subSet(e,true,e,false)
- .subSet(e,true,e,true);}},
- new Fun(){void f(){s.subSet(e,false,e,true)
- .subSet(e,true,e,true);}},
- new Fun(){void f(){s.tailSet(e,false).tailSet(e,true);}},
- new Fun(){void f(){s.headSet(e,false).headSet(e,true);}});
+ () -> {s.subSet(e,true,e,false)
+ .subSet(e,true,e,true);},
+ () -> {s.subSet(e,false,e,true)
+ .subSet(e,true,e,true);},
+ () -> s.tailSet(e,false).tailSet(e,true),
+ () -> s.headSet(e,false).headSet(e,true));
}
//System.out.printf("%s%n", s1);
for (int i = size; i > 0; i--) {
@@ -847,7 +845,7 @@
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new Exception("Some tests failed");
}
- static abstract class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/PriorityQueue/ForgetMeNot.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/PriorityQueue/ForgetMeNot.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -37,16 +37,14 @@
private static void noMoreElements(final Iterator<Integer> it) {
for (int j = 0; j < 2; j++) {
- THROWS(NoSuchElementException.class,
- new Fun() { void f() { it.next(); }});
+ THROWS(NoSuchElementException.class, () -> it.next());
check(! it.hasNext());
}
}
private static void removeIsCurrentlyIllegal(final Iterator<Integer> it) {
for (int j = 0; j < 2; j++) {
- THROWS(IllegalStateException.class,
- new Fun() { void f() { it.remove(); }});
+ THROWS(IllegalStateException.class, () -> it.remove());
}
}
@@ -146,7 +144,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/concurrent/BlockingQueue/Interrupt.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/BlockingQueue/Interrupt.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -69,19 +69,13 @@
(BlockingDeque<Object>) q : null;
q.clear();
List<Fun> fs = new ArrayList<Fun>();
- fs.add(new Fun() { void f() throws Throwable
- { q.take(); }});
- fs.add(new Fun() { void f() throws Throwable
- { q.poll(60, SECONDS); }});
+ fs.add(() -> q.take());
+ fs.add(() -> q.poll(60, SECONDS));
if (deq != null) {
- fs.add(new Fun() { void f() throws Throwable
- { deq.takeFirst(); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.takeLast(); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.pollFirst(7, SECONDS); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.pollLast(7, SECONDS); }});
+ fs.add(() -> deq.takeFirst());
+ fs.add(() -> deq.takeLast());
+ fs.add(() -> deq.pollFirst(7, SECONDS));
+ fs.add(() -> deq.pollLast(7, SECONDS));
}
checkInterrupted(fs);
@@ -92,19 +86,13 @@
catch (Throwable t) { unexpected(t); }
fs.clear();
- fs.add(new Fun() { void f() throws Throwable
- { q.put(1); }});
- fs.add(new Fun() { void f() throws Throwable
- { q.offer(1, 7, SECONDS); }});
+ fs.add(() -> q.put(1));
+ fs.add(() -> q.offer(1, 7, SECONDS));
if (deq != null) {
- fs.add(new Fun() { void f() throws Throwable
- { deq.putFirst(1); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.putLast(1); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.offerFirst(1, 7, SECONDS); }});
- fs.add(new Fun() { void f() throws Throwable
- { deq.offerLast(1, 7, SECONDS); }});
+ fs.add(() -> deq.putFirst(1));
+ fs.add(() -> deq.putLast(1));
+ fs.add(() -> deq.offerFirst(1, 7, SECONDS));
+ fs.add(() -> deq.offerLast(1, 7, SECONDS));
}
checkInterrupted(fs);
} catch (Throwable t) {
@@ -135,5 +123,5 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private abstract static class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
}
--- a/jdk/test/java/util/concurrent/CyclicBarrier/Basic.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/CyclicBarrier/Basic.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -40,10 +40,8 @@
equal(barrier.getNumberWaiting(), 0);
THROWS(BrokenBarrierException.class,
- new Fun() { public void f() throws Throwable {
- barrier.await(); }},
- new Fun() { public void f() throws Throwable {
- barrier.await(100, MILLISECONDS); }});
+ () -> barrier.await(),
+ () -> barrier.await(100, MILLISECONDS));
}
private static void reset(CyclicBarrier barrier) {
@@ -417,7 +415,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- abstract static class Fun { abstract void f() throws Throwable; }
+ interface Fun {void f() throws Throwable;}
private static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/concurrent/Executors/Throws.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/Executors/Throws.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, 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
@@ -45,33 +45,31 @@
ThreadPoolExecutor executor) {}};
final RejectedExecutionHandler nullHandler = null;
- THROWS(
- NullPointerException.class,
- new Fun(){void f(){ newFixedThreadPool(3, null); }},
- new Fun(){void f(){ newCachedThreadPool(null); }},
- new Fun(){void f(){ newSingleThreadScheduledExecutor(null); }},
- new Fun(){void f(){ newScheduledThreadPool(0, null); }},
- new Fun(){void f(){ unconfigurableExecutorService(null); }},
- new Fun(){void f(){ unconfigurableScheduledExecutorService(null); }},
- new Fun(){void f(){ callable(null, "foo"); }},
- new Fun(){void f(){ callable((Runnable) null); }},
- new Fun(){void f(){ callable((PrivilegedAction<?>) null); }},
- new Fun(){void f(){ callable((PrivilegedExceptionAction<?>) null); }},
- new Fun(){void f(){ privilegedCallable((Callable<?>) null); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(0, nullFactory); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(0, nullFactory, reh); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(0, fac, nullHandler); }});
+ THROWS(NullPointerException.class,
+ () -> newFixedThreadPool(3, null),
+ () -> newCachedThreadPool(null),
+ () -> newSingleThreadScheduledExecutor(null),
+ () -> newScheduledThreadPool(0, null),
+ () -> unconfigurableExecutorService(null),
+ () -> unconfigurableScheduledExecutorService(null),
+ () -> callable(null, "foo"),
+ () -> callable((Runnable) null),
+ () -> callable((PrivilegedAction<?>) null),
+ () -> callable((PrivilegedExceptionAction<?>) null),
+ () -> privilegedCallable((Callable<?>) null),
+ () -> new ScheduledThreadPoolExecutor(0, nullFactory),
+ () -> new ScheduledThreadPoolExecutor(0, nullFactory, reh),
+ () -> new ScheduledThreadPoolExecutor(0, fac, nullHandler));
- THROWS(
- IllegalArgumentException.class,
- new Fun(){void f(){ newFixedThreadPool(-42); }},
- new Fun(){void f(){ newFixedThreadPool(0) ; }},
- new Fun(){void f(){ newFixedThreadPool(-42, fac); }},
- new Fun(){void f(){ newFixedThreadPool(0, fac); }},
- new Fun(){void f(){ newScheduledThreadPool(-42); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(-42); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(-42, reh); }},
- new Fun(){void f(){ new ScheduledThreadPoolExecutor(-42, fac, reh); }});
+ THROWS(IllegalArgumentException.class,
+ () -> newFixedThreadPool(-42),
+ () -> newFixedThreadPool(0),
+ () -> newFixedThreadPool(-42, fac),
+ () -> newFixedThreadPool(0, fac),
+ () -> newScheduledThreadPool(-42),
+ () -> new ScheduledThreadPoolExecutor(-42),
+ () -> new ScheduledThreadPoolExecutor(-42, reh),
+ () -> new ScheduledThreadPoolExecutor(-42, fac, reh));
try { newFixedThreadPool(1).shutdownNow(); pass(); }
catch (Throwable t) { unexpected(t); }
@@ -122,7 +120,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private abstract static class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/concurrent/FutureTask/Customized.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/FutureTask/Customized.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -70,8 +70,7 @@
check(! task.isDone());
check(! task.isCancelled());
THROWS(TimeoutException.class,
- new Fun(){void f() throws Throwable {
- task.get(0L, TimeUnit.SECONDS); }});
+ () -> task.get(0L, TimeUnit.SECONDS));
}
static <V> void checkDone(final FutureTask<V> task) {
@@ -86,20 +85,16 @@
check(task.isDone());
check(task.isCancelled());
THROWS(CancellationException.class,
- new Fun(){void f() throws Throwable {
- task.get(0L, TimeUnit.SECONDS); }},
- new Fun(){void f() throws Throwable {
- task.get(); }});
+ () -> task.get(0L, TimeUnit.SECONDS),
+ () -> task.get());
}
static <V> void checkThrew(final FutureTask<V> task) {
check(task.isDone());
check(! task.isCancelled());
THROWS(ExecutionException.class,
- new Fun(){void f() throws Throwable {
- task.get(0L, TimeUnit.SECONDS); }},
- new Fun(){void f() throws Throwable {
- task.get(); }});
+ () -> task.get(0L, TimeUnit.SECONDS),
+ () -> task.get());
}
static <V> void cancel(FutureTask<V> task, boolean mayInterruptIfRunning) {
@@ -203,7 +198,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private abstract static class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -72,7 +72,7 @@
check(((ThreadPoolExecutor) es).isTerminating()
|| es.isTerminated());
THROWS(RejectedExecutionException.class,
- new Fun() {void f() {es.execute(nop);}});
+ () -> es.execute(nop));
}
} catch (Throwable t) { unexpected(t); }
}
@@ -241,7 +241,7 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private abstract static class Fun {abstract void f() throws Throwable;}
+ interface Fun {void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ShutdownNowExecuteRace.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ShutdownNowExecuteRace.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
@@ -81,13 +81,6 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private abstract static class Fun {abstract void f() throws Throwable;}
- static void THROWS(Class<? extends Throwable> k, Fun... fs) {
- for (Fun f : fs)
- try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
- catch (Throwable t) {
- if (k.isAssignableFrom(t.getClass())) pass();
- else unexpected(t);}}
private abstract static class CheckedThread extends Thread {
abstract void realRun() throws Throwable;
public void run() {
--- a/jdk/test/sun/nio/cs/FindOneCharEncoderBugs.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/sun/nio/cs/FindOneCharEncoderBugs.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, 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
@@ -155,13 +155,6 @@
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
- static void THROWS(Class<? extends Throwable> k, Fun... fs) {
- for (Fun f : fs)
- try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
- catch (Throwable t) {
- if (k.isAssignableFrom(t.getClass())) pass();
- else unexpected(t);}}
private static abstract class CheckedThread extends Thread {
abstract void realRun() throws Throwable;
public void run() {
--- a/jdk/test/sun/security/krb5/auto/KDC.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/sun/security/krb5/auto/KDC.java Tue Jun 03 07:35:35 2014 -0400
@@ -141,6 +141,8 @@
private BlockingQueue<Job> q = new ArrayBlockingQueue<>(100);
// Options
private Map<Option,Object> options = new HashMap<>();
+ // Realm-specific krb5.conf settings
+ private List<String> conf = new ArrayList<>();
private Thread thread1, thread2, thread3;
DatagramSocket u1 = null;
@@ -243,7 +245,7 @@
/**
* Sets an option
* @param key the option name
- * @param obj the value
+ * @param value the value
*/
public void setOption(Option key, Object value) {
if (value == null) {
@@ -373,6 +375,13 @@
}
/**
+ * Add realm-specific krb5.conf setting
+ */
+ public void addConf(String s) {
+ conf.add(s);
+ }
+
+ /**
* Writes a krb5.conf for one or more KDC that includes KDC locations for
* each realm and the default realm name. You can also add extra strings
* into the file. The method should be called like:
@@ -397,6 +406,7 @@
* [realms]
* REALM.NAME = {
* kdc = host:port_number
+ * # realm-specific settings
* }
* </pre>
*
@@ -444,10 +454,10 @@
}
}
sb.append("\n[realms]\n");
- sb.append(realmLineForKDC(kdc));
+ sb.append(kdc.realmLine());
for (Object o: more) {
if (o instanceof KDC) {
- sb.append(realmLineForKDC((KDC)o));
+ sb.append(((KDC)o).realmLine());
}
}
FileOutputStream fos = new FileOutputStream(f);
@@ -1133,14 +1143,16 @@
/**
* Generates a line for a KDC to put inside [realms] of krb5.conf
- * @param kdc the KDC
- * @return REALM.NAME = { kdc = host:port }
+ * @return REALM.NAME = { kdc = host:port etc }
*/
- private static String realmLineForKDC(KDC kdc) {
- return String.format("%s = {\n kdc = %s:%d\n}\n",
- kdc.realm,
- kdc.kdc,
- kdc.port);
+ private String realmLine() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(realm).append(" = {\n kdc = ")
+ .append(kdc).append(':').append(port).append('\n');
+ for (String s: conf) {
+ sb.append(" ").append(s).append('\n');
+ }
+ return sb.append("}\n").toString();
}
/**
--- a/jdk/test/sun/security/krb5/auto/UdpTcp.java Tue Jun 03 07:34:35 2014 -0400
+++ b/jdk/test/sun/security/krb5/auto/UdpTcp.java Tue Jun 03 07:35:35 2014 -0400
@@ -43,9 +43,15 @@
OneKDC kdc = new OneKDC(null);
kdc.writeJAASConf();
- KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
- "udp_preference_limit = "
- + (args[0].equals("UDP") ? "1000" : "100"));
+ // Two styles of kdc_timeout setting. One global, one realm-specific.
+ if (args[0].equals("UDP")) {
+ KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+ "kdc_timeout = 10s");
+ } else {
+ kdc.addConf("kdc_timeout = 10s");
+ KDC.saveConfig(OneKDC.KRB5_CONF, kdc,
+ "udp_preference_limit = 1");
+ }
Config.refresh();
ByteArrayOutputStream bo = new ByteArrayOutputStream();
@@ -56,7 +62,7 @@
for (String line: new String(bo.toByteArray()).split("\n")) {
if (line.contains(">>> KDCCommunication")) {
- if (!line.contains(args[0])) {
+ if (!line.contains(args[0]) || !line.contains("timeout=10000")) {
throw new Exception("No " + args[0] + " in: " + line);
}
}
--- a/langtools/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -257,3 +257,4 @@
72efbe612e494f98b9c3ede1b4a3d02304e1e9cc jdk9-b12
2c8bb81b5d48161019218c7604fa88c67edc6105 jdk9-b13
1df3f53b9d980b66739f05e14053381ffb0f38ee jdk9-b14
+8666a9611eb8ba711b001bf8d942282e3e2d8e3d jdk9-b15
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Tue Jun 03 07:35:35 2014 -0400
@@ -4696,7 +4696,7 @@
assembleClassSig(rawOuter
? types.erasure(outer)
: outer);
- append('.');
+ append(rawOuter ? '$' : '.');
Assert.check(c.flatname.startsWith(c.owner.enclClass().flatname));
append(rawOuter
? c.flatname.subName(c.owner.enclClass().flatname.getByteLength() + 1, c.flatname.getByteLength())
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Tue Jun 03 07:35:35 2014 -0400
@@ -1221,25 +1221,102 @@
}
//slow path
+ Symbol sym = quicklyResolveMethod(env, tree);
+
+ if (sym == null) {
+ result = ArgumentExpressionKind.POLY;
+ return;
+ }
+
+ result = analyzeCandidateMethods(sym, ArgumentExpressionKind.PRIMITIVE,
+ argumentKindAnalyzer);
+ }
+ //where
+ private boolean isSimpleReceiver(JCTree rec) {
+ switch (rec.getTag()) {
+ case IDENT:
+ return true;
+ case SELECT:
+ return isSimpleReceiver(((JCFieldAccess)rec).selected);
+ case TYPEAPPLY:
+ case TYPEARRAY:
+ return true;
+ case ANNOTATED_TYPE:
+ return isSimpleReceiver(((JCAnnotatedType)rec).underlyingType);
+ case APPLY:
+ return true;
+ default:
+ return false;
+ }
+ }
+ private ArgumentExpressionKind reduce(ArgumentExpressionKind kind) {
+ return argumentKindAnalyzer.reduce(result, kind);
+ }
+ MethodAnalyzer<ArgumentExpressionKind> argumentKindAnalyzer =
+ new MethodAnalyzer<ArgumentExpressionKind>() {
+ @Override
+ public ArgumentExpressionKind process(MethodSymbol ms) {
+ return ArgumentExpressionKind.methodKind(ms, types);
+ }
+ @Override
+ public ArgumentExpressionKind reduce(ArgumentExpressionKind kind1,
+ ArgumentExpressionKind kind2) {
+ switch (kind1) {
+ case PRIMITIVE: return kind2;
+ case NO_POLY: return kind2.isPoly() ? kind2 : kind1;
+ case POLY: return kind1;
+ default:
+ Assert.error();
+ return null;
+ }
+ }
+ @Override
+ public boolean shouldStop(ArgumentExpressionKind result) {
+ return result.isPoly();
+ }
+ };
+
+ @Override
+ public void visitLiteral(JCLiteral tree) {
+ Type litType = attr.litType(tree.typetag);
+ result = ArgumentExpressionKind.standaloneKind(litType, types);
+ }
+
+ @Override
+ void skip(JCTree tree) {
+ result = ArgumentExpressionKind.NO_POLY;
+ }
+
+ private Symbol quicklyResolveMethod(Env<AttrContext> env, final JCMethodInvocation tree) {
final JCExpression rec = tree.meth.hasTag(SELECT) ?
((JCFieldAccess)tree.meth).selected :
null;
if (rec != null && !isSimpleReceiver(rec)) {
- //give up if receiver is too complex (to cut down analysis time)
- result = ArgumentExpressionKind.POLY;
- return;
+ return null;
}
- Type site = rec != null ?
- attribSpeculative(rec, env, attr.unknownTypeExprInfo).type :
- env.enclClass.sym.type;
+ Type site;
- while (site.hasTag(TYPEVAR)) {
- site = site.getUpperBound();
+ if (rec != null) {
+ if (rec.hasTag(APPLY)) {
+ Symbol recSym = quicklyResolveMethod(env, (JCMethodInvocation) rec);
+ if (recSym == null)
+ return null;
+ Symbol resolvedReturnType =
+ analyzeCandidateMethods(recSym, syms.errSymbol, returnSymbolAnalyzer);
+ if (resolvedReturnType == null)
+ return null;
+ site = resolvedReturnType.type;
+ } else {
+ site = attribSpeculative(rec, env, attr.unknownTypeExprInfo).type;
+ }
+ } else {
+ site = env.enclClass.sym.type;
}
List<Type> args = rs.dummyArgs(tree.args.length());
+ Name name = TreeInfo.name(tree.meth);
Resolve.LookupHelper lh = rs.new LookupHelper(name, site, args, List.<Type>nil(), MethodResolutionPhase.VARARITY) {
@Override
@@ -1254,61 +1331,60 @@
}
};
- Symbol sym = rs.lookupMethod(env, tree, site.tsym, rs.arityMethodCheck, lh);
+ return rs.lookupMethod(env, tree, site.tsym, rs.arityMethodCheck, lh);
+ }
+ //where:
+ MethodAnalyzer<Symbol> returnSymbolAnalyzer = new MethodAnalyzer<Symbol>() {
+ @Override
+ public Symbol process(MethodSymbol ms) {
+ ArgumentExpressionKind kind = ArgumentExpressionKind.methodKind(ms, types);
+ return kind != ArgumentExpressionKind.POLY ? ms.getReturnType().tsym : null;
+ }
+ @Override
+ public Symbol reduce(Symbol s1, Symbol s2) {
+ return s1 == syms.errSymbol ? s2 : s1 == s2 ? s1 : null;
+ }
+ @Override
+ public boolean shouldStop(Symbol result) {
+ return result == null;
+ }
+ };
- if (sym.kind == Kinds.AMBIGUOUS) {
- Resolve.AmbiguityError err = (Resolve.AmbiguityError)sym.baseSymbol();
- result = ArgumentExpressionKind.PRIMITIVE;
- for (Symbol s : err.ambiguousSyms) {
- if (result.isPoly()) break;
- if (s.kind == Kinds.MTH) {
- result = reduce(ArgumentExpressionKind.methodKind(s, types));
+ /**
+ * Process the result of Resolve.lookupMethod. If sym is a method symbol, the result of
+ * MethodAnalyzer.process is returned. If sym is an ambiguous symbol, all the candidate
+ * methods are inspected one by one, using MethodAnalyzer.process. The outcomes are
+ * reduced using MethodAnalyzer.reduce (using defaultValue as the first value over which
+ * the reduction runs). MethodAnalyzer.shouldStop can be used to stop the inspection early.
+ */
+ <E> E analyzeCandidateMethods(Symbol sym, E defaultValue, MethodAnalyzer<E> analyzer) {
+ switch (sym.kind) {
+ case Kinds.MTH:
+ return analyzer.process((MethodSymbol) sym);
+ case Kinds.AMBIGUOUS:
+ Resolve.AmbiguityError err = (Resolve.AmbiguityError)sym.baseSymbol();
+ E res = defaultValue;
+ for (Symbol s : err.ambiguousSyms) {
+ if (s.kind == Kinds.MTH) {
+ res = analyzer.reduce(res, analyzer.process((MethodSymbol) s));
+ if (analyzer.shouldStop(res))
+ return res;
+ }
}
- }
- } else {
- result = (sym.kind == Kinds.MTH) ?
- ArgumentExpressionKind.methodKind(sym, types) :
- ArgumentExpressionKind.NO_POLY;
+ return res;
+ default:
+ return defaultValue;
}
}
- //where
- private boolean isSimpleReceiver(JCTree rec) {
- switch (rec.getTag()) {
- case IDENT:
- return true;
- case SELECT:
- return isSimpleReceiver(((JCFieldAccess)rec).selected);
- case TYPEAPPLY:
- case TYPEARRAY:
- return true;
- case ANNOTATED_TYPE:
- return isSimpleReceiver(((JCAnnotatedType)rec).underlyingType);
- default:
- return false;
- }
- }
- private ArgumentExpressionKind reduce(ArgumentExpressionKind kind) {
- switch (result) {
- case PRIMITIVE: return kind;
- case NO_POLY: return kind.isPoly() ? kind : result;
- case POLY: return result;
- default:
- Assert.error();
- return null;
- }
- }
+ }
- @Override
- public void visitLiteral(JCLiteral tree) {
- Type litType = attr.litType(tree.typetag);
- result = ArgumentExpressionKind.standaloneKind(litType, types);
- }
+ /** Analyzer for methods - used by analyzeCandidateMethods. */
+ interface MethodAnalyzer<E> {
+ E process(MethodSymbol ms);
+ E reduce(E e1, E e2);
+ boolean shouldStop(E result);
+ }
- @Override
- void skip(JCTree tree) {
- result = ArgumentExpressionKind.NO_POLY;
- }
- }
//where
private EnumSet<JCTree.Tag> deferredCheckerTags =
EnumSet.of(LAMBDA, REFERENCE, PARENS, TYPECAST,
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java Tue Jun 03 07:35:35 2014 -0400
@@ -1925,6 +1925,13 @@
return aliveRanges.isEmpty() ? null : aliveRanges.get(aliveRanges.size() - 1);
}
+ void removeLastRange() {
+ Range lastRange = lastRange();
+ if (lastRange != null) {
+ aliveRanges.remove(lastRange);
+ }
+ }
+
@Override
public String toString() {
if (aliveRanges == null) {
@@ -1955,9 +1962,7 @@
}
}
} else {
- if (!aliveRanges.isEmpty()) {
- aliveRanges.remove(aliveRanges.size() - 1);
- }
+ removeLastRange();
}
}
@@ -1965,16 +1970,14 @@
if (aliveRanges.isEmpty()) {
return false;
}
- Range range = lastRange();
- return range.length == Character.MAX_VALUE;
+ return lastRange().length == Character.MAX_VALUE;
}
public boolean isLastRangeInitialized() {
if (aliveRanges.isEmpty()) {
return false;
}
- Range range = lastRange();
- return range.start_pc != Character.MAX_VALUE;
+ return lastRange().start_pc != Character.MAX_VALUE;
}
public Range getWidestRange() {
@@ -2095,7 +2098,7 @@
v.closeRange(length);
putVar(v);
} else {
- v.lastRange().start_pc = Character.MAX_VALUE;
+ v.removeLastRange();
}
}
}
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Jun 03 07:35:35 2014 -0400
@@ -1800,8 +1800,7 @@
genStat(tree.thenpart, env, CRT_STATEMENT | CRT_FLOW_TARGET);
thenExit = code.branch(goto_);
if (varDebugInfo && lvtRanges.containsKey(code.meth, tree.thenpart)) {
- code.closeAliveRanges(tree.thenpart,
- thenExit != null && tree.elsepart == null ? thenExit.pc : code.cp);
+ code.closeAliveRanges(tree.thenpart, code.cp);
}
}
if (elseChain != null) {
--- a/langtools/test/tools/javac/flow/LVTHarness.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/test/tools/javac/flow/LVTHarness.java Tue Jun 03 07:35:35 2014 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -23,8 +23,8 @@
/*
* @test
- * @bug 7047734 8027660
- * @summary The LVT is not generated correctly during some try/catch scenarios;
+ * @bug 7047734 8027660 8037937
+ * @summary The LVT is not generated correctly during some try/catch scenarios
* javac crash while creating LVT entry for a local variable defined in
* an inner block
* @library /tools/javac/lib
@@ -120,7 +120,7 @@
for (Map.Entry<ElementKey, AliveRanges> entry : aliveRangeMap.entrySet()) {
if (!seenAliveRanges.contains(entry.getKey())) {
error("Redundant @AliveRanges annotation on method " +
- entry.getKey().elem);
+ entry.getKey().elem + " with key " + entry.getKey());
}
}
}
@@ -134,7 +134,7 @@
for (Method method : classFile.methods) {
for (ElementKey elementKey: aliveRangeMap.keySet()) {
String methodDesc = method.getName(constantPool) +
- method.descriptor.getParameterTypes(constantPool);
+ method.descriptor.getParameterTypes(constantPool).replace(" ", "");
if (methodDesc.equals(elementKey.elem.toString())) {
checkMethod(constantPool, method, aliveRangeMap.get(elementKey));
seenAliveRanges.add(elementKey);
--- a/langtools/test/tools/javac/flow/tests/TestCaseIfElse.java Tue Jun 03 07:34:35 2014 -0400
+++ b/langtools/test/tools/javac/flow/tests/TestCaseIfElse.java Tue Jun 03 07:35:35 2014 -0400
@@ -33,7 +33,7 @@
@AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8)
@AliveRange(varName="o", bytecodeStart=21, bytecodeLength=9)
- void m2(String[] args) {
+ void m2() {
Object o;
int i = 5;
if (i != 5) {
@@ -45,4 +45,19 @@
}
o = "finish";
}
+
+ @AliveRange(varName="o", bytecodeStart=11, bytecodeLength=3)
+ @AliveRange(varName="o", bytecodeStart=17, bytecodeLength=2)
+ Object m3(boolean cond1, boolean cond2) {
+ Object o;
+ if (cond1) {
+ if (cond2) {
+ o = "then";
+ } else {
+ o = "else";
+ return null;
+ }
+ }
+ return null;
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/T8031967.java Tue Jun 03 07:35:35 2014 -0400
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2014, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8031967
+ * @summary Ensure javac can handle very deeply nested chain of method invocations occurring as
+ * a parameter to other method invocations.
+ * @run main T8031967
+ */
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+import com.sun.source.util.JavacTask;
+
+public class T8031967 {
+
+ public static void main(String... args) throws IOException {
+ new T8031967().run();
+ }
+
+ final int depth = 50;
+
+ private void run() throws IOException {
+ runTestCase(true);
+ runTestCase(false);
+ }
+
+ private void runTestCase(boolean withErrors) throws IOException {
+ StringBuilder code = new StringBuilder();
+
+ code.append("public class Test {\n" +
+ " private void test() {\n" +
+ " GroupLayout l = new GroupLayout();\n" +
+ " l.setHorizontalGroup(\n");
+
+ gen(code, depth);
+ code.append(" );\n" +
+ " }\n");
+ if (!withErrors) {
+ code.append(" class GroupLayout {\n" +
+ " ParallelGroup createParallelGroup() {return null;}\n" +
+ " ParallelGroup createParallelGroup(int i) {return null;}\n" +
+ " ParallelGroup createParallelGroup(int i, int j) {return null;}\n" +
+ " void setHorizontalGroup(Group g) { }\n" +
+ " }\n" +
+ " \n" +
+ " class Group {\n" +
+ " Group addGroup(Group g) { return this; }\n" +
+ " Group addGroup(int i, Group g) { return this; }\n" +
+ " Group addGap(int i) { return this; }\n" +
+ " Group addGap(long l) { return this; }\n" +
+ " Group addGap(int i, int j) { return this; }\n" +
+ " Group addComponent(Object c) { return this; }\n" +
+ " Group addComponent(int i, Object c) { return this; }\n" +
+ " }\n" +
+ " class ParallelGroup extends Group {\n" +
+ " Group addGroup(Group g) { return this; }\n" +
+ " Group addGroup(int i, Group g) { return this; }\n" +
+ " Group addGap(int i) { return this; }\n" +
+ " Group addGap(int i, int j) { return this; }\n" +
+ " Group addComponent(Object c) { return this; }\n" +
+ " Group addComponent(int i, Object c) { return this; }\n" +
+ " }\n");
+ }
+
+ code.append("}\n");
+
+ JavaSource source = new JavaSource(code.toString());
+ List<JavaSource> sourceList = Arrays.asList(source);
+ JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+ DiagnosticListener<JavaFileObject> noErrors = (diagnostic) -> {
+ throw new IllegalStateException("Should not produce errors: " + diagnostic);
+ };
+ JavacTask task = (JavacTask) compiler.getTask(null, null, withErrors ? null : noErrors,
+ null, null, sourceList);
+
+ task.analyze();
+ }
+
+ private void gen(StringBuilder code, int depth) {
+ code.append("l.createParallelGroup()\n");
+ if (depth > 0) {
+ code.append(".addGroup(\n");
+ gen(code, depth - 1);
+ code.append(")");
+ }
+
+ code.append(".addGap(1)\n" +
+ ".addComponent(new Object())\n" +
+ ".addGap(1)\n" +
+ ".addComponent(new Object())");
+ }
+
+ class JavaSource extends SimpleJavaFileObject {
+
+ final String code;
+ public JavaSource(String code) {
+ super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+ this.code = code;
+ }
+
+ @Override
+ public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+ return code;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/types/BadSigTest.java Tue Jun 03 07:35:35 2014 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8037934
+ * @summary Javac generates invalid signatures for local types
+ * @run main BadSigTest
+ */
+
+public class BadSigTest<Outer> {
+ void m(){
+ class Local1{}
+ class Local2 extends Local1{}
+ Local2.class.getTypeParameters();
+ }
+ public static void main(String[] args) {
+ new BadSigTest().m();
+ }
+}
--- a/nashorn/.hgtags Tue Jun 03 07:34:35 2014 -0400
+++ b/nashorn/.hgtags Tue Jun 03 07:35:35 2014 -0400
@@ -248,3 +248,4 @@
282e9a675e079cc84dbfaa4c10050f08397faab0 jdk9-b12
be4580ae56e2ef0ce521d3f840753eaa83cacf33 jdk9-b13
806df06b6ac58d3e9c9c6a680dbdd7a6c94ca700 jdk9-b14
+32b66f4661eac52f8b04fb3d7703feb2c96febb7 jdk9-b15
--- a/nashorn/make/build.xml Tue Jun 03 07:34:35 2014 -0400
+++ b/nashorn/make/build.xml Tue Jun 03 07:35:35 2014 -0400
@@ -196,14 +196,16 @@
</jar>
</target>
- <target name="javadoc" depends="prepare">
- <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html" windowtitle="${nashorn.product.name} ${nashorn.version}" additionalparam="-quiet" failonerror="true">
+ <target name="javadoc" depends="jar">
+ <javadoc destdir="${dist.javadoc.dir}" use="yes" overview="src/overview.html"
+ extdirs="${nashorn.ext.path}" windowtitle="${nashorn.product.name} ${nashorn.version}"
+ additionalparam="-quiet" failonerror="true">
<classpath>
<pathelement location="${build.classes.dir}"/>
</classpath>
<fileset dir="${src.dir}" includes="**/*.java"/>
<fileset dir="${jdk.asm.src.dir}" includes="**/*.java"/>
- <link href="http://docs.oracle.com/javase/7/docs/api/"/>
+ <link href="http://docs.oracle.com/javase/8/docs/api/"/>
<!-- The following tags are used only in ASM sources - just ignore these -->
<tag name="label" description="label tag in ASM sources" enabled="false"/>
<tag name="linked" description="linked tag in ASM sources" enabled="false"/>
@@ -211,6 +213,19 @@
</javadoc>
</target>
+ <!-- generate javadoc only for nashorn extension api classes -->
+ <target name="javadocapi" depends="jar">
+ <javadoc destdir="${dist.javadoc.dir}" use="yes" extdirs="${nashorn.ext.path}"
+ windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true">
+ <classpath>
+ <pathelement location="${build.classes.dir}"/>
+ </classpath>
+ <fileset dir="${src.dir}" includes="jdk/nashorn/api/**/*.java"/>
+ <link href="http://docs.oracle.com/javase/8/docs/api/"/>
+ </javadoc>
+ </target>
+
+
<!-- generate shell.html for shell tool documentation -->
<target name="shelldoc" depends="jar">
<java classname="${nashorn.shell.tool}" dir="${basedir}" output="${dist.dir}/shell.html" failonerror="true" fork="true">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/filebrowser.js Tue Jun 03 07:35:35 2014 -0400
@@ -0,0 +1,100 @@
+#// Usage: jjs -fx filebrowser.js -- <start_dir>
+
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Uses -fx and javafx TreeView to visualize directories
+if (!$OPTIONS._fx) {
+ print("Usage: jjs -fx filebrowser.js -- <start_dir>");
+ exit(1);
+}
+
+// Java classes used
+var File = Java.type("java.io.File");
+var Files = Java.type("java.nio.file.Files");
+
+// check directory argument, if passed
+var dir = arguments.length > 0? new File(arguments[0]) : new File(".");
+if (! dir.isDirectory()) {
+ print(dir + " is not a directory!");
+ exit(2);
+}
+
+// JavaFX classes used
+var FXCollections = Java.type("javafx.collections.FXCollections");
+var Scene = Java.type("javafx.scene.Scene");
+var TreeItem = Java.type("javafx.scene.control.TreeItem");
+var TreeView = Java.type("javafx.scene.control.TreeView");
+
+// create a subclass of JavaFX TreeItem class
+var LazyTreeItem = Java.extend(TreeItem);
+
+// lazily filling children of a directory LazyTreeItem
+function buildChildren(dir) {
+ var children = FXCollections.observableArrayList();
+ var stream = Files.list(dir.toPath());
+ stream.forEach(function(path) {
+ var file = path.toFile();
+ var item = file.isDirectory()?
+ makeLazyTreeItem(file) : new TreeItem(file.name);
+ children.add(item);
+ });
+ stream.close();
+ return children;
+}
+
+// create an instance LazyTreeItem with override methods
+function makeLazyTreeItem(dir) {
+ var item = new LazyTreeItem(dir.name) {
+ expanded: false,
+ isLeaf: function() false,
+ getChildren: function() {
+ if (! this.expanded) {
+ // call super class (TreeItem) method
+ Java.super(item).getChildren().setAll(buildChildren(dir));
+ this.expanded = true;
+ }
+ // call super class (TreeItem) method
+ return Java.super(item).getChildren();
+ }
+ }
+ return item;
+}
+
+// JavaFX start method
+function start(stage) {
+ stage.title = dir.absolutePath;
+ var rootItem = makeLazyTreeItem(dir);
+ rootItem.expanded = true;
+ var tree = new TreeView(rootItem);
+ stage.scene = new Scene(tree, 300, 450);
+ stage.show();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/samples/word_histogram.js Tue Jun 03 07:35:35 2014 -0400
@@ -0,0 +1,53 @@
+#nashorn word histogram of a file
+
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This example demonstrates how to print word histogram
+ * of a given text file using regex, array and JSON
+ * functions.
+ */
+
+if (arguments.length < 1) {
+ print("Usage: jjs -scripting word_histogram.js -- <file>");
+ exit(1);
+}
+
+var obj = {};
+
+readFully(arguments[0]).
+ split(/[^\w+]/).
+ forEach(function(x)
+ (x in obj? obj[x]++ : obj[x] = 1));
+
+print(JSON.stringify(obj));
+
--- a/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java Tue Jun 03 07:34:35 2014 -0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java Tue Jun 03 07:35:35 2014 -0400
@@ -621,6 +621,7 @@
/**
* Utilitity to convert this script object to the given type.
*
+ * @param <T> destination type to convert to
* @param type destination type to convert to
* @return converted object
*/
--- a/nashorn/src/jdk/nashorn/api/scripting/package-info.java Tue Jun 03 07:34:35 2014 -0400
+++ b/nashorn/src/jdk/nashorn/api/scripting/package-info.java Tue Jun 03 07:35:35 2014 -0400
@@ -32,7 +32,8 @@
* ScriptEngine nashornEngine = new ScriptEngineManager().getEngineByName("Nashorn");
* </pre>
* <p>Nashorn script engines implement the optional {@link javax.script.Invocable} and {@link javax.script.Compilable}
- * interfaces, allowing for efficient pre-compilation and repeated execution of scripts. See
+ * interfaces, allowing for efficient pre-compilation and repeated execution of scripts. In addition,
+ * this package provides nashorn specific extension classes, interfaces and methods. See
* {@link jdk.nashorn.api.scripting.NashornScriptEngineFactory} for further details.
*/
package jdk.nashorn.api.scripting;
--- a/nashorn/src/jdk/nashorn/internal/ir/annotations/Reference.java Tue Jun 03 07:34:35 2014 -0400
+++ b/nashorn/src/jdk/nashorn/internal/ir/annotations/Reference.java Tue Jun 03 07:35:35 2014 -0400
@@ -32,9 +32,7 @@
* Reference node in AST, i.e. anything not a copy. Important for
* AST traversal and cloning. Cloning currently as a rule uses
* existingOrSame for references and otherwise existingOrCopy
- * <p>
*/
-
@Retention(value=RetentionPolicy.RUNTIME)
public @interface Reference {
// EMPTY