This commit is contained in:
Sean Mullan 2014-06-03 07:35:35 -04:00
commit 33c9aaf7d8
140 changed files with 1159 additions and 2272 deletions

View File

@ -257,3 +257,4 @@ efe7dbc6088691757404e0c8745f894e3ca9c022 jdk9-b09
0d1f816217dce5e72187f167cc1816080cbeb453 jdk9-b12
1a30593dcb9802faec3b6edb24d86ca088594e4e jdk9-b13
97932f6ad950ae5a73a9da5c96e6e58503ff646b jdk9-b14
74eb0778e4f2dbff6628e718378449fba27c4265 jdk9-b15

View File

@ -257,3 +257,4 @@ ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
59f6350295f9681fe5956d8bc889bf341914c6cb jdk9-b12
5800456add07e1a68170a229fb5e27376f8875e5 jdk9-b13
4e3aa9723e9972623e3dafc321b368e7db7e9b3b jdk9-b14
b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15

View File

@ -257,3 +257,4 @@ a4bf701ac316946c2e5e83138ad8e687da6a4b30 jdk9-b06
e212cdcc8c11f0ba5acf6f5ddb596c4c545a93f9 jdk9-b12
088eec4c36f4d7f250fcd19c4969bf698e3d2cdc jdk9-b13
a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14
e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15

View File

@ -417,3 +417,4 @@ ebc44d040cd149d2120d69fe183a3dae7840f4b4 jdk9-b10
1c383bb39e2849ca62cb763f4e182a29b421d60a jdk9-b12
456ad9c99133803d4e1433124c85a6fd141b9ac9 jdk9-b13
bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14
170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15

View File

@ -257,3 +257,4 @@ f93a792fe37279d4d37aea86a99f3abbdc6fe79b jdk9-b09
e88cecf5a21b760ff7d7761c2db6bb8c82bc9f0c jdk9-b12
5eaf717f6e36037a6d3744ffeee0e4c88e64a0d2 jdk9-b13
32b3fc4bc7374a34d52b7f4e2391b4b4b0c084e8 jdk9-b14
6bad71866c7598587860e0981b0b0e51ec8c0476 jdk9-b15

View File

@ -260,3 +260,4 @@ c9e8bb8c1144a966ca7b481142c6b5e55d14a29c jdk9-b09
779f8b21c75f83e3918dac8499e4d0ecb3a54ed7 jdk9-b12
3d42204854c9f703e3ccdc8891248e73057713ab jdk9-b13
02e58850b7062825308413d420f2b02c1f25a724 jdk9-b14
e9780330017a6b464a385356d77e5136f9de8d09 jdk9-b15

View File

@ -257,3 +257,4 @@ ab06ba2894313a47e4969ca37792ff119c49e711 jdk9-b10
83d9bc20973de232cae45b139fdff8a4549c130f jdk9-b12
c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
5c7a17a81afd0906b53ee31d95a3211c96ff6b25 jdk9-b14
4537360f09fe23ab339ee588747b657feb12d0c8 jdk9-b15

View File

@ -442,11 +442,6 @@ else
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++

View File

@ -30,7 +30,6 @@ COPY_PATTERNS := .icu _dict .dat _options .js aliasmap .spp .wav .css \
# 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 \

View File

@ -552,40 +552,53 @@ $(eval $(call SetupArchive,BUILD_CT_SYM, $(IMAGES_OUTPUTDIR)/symbols/_the.symbol
##########################################################################################
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 MakeDir, $(IMAGES_OUTPUTDIR)/src))
$(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)))

View File

@ -27,7 +27,7 @@ DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-
# 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

View File

@ -88,7 +88,7 @@ PROFILE_2_RTJAR_INCLUDE_PACKAGES := \
java/sql \
javax/rmi/ssl \
javax/sql \
javax/transaction \
javax/transaction/xa \
javax/xml \
org/w3c \
org/xml/sax \
@ -223,7 +223,8 @@ FULL_JRE_RTJAR_INCLUDE_TYPES := \
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 :=

View File

@ -512,7 +512,7 @@ class ConstantPool {
}
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;
}

View File

@ -102,7 +102,7 @@ public final class CorbanameUrl {
}
location = url.substring(addrStart, addrEnd);
int keyStart = location.indexOf("/");
int keyStart = location.indexOf('/');
if (keyStart >= 0) {
// Has key string
if (keyStart == (location.length() -1)) {

View File

@ -336,7 +336,7 @@ public class RegistryContext implements Context, Referenceable {
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);

View File

@ -149,7 +149,7 @@ abstract public class GenericURLContext implements Context {
* 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 @@ abstract public class GenericURLContext implements Context {
start += 2; // skip double slash
// find last slash
int posn = url.indexOf("/", start);
int posn = url.indexOf('/', start);
if (posn >= 0) {
start = posn;
} else {

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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) >

View File

@ -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>

View File

@ -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>

View File

@ -303,7 +303,7 @@ public final class ExecOptionPermission extends Permission
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 @@ public final class ExecOptionPermission extends Permission
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);

View File

@ -6831,7 +6831,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
// 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

View File

@ -910,7 +910,7 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
// now remove the last ","
strWhereClause = strWhereClause.substring
(0, strWhereClause.lastIndexOf(","));
(0, strWhereClause.lastIndexOf(','));
// Add from clause
strWhereClause = strWhereClause.concat(" from ");
@ -920,7 +920,7 @@ public class JoinRowSetImpl extends WebRowSetImpl implements JoinRowSet {
//Remove the last ","
strWhereClause = strWhereClause.substring
(0, strWhereClause.lastIndexOf(","));
(0, strWhereClause.lastIndexOf(','));
// Add the where clause
strWhereClause = strWhereClause.concat(" where ");

View File

@ -240,7 +240,7 @@ public class WebRowSetXmlWriter implements XmlWriter, Serializable {
// 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");

View File

@ -1147,7 +1147,7 @@ public class XmlReaderContentHandler extends DefaultHandler {
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;

View File

@ -39,7 +39,7 @@ import org.xml.sax.InputSource;
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));

View File

@ -694,7 +694,7 @@ public class JndiLoginModule implements LoginModule {
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 + " "

View File

@ -400,7 +400,7 @@ public class LdapLoginModule implements LoginModule {
// 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));
}
}

View File

@ -857,7 +857,7 @@ public class CommandInterpreter {
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;

View File

@ -1079,7 +1079,7 @@ class Commands {
}
} 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);

View File

@ -67,7 +67,7 @@ class AllClassesQuery extends QueryHandler {
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>";

View File

@ -1926,9 +1926,9 @@ public abstract class Path2D implements Shape, Cloneable {
* 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

View File

@ -1296,7 +1296,7 @@ public final class Class<T> implements java.io.Serializable,
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

View File

@ -2133,7 +2133,7 @@ public abstract class ClassLoader {
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 @@ public abstract class ClassLoader {
result = packageAssertionStatus.get(className);
if (result != null)
return result.booleanValue();
dotIndex = className.lastIndexOf(".", dotIndex-1);
dotIndex = className.lastIndexOf('.', dotIndex-1);
}
// Return the classloader default

View File

@ -85,7 +85,7 @@ class InvokerBytecodeGenerator {
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);
}

View File

@ -607,7 +607,7 @@ class LambdaForm {
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);
}

View File

@ -692,8 +692,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
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

View File

@ -91,8 +91,10 @@ final class MethodTypeForm {
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;
}

View File

@ -294,7 +294,7 @@ public class CookieManager extends CookieHandler
// 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 @@ public class CookieManager extends CookieHandler
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 @@ public class CookieManager extends CookieHandler
} catch (NumberFormatException numberFormatException) {
}
lst = lst.substring(i+1);
i = lst.indexOf(",");
i = lst.indexOf(',');
}
if (!lst.isEmpty()) {
try {

View File

@ -1138,7 +1138,7 @@ class InetAddress implements java.io.Serializable {
// 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);

View File

@ -1017,7 +1017,7 @@ class Socket implements java.io.Closeable {
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");

View File

@ -777,7 +777,7 @@ public final class SocketPermission extends Permission
// Literal IPv6 address
host = getName().substring(1, getName().indexOf(']'));
} else {
int i = getName().indexOf(":");
int i = getName().indexOf(':');
if (i == -1)
host = getName();
else {

View File

@ -368,7 +368,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
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 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
String host = saddr.getHostString();
// IPv6 litteral?
if (saddr.getAddress() instanceof Inet6Address &&
(!host.startsWith("[")) && (host.indexOf(":") >= 0)) {
(!host.startsWith("[")) && (host.indexOf(':') >= 0)) {
host = "[" + host + "]";
}
try {

View File

@ -1851,9 +1851,9 @@ public final class URI
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 @@ public final class URI
* 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;

View File

@ -430,7 +430,7 @@ final class BasicPermissionCollection
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);

View File

@ -931,7 +931,7 @@ public abstract class Provider extends Properties {
}
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 "

View File

@ -1114,7 +1114,7 @@ public final class Security {
// 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));
}

View File

@ -546,7 +546,7 @@ final class PropertyPermissionCollection extends PermissionCollection
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);

View File

@ -276,7 +276,7 @@ class JarVerifier {
// 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<>();

View File

@ -779,7 +779,7 @@ public class LogManager {
int ix = 1;
for (;;) {
int ix2 = name.indexOf(".", ix);
int ix2 = name.indexOf('.', ix);
if (ix2 < 0) {
break;
}
@ -802,7 +802,7 @@ public class LogManager {
}
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);

View File

@ -174,7 +174,7 @@ public class XMLFormatter extends Formatter {
// 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 {

View File

@ -290,7 +290,7 @@ public class MBeanPermission extends Permission {
// Parse ObjectName
int openingBracket = name.indexOf("[");
int openingBracket = name.indexOf('[');
if (openingBracket == -1) {
// If "[on]" missing then ObjectName("*:*")
//
@ -329,7 +329,7 @@ public class MBeanPermission extends Permission {
// Parse member
int poundSign = name.indexOf("#");
int poundSign = name.indexOf('#');
if (poundSign == -1)
setMember("*");

View File

@ -329,7 +329,7 @@ public class DescriptorSupport
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 @@ public class DescriptorSupport
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)) {

View File

@ -934,7 +934,7 @@ public class RequiredModelMBean
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 @@ public class RequiredModelMBean
/* 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);

View File

@ -495,7 +495,7 @@ public final class PrivateCredentialPermission extends Permission {
// 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();

View File

@ -600,7 +600,7 @@ public class Sasl {
// 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);

View File

@ -785,11 +785,29 @@ public class ClassWriter extends ClassVisitor {
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

View File

@ -1455,16 +1455,20 @@ final class Frame {
| 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

View File

@ -230,6 +230,7 @@ final class Item {
* @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 @@ final class Item {
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());

View File

@ -502,7 +502,7 @@ public class Label {
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;
}

View File

@ -1430,6 +1430,14 @@ class MethodWriter extends MethodVisitor {
@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 @@ class MethodWriter extends MethodVisitor {
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 @@ class MethodWriter extends MethodVisitor {
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 @@ class MethodWriter extends MethodVisitor {
}
}
// 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;
}
} else {
// updates the stack map frame labels
if (compute == FRAMES) {
Label l = labels;
while (l != null) {
/*
* 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.
* 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.
*/
cw.invalidFrames = true;
u = l.position - 3;
if (u >= 0 && resize[u]) {
l.status |= Label.TARGET;
}
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;

View File

@ -585,11 +585,11 @@ public class Type {
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:

View File

@ -1089,7 +1089,7 @@ public class InstructionAdapter extends MethodVisitor {
@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;
}

View File

@ -205,7 +205,7 @@ public class Method {
}
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 @@ public class Method {
return type;
}
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
int index = 0;
while ((index = type.indexOf("[]", index) + 1) > 0) {
sb.append('[');

View File

@ -147,17 +147,17 @@ public abstract class Remapper {
}
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) {

View File

@ -239,7 +239,9 @@ public class SerialVersionUIDAdder extends ClassVisitor {
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);

View File

@ -351,7 +351,7 @@ public class MethodNode extends MethodVisitor {
}
@Override
@SuppressWarnings("serial") // Anonymous class
@SuppressWarnings("serial")
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationNode(new ArrayList<Object>(0) {
@Override

View File

@ -66,7 +66,7 @@ import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
* @author Bing Ran
* @author Eric Bruneton
*/
@SuppressWarnings("serial") // implementation class
@SuppressWarnings("serial")
public class AnalyzerException extends Exception {
public final AbstractInsnNode node;

View File

@ -754,14 +754,14 @@ public class Frame<V extends Value> {
*/
@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();
}
}

View File

@ -206,7 +206,6 @@ public class ASMifier extends Printer {
}
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");

View File

@ -298,26 +298,26 @@ public class CheckClassAdapter extends ClassVisitor {
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);

View File

@ -443,7 +443,7 @@ public class Textifier extends Printer {
}
buf.append(tab);
appendAccess(access);
appendAccess(access & ~Opcodes.ACC_VOLATILE);
if ((access & Opcodes.ACC_NATIVE) != 0) {
buf.append("native ");
}

View File

@ -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)

View File

@ -84,7 +84,7 @@ public abstract class AbstractMonitor implements Monitor {
* {@inheritDoc}
*/
public String getBaseName() {
int baseIndex = name.lastIndexOf(".")+1;
int baseIndex = name.lastIndexOf('.') + 1;
return name.substring(baseIndex);
}

View File

@ -138,8 +138,8 @@ public class HostIdentifier {
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

View File

@ -68,7 +68,7 @@ public class StackTraceElementCompositeData extends LazyCompositeData {
ste.getMethodName(),
ste.getFileName(),
new Integer(ste.getLineNumber()),
new Boolean(ste.isNativeMethod()),
ste.isNativeMethod(),
};
try {
return new CompositeDataSupport(stackTraceElementCompositeType,

View File

@ -120,8 +120,8 @@ public class ThreadInfoCompositeData extends LazyCompositeData {
new Long(threadInfo.getLockOwnerId()),
threadInfo.getLockOwnerName(),
stackTraceData,
new Boolean(threadInfo.isSuspended()),
new Boolean(threadInfo.isInNative()),
threadInfo.isSuspended(),
threadInfo.isInNative(),
lockedMonitorsData,
lockedSyncsData,
};

View File

@ -59,7 +59,7 @@ public class VMOptionCompositeData extends LazyCompositeData {
final Object[] vmOptionItemValues = {
option.getName(),
option.getValue(),
new Boolean(option.isWriteable()),
option.isWriteable(),
option.getOrigin().toString(),
};

View File

@ -70,8 +70,8 @@ public class NotificationTargetImpl implements NotificationTarget {
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 @@ public class NotificationTargetImpl implements NotificationTarget {
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 @@ public class NotificationTargetImpl implements NotificationTarget {
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());

View File

@ -273,8 +273,8 @@ public class ExtensionInfo {
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 @@ public class ExtensionInfo {
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)
{

View File

@ -172,7 +172,7 @@ public class JarIndex {
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 class JarIndex {
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;

View File

@ -793,7 +793,7 @@ public class URLClassPath {
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 @@ public class URLClassPath {
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 @@ public class URLClassPath {
*/
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)));
}

View File

@ -258,7 +258,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
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 class FtpClient extends sun.net.ftp.FtpClient {
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 @@ public class FtpClient extends sun.net.ftp.FtpClient {
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 @@ public class FtpClient extends sun.net.ftp.FtpClient {
s = line;
line = "";
}
i = s.indexOf("=");
i = s.indexOf('=');
if (i > 0) {
String fact = s.substring(0, i);
String value = s.substring(i + 1);

View File

@ -325,7 +325,7 @@ public final class DNSNameService implements NameService {
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);

View File

@ -132,7 +132,7 @@ public class IPAddressUtil {
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;
}

View File

@ -356,8 +356,8 @@ public class ParseUtil {
* 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 @@ public class ParseUtil {
} 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;

View File

@ -341,6 +341,6 @@ public final class ReflectUtil {
* (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;
}
}

View File

@ -426,7 +426,7 @@ public abstract class Log {
* 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);
}

View File

@ -141,7 +141,7 @@ public final class CGIHandler {
{
try {
String command, param;
int delim = QueryString.indexOf("=");
int delim = QueryString.indexOf('=');
if (delim == -1) {
command = QueryString;
param = "";

View File

@ -50,8 +50,8 @@ public class GSSManagerImpl extends GSSManager {
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;
}

View File

@ -39,7 +39,7 @@ class Krb5Util {
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);

View File

@ -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 @@ public final class KdcComm {
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");
@ -425,6 +426,25 @@ public final class KdcComm {
}
}
/**
* 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:
@ -446,7 +466,11 @@ public final class KdcComm {
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
}

View File

@ -1271,7 +1271,7 @@ public class PolicyFile extends java.security.Policy {
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 @@ public class PolicyFile extends java.security.Policy {
int colonIndex;
String prefix = value;
String suffix;
if ((colonIndex = value.indexOf(":")) != -1) {
if ((colonIndex = value.indexOf(':')) != -1) {
prefix = value.substring(0, colonIndex);
}

View File

@ -338,7 +338,7 @@ final class SunX509KeyManagerImpl extends X509ExtendedKeyManager {
}
String sigType;
if (keyType.contains("_")) {
int k = keyType.indexOf("_");
int k = keyType.indexOf('_');
sigType = keyType.substring(k + 1);
keyType = keyType.substring(0, k);
} else {

View File

@ -302,7 +302,7 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager
final String sigKeyAlgorithm;
KeyType(String algorithm) {
int k = algorithm.indexOf("_");
int k = algorithm.indexOf('_');
if (k == -1) {
keyAlgorithm = algorithm;
sigKeyAlgorithm = null;

View File

@ -300,8 +300,8 @@ public class HostnameChecker {
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 @@ public class HostnameChecker {
*/
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 @@ public class HostnameChecker {
// update the match scope
name = name.substring(beforeStartIdx + beforeWildcard.length());
wildcardIdx = afterWildcard.indexOf("*");
wildcardIdx = afterWildcard.indexOf('*');
}
return name.endsWith(afterWildcard);
}

View File

@ -98,7 +98,7 @@ public class SignatureFileVerifier {
} 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;

View File

@ -185,7 +185,7 @@ public class CRLExtensions {
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;

Some files were not shown because too many files have changed in this diff Show More