Merge
This commit is contained in:
commit
e0d8e2bdbb
.hgtags.hgtags-top-repo
common/bin
corba
hotspot
jaxp
.hgtags
test/javax/xml/jaxp
functional/test/auctionportal
internaltest
libs/test/auctionportal
unittest
jaxws
jdk
.hgtags
make
src
demo/share
java.base/share/classes
java
lang
security
text
util
javax
jdk/internal/util/xml/impl
sun
misc
Cache.javaCharacterDecoder.javaCharacterEncoder.javaConditionLock.javaExtensionDependency.javaExtensionInfo.javaFDBigInteger.javaFloatingDecimal.javaIOUtils.javaJarFilter.javaJavaLangAccess.javaPerf.javaPerfCounter.javaPerformanceLogger.javaResource.javaSignal.javaUnsafe.javaVM.java
resources
net/www/protocol/http
nio/cs
security/x509
AVA.javaAuthorityKeyIdentifierExtension.javaBasicConstraintsExtension.javaCRLDistributionPointsExtension.javaCRLNumberExtension.javaCertException.javaCertificatePoliciesExtension.javaCertificateValidity.javaDistributionPoint.javaDistributionPointName.javaEDIPartyName.javaExtension.javaGeneralSubtree.javaGeneralSubtrees.javaIPAddressName.javaIssuerAlternativeNameExtension.javaIssuingDistributionPointExtension.javaNameConstraintsExtension.java
1
.hgtags
1
.hgtags
@ -307,3 +307,4 @@ ac3f5a39d4ff14d70c365e12cf5ec8f2abd52a04 jdk9-b61
|
||||
e7dbbef69d12b6a74dfad331b7188e7f893e8d29 jdk9-b62
|
||||
989253a902c34dcb7564695161c9200a5fbb7412 jdk9-b63
|
||||
8ffdeabc7c2b9a8280bf46cae026ac46b4d31c26 jdk9-b64
|
||||
4915246064b2f89d5f00c96e758686b7fdad36a6 jdk9-b65
|
||||
|
@ -307,3 +307,4 @@ ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61
|
||||
105d045a69174d870b69bfe471b3f2d05a9f8ecc jdk9-b62
|
||||
0b32ed628fa60e4ab99fb0b5866d648e16231f17 jdk9-b63
|
||||
82cf9aab9a83e41c8194ba01af9666afdb856cbe jdk9-b64
|
||||
7c31f9d7b932f7924f1258d52885b1c7c3e078c2 jdk9-b65
|
||||
|
@ -83,7 +83,6 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jimage
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
@ -163,7 +162,6 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jimage
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
@ -284,7 +282,6 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jimage
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
@ -420,7 +417,6 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jimage
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
@ -499,7 +495,6 @@ ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/jcmd.exe
|
||||
./bin/jconsole.exe
|
||||
./bin/jdb.exe
|
||||
./bin/jhat.exe
|
||||
./bin/jimage.exe
|
||||
./bin/jinfo.exe
|
||||
./bin/jjs.exe
|
||||
@ -579,7 +574,6 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/jcmd
|
||||
./bin/jconsole
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jimage
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
|
@ -307,3 +307,4 @@ d690f489ca0bb95a6157d996da2fa72bcbcf02ea jdk9-b61
|
||||
d27f7e0a7aca129969de23e9934408a31b4abf4c jdk9-b62
|
||||
0acac6937de7a0868f8c6f88b7d036d780abeee6 jdk9-b63
|
||||
0a5e5a7c3539e8bde73d9fe55750e49a49cb8dac jdk9-b64
|
||||
afc1e295c4bf83f9a5dd539c29914edd4a754a3f jdk9-b65
|
||||
|
@ -467,3 +467,4 @@ ee878f3d6732856f7725c590312bfbe2ffa52cc7 jdk9-b58
|
||||
1eab877142cce6ca06e556e2ad0af688f993f00b jdk9-b62
|
||||
2ac9b6b36689b50d1562627067c92d51781b5684 jdk9-b63
|
||||
bf92b8db249cdfa5651ef954b6c0743a7e0ea4cd jdk9-b64
|
||||
e7ae94c4f35e940ea423fc1dd260435df34a77c0 jdk9-b65
|
||||
|
@ -307,3 +307,4 @@ f4a4a54620370f077c2e830a5561c8cfa811712b jdk9-b61
|
||||
3bcf83c1bbc1b7663e930d72c133a9bd86c7618d jdk9-b62
|
||||
4a8f895f0317dcc90479cb7cc97014312e69edf7 jdk9-b63
|
||||
6f91749b5aaef1a171ec2254163233438d1071d1 jdk9-b64
|
||||
ae7406e82828fe1c245ac7507a9da5fd5b1c9529 jdk9-b65
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package test.auctionportal;
|
||||
|
||||
import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_SOURCE;
|
||||
import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_SOURCE;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
@ -22,10 +22,10 @@
|
||||
*/
|
||||
package test.auctionportal;
|
||||
|
||||
import static com.sun.org.apache.xerces.internal.impl.Constants.SP_ENTITY_EXPANSION_LIMIT;
|
||||
import static com.sun.org.apache.xerces.internal.impl.Constants.SP_MAX_OCCUR_LIMIT;
|
||||
import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_SOURCE;
|
||||
import static test.auctionportal.HiBidConstants.SP_ENTITY_EXPANSION_LIMIT;
|
||||
import static test.auctionportal.HiBidConstants.SP_MAX_OCCUR_LIMIT;
|
||||
import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_SOURCE;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package test.auctionportal;
|
||||
|
||||
import static com.sun.org.apache.xerces.internal.jaxp.JAXPConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static test.auctionportal.HiBidConstants.JAXP_SCHEMA_LANGUAGE;
|
||||
import static org.testng.Assert.assertFalse;
|
||||
import java.io.FileOutputStream;
|
||||
import java.nio.file.Files;
|
||||
|
3
jaxp/test/javax/xml/jaxp/internaltest/TEST.properties
Normal file
3
jaxp/test/javax/xml/jaxp/internaltest/TEST.properties
Normal file
@ -0,0 +1,3 @@
|
||||
# jaxp test uses TestNG
|
||||
TestNG.dirs = javax/xml/common/bug6979306 javax/xml/parsers/bug8003147 javax/xml/transform/bug6551616 javax/xml/transform/cli
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -21,16 +21,19 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.xml.common;
|
||||
/*
|
||||
* @test
|
||||
* @modules java.xml/com.sun.org.apache.xerces.internal.impl
|
||||
* java.xml/com.sun.org.apache.xalan.internal
|
||||
* java.xml/com.sun.org.apache.xalan.internal.xslt
|
||||
* @bug 6979306
|
||||
* @summary Test JAXP component version.
|
||||
*/
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck;
|
||||
|
||||
/*
|
||||
* @bug 6979306
|
||||
* @summary Test JAXP component version.
|
||||
*/
|
||||
public class Bug6979306Test {
|
||||
|
||||
@Test
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -21,7 +21,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.xml.parsers;
|
||||
/*
|
||||
* @test
|
||||
* @modules java.xml/com.sun.org.apache.bcel.internal.classfile
|
||||
* java.xml/com.sun.org.apache.bcel.internal.generic
|
||||
* @bug 8003147
|
||||
* @summary Test port fix for BCEL bug 39695.
|
||||
*/
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.ArrayList;
|
||||
@ -38,10 +44,6 @@ import com.sun.org.apache.bcel.internal.classfile.Method;
|
||||
import com.sun.org.apache.bcel.internal.generic.ClassGen;
|
||||
import com.sun.org.apache.bcel.internal.generic.MethodGen;
|
||||
|
||||
/*
|
||||
* @bug 8003147
|
||||
* @summary Test port fix for BCEL bug 39695.
|
||||
*/
|
||||
public class Bug8003147Test {
|
||||
|
||||
@Test
|
||||
@ -51,7 +53,7 @@ public class Bug8003147Test {
|
||||
// rename class
|
||||
ConstantPool cp = jc.getConstantPool();
|
||||
int cpIndex = ((ConstantClass) cp.getConstant(jc.getClassNameIndex())).getNameIndex();
|
||||
cp.setConstant(cpIndex, new ConstantUtf8("javax/xml/parsers/Bug8003147TestPrime"));
|
||||
cp.setConstant(cpIndex, new ConstantUtf8("Bug8003147TestPrime"));
|
||||
ClassGen gen = new ClassGen(jc);
|
||||
Method[] methods = jc.getMethods();
|
||||
int index;
|
||||
@ -67,7 +69,7 @@ public class Bug8003147Test {
|
||||
gen.getJavaClass().dump(new FileOutputStream(path));
|
||||
|
||||
try {
|
||||
Class.forName("javax.xml.parsers.Bug8003147TestPrime");
|
||||
Class.forName("Bug8003147TestPrime");
|
||||
} catch (ClassFormatError cfe) {
|
||||
cfe.printStackTrace();
|
||||
Assert.fail("modified version of class does not pass verification");
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -21,24 +21,23 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.xml.transform;
|
||||
/*
|
||||
* @test
|
||||
* @modules java.xml/com.sun.org.apache.xalan.internal.xsltc.trax
|
||||
* @bug 6551616
|
||||
* @summary Test SAX2StAXEventWriter.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringBufferInputStream;
|
||||
import java.security.Policy;
|
||||
|
||||
import javax.xml.stream.XMLEventWriter;
|
||||
import javax.xml.stream.XMLOutputFactory;
|
||||
|
||||
import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/*
|
||||
* @bug 6551616
|
||||
* @summary Test SAX2StAXEventWriter.
|
||||
*/
|
||||
import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
|
||||
|
||||
public class Bug6551616 {
|
||||
String _cache = "";
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -21,14 +21,15 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package javax.xml.transform;
|
||||
/*
|
||||
* @test
|
||||
* @modules java.xml/com.sun.org.apache.xalan.internal.xslt
|
||||
* @summary Test internal transform CLI.
|
||||
*/
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
/*
|
||||
* @summary Test internal transform CLI.
|
||||
*/
|
||||
public class CLITest {
|
||||
|
||||
@Test
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<office:document xmlns:office="http://openoffice.org/2000/office" xmlns:style="http://openoffice.org/2000/style" office:class="text" office:version="1.0">
|
||||
<office:styles>
|
||||
<style:default-style style:family="graphics"/>
|
||||
<style:default-style style:family="paragraph"/>
|
||||
</office:styles>
|
||||
</office:document>
|
@ -0,0 +1,21 @@
|
||||
<?xml version='1.0' encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:office="http://openoffice.org/2000/office"
|
||||
xmlns:style="http://openoffice.org/2000/style">
|
||||
|
||||
<xsl:output method="xml" encoding="UTF-8"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:variable name="copyData">
|
||||
<xsl:call-template name="copy-by-template" />
|
||||
</xsl:variable>
|
||||
<test>
|
||||
<xsl:copy-of select="$copyData"/>
|
||||
</test>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="copy-by-template">
|
||||
<xsl:copy-of select="/"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
@ -42,4 +42,24 @@ public class HiBidConstants {
|
||||
* Name space for account operation.
|
||||
*/
|
||||
public static final String PORTAL_ACCOUNT_NS = "http://www.auctionportal.org/Accounts";
|
||||
|
||||
/**
|
||||
* JAXP schema language property name.
|
||||
*/
|
||||
public static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
|
||||
|
||||
/**
|
||||
* JAXP schema source property name.
|
||||
*/
|
||||
public static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
|
||||
|
||||
/**
|
||||
* Name of system property JDK entity expansion limit
|
||||
*/
|
||||
public static final String SP_ENTITY_EXPANSION_LIMIT = "jdk.xml.entityExpansionLimit";
|
||||
|
||||
/**
|
||||
* Name of system property JDK maxOccur limit
|
||||
*/
|
||||
public static final String SP_MAX_OCCUR_LIMIT = "jdk.xml.maxOccurLimit";
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
# jaxp test uses TestNG
|
||||
TestNG.dirs = unittest
|
||||
TestNG.dirs = .
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -76,7 +76,7 @@ public class Bug7143711Test {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(enabled=false) //skipped due to bug JDK-8080097
|
||||
public void testTransform_DOM_withSM() {
|
||||
System.out.println("Transform using DOM Source; Security Manager is set:");
|
||||
|
||||
@ -89,7 +89,7 @@ public class Bug7143711Test {
|
||||
TransformerFactory factory = TransformerFactory.newInstance("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl",
|
||||
TransformerFactory.class.getClassLoader());
|
||||
factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, true);
|
||||
if (((com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl) factory).useServicesMechnism()) {
|
||||
if ((boolean) factory.getFeature(ORACLE_FEATURE_SERVICE_MECHANISM)) {
|
||||
Assert.fail("should not override in secure mode");
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -24,20 +24,16 @@
|
||||
package javax.xml.stream.XMLStreamWriterTest;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.stream.XMLOutputFactory;
|
||||
import javax.xml.stream.XMLStreamException;
|
||||
import javax.xml.stream.XMLStreamWriter;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl;
|
||||
|
||||
/*
|
||||
* @summary Test the writing of Namespaces.
|
||||
*/
|
||||
@ -80,15 +76,10 @@ public class NamespaceTest {
|
||||
private void resetWriter() {
|
||||
// reset the Writer
|
||||
try {
|
||||
xmlStreamWriter.flush();
|
||||
xmlStreamWriter.close();
|
||||
((XMLStreamWriterImpl) xmlStreamWriter).reset();
|
||||
byteArrayOutputStream.reset();
|
||||
((XMLStreamWriterImpl) xmlStreamWriter).setOutput(new StreamResult(byteArrayOutputStream), "utf-8");
|
||||
xmlStreamWriter = xmlOutputFactory.createXMLStreamWriter(byteArrayOutputStream, "utf-8");
|
||||
} catch (XMLStreamException xmlStreamException) {
|
||||
Assert.fail(xmlStreamException.toString());
|
||||
} catch (IOException ioException) {
|
||||
Assert.fail(ioException.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, 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
|
||||
@ -42,12 +42,12 @@ import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.sun.org.apache.xerces.internal.impl.Constants;
|
||||
|
||||
/*
|
||||
* @summary Test LSSerializer.
|
||||
*/
|
||||
public class LSSerializerTest {
|
||||
private static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print";
|
||||
|
||||
class DOMErrorHandlerImpl implements DOMErrorHandler {
|
||||
|
||||
@ -192,47 +192,47 @@ public class LSSerializerTest {
|
||||
DOMConfiguration domConfiguration = lsSerializer.getDomConfig();
|
||||
|
||||
// query current configuration
|
||||
Boolean defaultFormatPrettyPrint = (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT);
|
||||
Boolean canSetFormatPrettyPrintFalse = (Boolean) domConfiguration.canSetParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
|
||||
Boolean canSetFormatPrettyPrintTrue = (Boolean) domConfiguration.canSetParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
|
||||
Boolean defaultFormatPrettyPrint = (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT);
|
||||
Boolean canSetFormatPrettyPrintFalse = (Boolean) domConfiguration.canSetParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
|
||||
Boolean canSetFormatPrettyPrintTrue = (Boolean) domConfiguration.canSetParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
|
||||
|
||||
System.out.println(Constants.DOM_FORMAT_PRETTY_PRINT + " default/can set false/can set true = " + defaultFormatPrettyPrint + "/"
|
||||
System.out.println(DOM_FORMAT_PRETTY_PRINT + " default/can set false/can set true = " + defaultFormatPrettyPrint + "/"
|
||||
+ canSetFormatPrettyPrintFalse + "/" + canSetFormatPrettyPrintTrue);
|
||||
|
||||
// test values
|
||||
Assert.assertEquals(defaultFormatPrettyPrint, Boolean.FALSE, "Default value of " + Constants.DOM_FORMAT_PRETTY_PRINT + " should be " + Boolean.FALSE);
|
||||
Assert.assertEquals(defaultFormatPrettyPrint, Boolean.FALSE, "Default value of " + DOM_FORMAT_PRETTY_PRINT + " should be " + Boolean.FALSE);
|
||||
|
||||
Assert.assertEquals(canSetFormatPrettyPrintFalse, Boolean.TRUE, "Can set " + Constants.DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.FALSE + " should be "
|
||||
Assert.assertEquals(canSetFormatPrettyPrintFalse, Boolean.TRUE, "Can set " + DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.FALSE + " should be "
|
||||
+ Boolean.TRUE);
|
||||
|
||||
Assert.assertEquals(canSetFormatPrettyPrintTrue, Boolean.TRUE, "Can set " + Constants.DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.TRUE + " should be "
|
||||
Assert.assertEquals(canSetFormatPrettyPrintTrue, Boolean.TRUE, "Can set " + DOM_FORMAT_PRETTY_PRINT + " to " + Boolean.TRUE + " should be "
|
||||
+ Boolean.TRUE);
|
||||
|
||||
// get default serialization
|
||||
String prettyPrintDefault = lsSerializer.writeToString(document);
|
||||
System.out.println("(default) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
|
||||
System.out.println("(default) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
|
||||
+ ": \n\"" + prettyPrintDefault + "\"");
|
||||
|
||||
Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintDefault, "Invalid serialization with default value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
|
||||
Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintDefault, "Invalid serialization with default value, " + DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
|
||||
|
||||
// configure LSSerializer to not format-pretty-print
|
||||
domConfiguration.setParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
|
||||
domConfiguration.setParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.FALSE);
|
||||
String prettyPrintFalse = lsSerializer.writeToString(document);
|
||||
System.out.println("(FALSE) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
|
||||
System.out.println("(FALSE) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
|
||||
+ ": \n\"" + prettyPrintFalse + "\"");
|
||||
|
||||
Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintFalse, "Invalid serialization with FALSE value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
|
||||
Assert.assertEquals(XML_DOCUMENT_DEFAULT_PRINT, prettyPrintFalse, "Invalid serialization with FALSE value, " + DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
|
||||
|
||||
// configure LSSerializer to format-pretty-print
|
||||
domConfiguration.setParameter(Constants.DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
|
||||
domConfiguration.setParameter(DOM_FORMAT_PRETTY_PRINT, Boolean.TRUE);
|
||||
String prettyPrintTrue = lsSerializer.writeToString(document);
|
||||
System.out.println("(TRUE) " + Constants.DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT)
|
||||
System.out.println("(TRUE) " + DOM_FORMAT_PRETTY_PRINT + "==" + (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT)
|
||||
+ ": \n\"" + prettyPrintTrue + "\"");
|
||||
|
||||
Assert.assertEquals(XML_DOCUMENT_PRETTY_PRINT, prettyPrintTrue, "Invalid serialization with TRUE value, " + Constants.DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(Constants.DOM_FORMAT_PRETTY_PRINT));
|
||||
Assert.assertEquals(XML_DOCUMENT_PRETTY_PRINT, prettyPrintTrue, "Invalid serialization with TRUE value, " + DOM_FORMAT_PRETTY_PRINT + "=="
|
||||
+ (Boolean) domConfiguration.getParameter(DOM_FORMAT_PRETTY_PRINT));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -310,3 +310,4 @@ f31835b59035377a220efc5a248b90f090ee1689 jdk9-b60
|
||||
cd0cf72b2cbf4adb778a02505fb065bb2292688c jdk9-b62
|
||||
b5c22d09b1c91dd49b006f38d8ba9c4397517ccc jdk9-b63
|
||||
df100399ed27d0eaa57c137ca99819a0fee66178 jdk9-b64
|
||||
45ef73bb85c12ec1b291835c1d40e342a454e3f0 jdk9-b65
|
||||
|
@ -307,3 +307,4 @@ da84dcac1b0b12c5b836b05ac75ecbfadee0cd32 jdk9-b61
|
||||
49118e68fbd4cc0044e718c47db681946d5efd69 jdk9-b62
|
||||
fd3281c400347088b36aeb16273aa679d53a81a4 jdk9-b63
|
||||
7de8d036ad0980d988d1b9b4b4e6be555d9fbf98 jdk9-b64
|
||||
ed94f3e7ba6bbfec0772de6d24e39543e13f6d88 jdk9-b65
|
||||
|
@ -30,6 +30,7 @@ include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
# Prepare the find cache.
|
||||
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
|
||||
@ -49,6 +50,15 @@ GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/commo
|
||||
|
||||
##################################################################################################
|
||||
|
||||
# This rule will be depended on due to the MANIFEST line
|
||||
$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
|
||||
SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
|
||||
OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
|
||||
REPLACEMENTS := \
|
||||
@@RELEASE@@ => $(RELEASE) ; \
|
||||
@@COMPANY_NAME@@ => $(COMPANY_NAME) , \
|
||||
))
|
||||
|
||||
define SetupAppletDemo
|
||||
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
@ -122,7 +132,7 @@ define SetupDemo
|
||||
COPY := $(PATTERNS_TO_COPY) $(10), \
|
||||
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/$$($1_JARFILE), \
|
||||
JARMAIN := $4, \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
|
||||
MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
|
||||
EXTRA_MANIFEST_ATTR := $(11), \
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/$2/$1/src.zip, \
|
||||
EXCLUDE_FILES := $9, \
|
||||
@ -290,7 +300,7 @@ define SetupJVMTIDemo
|
||||
COPY := $(PATTERNS_TO_COPY), \
|
||||
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar, \
|
||||
EXTRA_MANIFEST_ATTR := Main-Class: \n, \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf))
|
||||
MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf))
|
||||
|
||||
BUILD_DEMOS += $(SUPPORT_OUTPUTDIR)/demo/image/jvmti/$1/$1.jar
|
||||
endif
|
||||
@ -382,7 +392,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
BIN := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
|
||||
HEADERS := $(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
|
||||
JAR := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/Poller.jar, \
|
||||
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
|
||||
MANIFEST := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
|
||||
SRCZIP := $(SUPPORT_OUTPUTDIR)/demo/image/jni/Poller/src.zip, \
|
||||
COPY := README.txt Poller.c, \
|
||||
JARMAIN := Client))
|
||||
|
@ -33,9 +33,6 @@ $(eval $(call SetupLauncher,jdeps, \
|
||||
$(eval $(call SetupLauncher,jimage,\
|
||||
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.tools.jimage.Main"$(COMMA) }'))
|
||||
|
||||
$(eval $(call SetupLauncher,jhat, \
|
||||
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
|
||||
|
||||
$(eval $(call SetupLauncher,native2ascii, \
|
||||
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
|
||||
|
||||
|
@ -27,6 +27,12 @@ include LibCommon.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
|
||||
# a binary that is compatible with windows versions older than 7/2008R2.
|
||||
# See MSDN documentation for GetProcessMemoryInfo for more information.
|
||||
LIBATTACH_CFLAGS := -DPSAPI_VERSION=1
|
||||
endif
|
||||
|
||||
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
||||
LIBRARY := attach, \
|
||||
@ -35,7 +41,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
|
||||
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
|
||||
$(LIBJAVA_HEADER_FLAGS), \
|
||||
$(LIBJAVA_HEADER_FLAGS) $(LIBATTACH_CFLAGS), \
|
||||
CFLAGS_windows := /Gy, \
|
||||
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
|
||||
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
|
||||
|
@ -39,10 +39,12 @@ LIBMANAGEMENT_EXT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/inc
|
||||
$(LIBJAVA_HEADER_FLAGS) \
|
||||
#
|
||||
|
||||
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
|
||||
# a binary that is compatible with windows versions older than 7/2008R2.
|
||||
# See MSDN documentation for GetProcessMemoryInfo for more information.
|
||||
BUILD_LIBMANAGEMENT_EXT_CFLAGS += -DPSAPI_VERSION=1
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# In (at least) VS2013 and later, -DPSAPI_VERSION=1 is needed to generate
|
||||
# a binary that is compatible with windows versions older than 7/2008R2.
|
||||
# See MSDN documentation for GetProcessMemoryInfo for more information.
|
||||
LIBMANAGEMENT_EXT_CFLAGS += -DPSAPI_VERSION=1
|
||||
endif
|
||||
|
||||
LIBMANAGEMENT_EXT_OPTIMIZATION := HIGH
|
||||
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
|
||||
|
@ -24,6 +24,7 @@ jdk.httpserver
|
||||
jdk.jfr
|
||||
jdk.management
|
||||
jdk.management.cmm
|
||||
jdk.management.resource
|
||||
jdk.naming.rmi
|
||||
jdk.sctp
|
||||
jdk.security.auth
|
||||
|
@ -56,8 +56,7 @@
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD ALIGN=RIGHT COLSPAN="2"><!-- page headline --><!-------------------------------><!--EDIT THE PAGE HEADLINE HERE--><!------------BEGIN-HEADLINE-----><FONT SIZE=+2>JAVA</FONT><SUP><FONT SIZE=-2>TM</FONT></SUP><FONT SIZE=+2>
|
||||
PLUG-IN</FONT>
|
||||
<TD ALIGN=RIGHT COLSPAN="2"><!-- page headline --><!-------------------------------><!--EDIT THE PAGE HEADLINE HERE--><!------------BEGIN-HEADLINE-----><FONT SIZE=+2>JAVA™ PLUG-IN</FONT>
|
||||
<BR><B>Demonstration Applets</B>
|
||||
<BR><!-------------END-HEADLINE------><!-- END OF PAGE HEADLINE --><!-------------------------------></TD>
|
||||
</TR>
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<p>
|
||||
The
|
||||
Java<sup><font size=-2>TM</font></sup> Virtual Machine Tools Interface (JVM TI)
|
||||
Java™ Virtual Machine Tools Interface (JVM TI)
|
||||
is a native tool interface provided in JDK 5.0 and newer.
|
||||
Native libraries that use JVM TI and are loaded into the
|
||||
Java Virtual Machine
|
||||
|
@ -230,13 +230,12 @@ public final class Boolean implements java.io.Serializable,
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if and only if the system property
|
||||
* named by the argument exists and is equal to the string
|
||||
* {@code "true"}. (Beginning with version 1.0.2 of the
|
||||
* Java<small><sup>TM</sup></small> platform, the test of
|
||||
* this string is case insensitive.) A system property is accessible
|
||||
* through {@code getProperty}, a method defined by the
|
||||
* {@code System} class.
|
||||
* Returns {@code true} if and only if the system property named
|
||||
* by the argument exists and is equal to the string {@code
|
||||
* "true"}. (Beginning with version 1.0.2 of the Java™
|
||||
* platform, the test of this string is case insensitive.) A
|
||||
* system property is accessible through {@code getProperty}, a
|
||||
* method defined by the {@code System} class.
|
||||
* <p>
|
||||
* If there is no property with the specified name, or if the specified
|
||||
* name is empty or null, then {@code false} is returned.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2015, 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
|
||||
@ -645,8 +645,14 @@ class Character implements java.io.Serializable, Comparable<Character> {
|
||||
* @since 1.2
|
||||
*/
|
||||
public static final class UnicodeBlock extends Subset {
|
||||
|
||||
private static Map<String, UnicodeBlock> map = new HashMap<>(256);
|
||||
/**
|
||||
* 510 - the expected number of enteties
|
||||
* 0.75 - the default load factor of HashMap
|
||||
*/
|
||||
private static final int INITIAL_CAPACITY =
|
||||
(int)(510 / 0.75f + 1.0f);
|
||||
private static Map<String, UnicodeBlock> map =
|
||||
new HashMap<>(INITIAL_CAPACITY);
|
||||
|
||||
/**
|
||||
* Creates a UnicodeBlock with the given identifier name.
|
||||
|
@ -1708,7 +1708,7 @@ public final class Long extends Number implements Comparable<Long> {
|
||||
* @since 1.5
|
||||
*/
|
||||
public static int bitCount(long i) {
|
||||
// HD, Figure 5-14
|
||||
// HD, Figure 5-2
|
||||
i = i - ((i >>> 1) & 0x5555555555555555L);
|
||||
i = (i & 0x3333333333333333L) + ((i >>> 2) & 0x3333333333333333L);
|
||||
i = (i + (i >>> 4)) & 0x0f0f0f0f0f0f0f0fL;
|
||||
|
@ -179,7 +179,7 @@ public final class String
|
||||
* not affect the newly created string.
|
||||
*
|
||||
* @param value
|
||||
* Array that is the source of characters
|
||||
* Array that is the source of characters
|
||||
*
|
||||
* @param offset
|
||||
* The initial offset
|
||||
@ -208,7 +208,7 @@ public final class String
|
||||
if (offset > value.length - count) {
|
||||
throw new StringIndexOutOfBoundsException(offset + count);
|
||||
}
|
||||
this.value = Arrays.copyOfRange(value, offset, offset+count);
|
||||
this.value = Arrays.copyOfRange(value, offset, offset + count);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -262,11 +262,11 @@ public final class String
|
||||
// Pass 1: Compute precise size of char[]
|
||||
int n = count;
|
||||
for (int i = offset; i < end; i++) {
|
||||
int c = codePoints[i];
|
||||
if (Character.isBmpCodePoint(c))
|
||||
continue;
|
||||
else if (Character.isValidCodePoint(c))
|
||||
n++;
|
||||
int c = codePoints[i];
|
||||
if (Character.isBmpCodePoint(c))
|
||||
continue;
|
||||
else if (Character.isValidCodePoint(c))
|
||||
n++;
|
||||
else throw new IllegalArgumentException(Integer.toString(c));
|
||||
}
|
||||
|
||||
@ -327,7 +327,7 @@ public final class String
|
||||
@Deprecated
|
||||
public String(byte ascii[], int hibyte, int offset, int count) {
|
||||
checkBounds(ascii, offset, count);
|
||||
char value[] = new char[count];
|
||||
char[] value = new char[count];
|
||||
|
||||
if (hibyte == 0) {
|
||||
for (int i = count; i-- > 0;) {
|
||||
@ -465,7 +465,7 @@ public final class String
|
||||
if (charset == null)
|
||||
throw new NullPointerException("charset");
|
||||
checkBounds(bytes, offset, length);
|
||||
this.value = StringCoding.decode(charset, bytes, offset, length);
|
||||
this.value = StringCoding.decode(charset, bytes, offset, length);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -567,7 +567,7 @@ public final class String
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public String(byte bytes[]) {
|
||||
public String(byte[] bytes) {
|
||||
this(bytes, 0, bytes.length);
|
||||
}
|
||||
|
||||
@ -983,11 +983,10 @@ public final class String
|
||||
return true;
|
||||
}
|
||||
if (anObject instanceof String) {
|
||||
String anotherString = (String)anObject;
|
||||
int n = value.length;
|
||||
if (n == anotherString.value.length) {
|
||||
char v1[] = value;
|
||||
char v2[] = anotherString.value;
|
||||
char[] v1 = value;
|
||||
char[] v2 = ((String)anObject).value;
|
||||
int n = v1.length;
|
||||
if (n == v2.length) {
|
||||
int i = 0;
|
||||
while (n-- != 0) {
|
||||
if (v1[i] != v2[i])
|
||||
@ -1020,8 +1019,8 @@ public final class String
|
||||
}
|
||||
|
||||
private boolean nonSyncContentEquals(AbstractStringBuilder sb) {
|
||||
char v1[] = value;
|
||||
char v2[] = sb.getValue();
|
||||
char[] v1 = value;
|
||||
char[] v2 = sb.getValue();
|
||||
int n = v1.length;
|
||||
if (n != sb.length()) {
|
||||
return false;
|
||||
@ -1066,7 +1065,7 @@ public final class String
|
||||
return equals(cs);
|
||||
}
|
||||
// Argument is a generic CharSequence
|
||||
char v1[] = value;
|
||||
char[] v1 = value;
|
||||
int n = v1.length;
|
||||
if (n != cs.length()) {
|
||||
return false;
|
||||
@ -1156,20 +1155,18 @@ public final class String
|
||||
* lexicographically greater than the string argument.
|
||||
*/
|
||||
public int compareTo(String anotherString) {
|
||||
int len1 = value.length;
|
||||
int len2 = anotherString.value.length;
|
||||
char[] v1 = value;
|
||||
char[] v2 = anotherString.value;
|
||||
int len1 = v1.length;
|
||||
int len2 = v2.length;
|
||||
int lim = Math.min(len1, len2);
|
||||
char v1[] = value;
|
||||
char v2[] = anotherString.value;
|
||||
|
||||
int k = 0;
|
||||
while (k < lim) {
|
||||
for (int k = 0; k < lim; k++) {
|
||||
char c1 = v1[k];
|
||||
char c2 = v2[k];
|
||||
if (c1 != c2) {
|
||||
return c1 - c2;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
return len1 - len2;
|
||||
}
|
||||
@ -1278,14 +1275,14 @@ public final class String
|
||||
*/
|
||||
public boolean regionMatches(int toffset, String other, int ooffset,
|
||||
int len) {
|
||||
char ta[] = value;
|
||||
char[] ta = value;
|
||||
int to = toffset;
|
||||
char pa[] = other.value;
|
||||
char[] pa = other.value;
|
||||
int po = ooffset;
|
||||
// Note: toffset, ooffset, or len might be near -1>>>1.
|
||||
if ((ooffset < 0) || (toffset < 0)
|
||||
|| (toffset > (long)value.length - len)
|
||||
|| (ooffset > (long)other.value.length - len)) {
|
||||
|| (toffset > (long)ta.length - len)
|
||||
|| (ooffset > (long)pa.length - len)) {
|
||||
return false;
|
||||
}
|
||||
while (len-- > 0) {
|
||||
@ -1348,14 +1345,14 @@ public final class String
|
||||
*/
|
||||
public boolean regionMatches(boolean ignoreCase, int toffset,
|
||||
String other, int ooffset, int len) {
|
||||
char ta[] = value;
|
||||
char[] ta = value;
|
||||
int to = toffset;
|
||||
char pa[] = other.value;
|
||||
char[] pa = other.value;
|
||||
int po = ooffset;
|
||||
// Note: toffset, ooffset, or len might be near -1>>>1.
|
||||
if ((ooffset < 0) || (toffset < 0)
|
||||
|| (toffset > (long)value.length - len)
|
||||
|| (ooffset > (long)other.value.length - len)) {
|
||||
|| (toffset > (long)ta.length - len)
|
||||
|| (ooffset > (long)pa.length - len)) {
|
||||
return false;
|
||||
}
|
||||
while (len-- > 0) {
|
||||
@ -1405,13 +1402,13 @@ public final class String
|
||||
* </pre>
|
||||
*/
|
||||
public boolean startsWith(String prefix, int toffset) {
|
||||
char ta[] = value;
|
||||
char[] ta = value;
|
||||
int to = toffset;
|
||||
char pa[] = prefix.value;
|
||||
char[] pa = prefix.value;
|
||||
int po = 0;
|
||||
int pc = prefix.value.length;
|
||||
int pc = pa.length;
|
||||
// Note: toffset might be near -1>>>1.
|
||||
if ((toffset < 0) || (toffset > value.length - pc)) {
|
||||
if ((toffset < 0) || (toffset > ta.length - pc)) {
|
||||
return false;
|
||||
}
|
||||
while (--pc >= 0) {
|
||||
@ -1473,7 +1470,9 @@ public final class String
|
||||
for (char v : value) {
|
||||
h = 31 * h + v;
|
||||
}
|
||||
hash = h;
|
||||
if (h != 0) {
|
||||
hash = h;
|
||||
}
|
||||
}
|
||||
return h;
|
||||
}
|
||||
@ -1928,14 +1927,17 @@ public final class String
|
||||
* length of this {@code String} object.
|
||||
*/
|
||||
public String substring(int beginIndex) {
|
||||
if (beginIndex < 0) {
|
||||
throw new StringIndexOutOfBoundsException(beginIndex);
|
||||
if (beginIndex <= 0) {
|
||||
if (beginIndex < 0) {
|
||||
throw new StringIndexOutOfBoundsException(beginIndex);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
int subLen = value.length - beginIndex;
|
||||
if (subLen < 0) {
|
||||
throw new StringIndexOutOfBoundsException(subLen);
|
||||
}
|
||||
return (beginIndex == 0) ? this : new String(value, beginIndex, subLen);
|
||||
return new String(value, beginIndex, subLen);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1961,8 +1963,13 @@ public final class String
|
||||
* {@code endIndex}.
|
||||
*/
|
||||
public String substring(int beginIndex, int endIndex) {
|
||||
if (beginIndex < 0) {
|
||||
throw new StringIndexOutOfBoundsException(beginIndex);
|
||||
if (beginIndex <= 0) {
|
||||
if (beginIndex < 0) {
|
||||
throw new StringIndexOutOfBoundsException(beginIndex);
|
||||
}
|
||||
if (endIndex == value.length) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
if (endIndex > value.length) {
|
||||
throw new StringIndexOutOfBoundsException(endIndex);
|
||||
@ -1971,8 +1978,7 @@ public final class String
|
||||
if (subLen < 0) {
|
||||
throw new StringIndexOutOfBoundsException(subLen);
|
||||
}
|
||||
return ((beginIndex == 0) && (endIndex == value.length)) ? this
|
||||
: new String(value, beginIndex, subLen);
|
||||
return new String(value, beginIndex, subLen);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2034,7 +2040,7 @@ public final class String
|
||||
return this;
|
||||
}
|
||||
int len = value.length;
|
||||
char buf[] = Arrays.copyOf(value, len + otherLen);
|
||||
char[] buf = Arrays.copyOf(value, len + otherLen);
|
||||
str.getChars(buf, len);
|
||||
return new String(buf, true);
|
||||
}
|
||||
@ -2070,9 +2076,9 @@ public final class String
|
||||
*/
|
||||
public String replace(char oldChar, char newChar) {
|
||||
if (oldChar != newChar) {
|
||||
int len = value.length;
|
||||
int i = -1;
|
||||
char[] val = value; /* avoid getfield opcode */
|
||||
int len = val.length;
|
||||
int i = -1;
|
||||
|
||||
while (++i < len) {
|
||||
if (val[i] == oldChar) {
|
||||
@ -2080,7 +2086,7 @@ public final class String
|
||||
}
|
||||
}
|
||||
if (i < len) {
|
||||
char buf[] = new char[len];
|
||||
char[] buf = new char[len];
|
||||
for (int j = 0; j < i; j++) {
|
||||
buf[j] = val[j];
|
||||
}
|
||||
@ -2876,17 +2882,17 @@ public final class String
|
||||
* trailing white space.
|
||||
*/
|
||||
public String trim() {
|
||||
int len = value.length;
|
||||
int st = 0;
|
||||
char[] val = value; /* avoid getfield opcode */
|
||||
int end = val.length;
|
||||
int beg = 0;
|
||||
|
||||
while ((st < len) && (val[st] <= ' ')) {
|
||||
st++;
|
||||
while ((beg < end) && (val[beg] <= ' ')) {
|
||||
beg++;
|
||||
}
|
||||
while ((st < len) && (val[len - 1] <= ' ')) {
|
||||
len--;
|
||||
while ((beg < end) && (val[end - 1] <= ' ')) {
|
||||
end--;
|
||||
}
|
||||
return ((st > 0) || (len < value.length)) ? substring(st, len) : this;
|
||||
return substring(beg, end);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3081,7 +3087,7 @@ public final class String
|
||||
*/
|
||||
public char[] toCharArray() {
|
||||
// Cannot use Arrays.copyOf because of class initialization order issues
|
||||
char result[] = new char[value.length];
|
||||
char[] result = new char[value.length];
|
||||
System.arraycopy(value, 0, result, 0, value.length);
|
||||
return result;
|
||||
}
|
||||
@ -3266,8 +3272,7 @@ public final class String
|
||||
* as its single character the argument {@code c}.
|
||||
*/
|
||||
public static String valueOf(char c) {
|
||||
char data[] = {c};
|
||||
return new String(data, true);
|
||||
return new String(new char[]{c}, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,23 +25,24 @@
|
||||
|
||||
package java.security;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.ReferenceQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import sun.misc.JavaSecurityAccess;
|
||||
import sun.misc.JavaSecurityProtectionDomainAccess;
|
||||
import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
|
||||
import sun.misc.SharedSecrets;
|
||||
import sun.security.util.Debug;
|
||||
import sun.security.util.SecurityConstants;
|
||||
import sun.misc.JavaSecurityAccess;
|
||||
import sun.misc.SharedSecrets;
|
||||
|
||||
/**
|
||||
*
|
||||
*<p>
|
||||
* This ProtectionDomain class encapsulates the characteristics of a domain,
|
||||
* The ProtectionDomain class encapsulates the characteristics of a domain,
|
||||
* which encloses a set of classes whose instances are granted a set
|
||||
* of permissions when being executed on behalf of a given set of Principals.
|
||||
* <p>
|
||||
@ -58,6 +59,7 @@ import sun.misc.SharedSecrets;
|
||||
*/
|
||||
|
||||
public class ProtectionDomain {
|
||||
|
||||
private static class JavaSecurityAccessImpl implements JavaSecurityAccess {
|
||||
|
||||
private JavaSecurityAccessImpl() {
|
||||
@ -86,18 +88,33 @@ public class ProtectionDomain {
|
||||
AccessController.getContext(), context);
|
||||
}
|
||||
|
||||
private static AccessControlContext getCombinedACC(AccessControlContext context, AccessControlContext stack) {
|
||||
AccessControlContext acc = new AccessControlContext(context, stack.getCombiner(), true);
|
||||
private static AccessControlContext getCombinedACC(
|
||||
AccessControlContext context, AccessControlContext stack) {
|
||||
AccessControlContext acc =
|
||||
new AccessControlContext(context, stack.getCombiner(), true);
|
||||
|
||||
return new AccessControlContext(stack.getContext(), acc).optimize();
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
// Set up JavaSecurityAccess in SharedSecrets
|
||||
// setup SharedSecrets to allow access to doIntersectionPrivilege
|
||||
// methods and ProtectionDomain cache
|
||||
SharedSecrets.setJavaSecurityAccess(new JavaSecurityAccessImpl());
|
||||
SharedSecrets.setJavaSecurityProtectionDomainAccess(
|
||||
new JavaSecurityProtectionDomainAccess() {
|
||||
@Override
|
||||
public ProtectionDomainCache getProtectionDomainCache() {
|
||||
return new PDCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for storing ProtectionDomains as keys in a Map.
|
||||
*/
|
||||
static final class Key {}
|
||||
|
||||
/* CodeSource */
|
||||
private CodeSource codesource ;
|
||||
|
||||
@ -451,40 +468,104 @@ public class ProtectionDomain {
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for storing ProtectionDomains as keys in a Map.
|
||||
* A cache of ProtectionDomains and their Permissions.
|
||||
*
|
||||
* This class stores ProtectionDomains as weak keys in a ConcurrentHashMap
|
||||
* with additional support for checking and removing weak keys that are no
|
||||
* longer in use.
|
||||
*/
|
||||
final static class Key {}
|
||||
|
||||
// A cache of ProtectionDomains and their Permissions
|
||||
private static class PDCache implements ProtectionDomainCache {
|
||||
// We must wrap the PermissionCollection in a WeakReference as there
|
||||
// are some PermissionCollections which contain strong references
|
||||
// back to a ProtectionDomain and otherwise would never be removed
|
||||
// from the WeakHashMap
|
||||
private final Map<Key, WeakReference<PermissionCollection>>
|
||||
map = new WeakHashMap<>();
|
||||
private final ConcurrentHashMap<WeakProtectionDomainKey,
|
||||
PermissionCollection>
|
||||
pdMap = new ConcurrentHashMap<>();
|
||||
private final ReferenceQueue<Key> queue = new ReferenceQueue<>();
|
||||
|
||||
@Override
|
||||
public synchronized void put(ProtectionDomain pd,
|
||||
PermissionCollection pc) {
|
||||
map.put(pd == null ? null : pd.key, new WeakReference<>(pc));
|
||||
public void put(ProtectionDomain pd, PermissionCollection pc) {
|
||||
processQueue(queue, pdMap);
|
||||
WeakProtectionDomainKey weakPd =
|
||||
new WeakProtectionDomainKey(pd, queue);
|
||||
pdMap.putIfAbsent(weakPd, pc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized PermissionCollection get(ProtectionDomain pd) {
|
||||
WeakReference<PermissionCollection> ref =
|
||||
map.get(pd == null ? null : pd.key);
|
||||
return ref == null ? null : ref.get();
|
||||
public PermissionCollection get(ProtectionDomain pd) {
|
||||
processQueue(queue, pdMap);
|
||||
WeakProtectionDomainKey weakPd =
|
||||
new WeakProtectionDomainKey(pd, queue);
|
||||
return pdMap.get(weakPd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes weak keys from the map that have been enqueued
|
||||
* on the reference queue and are no longer in use.
|
||||
*/
|
||||
private static void processQueue(ReferenceQueue<Key> queue,
|
||||
ConcurrentHashMap<? extends
|
||||
WeakReference<Key>, ?> pdMap) {
|
||||
Reference<? extends Key> ref;
|
||||
while ((ref = queue.poll()) != null) {
|
||||
pdMap.remove(ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
SharedSecrets.setJavaSecurityProtectionDomainAccess(
|
||||
new JavaSecurityProtectionDomainAccess() {
|
||||
@Override
|
||||
public ProtectionDomainCache getProtectionDomainCache() {
|
||||
return new PDCache();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* A weak key for a ProtectionDomain.
|
||||
*/
|
||||
private static class WeakProtectionDomainKey extends WeakReference<Key> {
|
||||
/**
|
||||
* Saved value of the referent's identity hash code, to maintain
|
||||
* a consistent hash code after the referent has been cleared
|
||||
*/
|
||||
private final int hash;
|
||||
|
||||
/**
|
||||
* A key representing a null ProtectionDomain.
|
||||
*/
|
||||
private static final Key NULL_KEY = new Key();
|
||||
|
||||
/**
|
||||
* Create a new WeakProtectionDomain with the specified domain and
|
||||
* registered with a queue.
|
||||
*/
|
||||
WeakProtectionDomainKey(ProtectionDomain pd, ReferenceQueue<Key> rq) {
|
||||
this((pd == null ? NULL_KEY : pd.key), rq);
|
||||
}
|
||||
|
||||
private WeakProtectionDomainKey(Key key, ReferenceQueue<Key> rq) {
|
||||
super(key, rq);
|
||||
hash = key.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the identity hash code of the original referent.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given object is an identical
|
||||
* WeakProtectionDomainKey instance, or, if this object's referent
|
||||
* has not been cleared and the given object is another
|
||||
* WeakProtectionDomainKey instance with an identical non-null
|
||||
* referent as this one.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj instanceof WeakProtectionDomainKey) {
|
||||
Object referent = get();
|
||||
return (referent != null) &&
|
||||
(referent == ((WeakProtectionDomainKey)obj).get());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -490,7 +490,7 @@ public class ChoiceFormat extends NumberFormat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Equality comparision between two
|
||||
* Equality comparison between two
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) return false;
|
||||
|
@ -85,7 +85,7 @@ class ArrayPrefixHelpers {
|
||||
*
|
||||
* As usual for this sort of utility, there are 4 versions, that
|
||||
* are simple copy/paste/adapt variants of each other. (The
|
||||
* double and int versions differ from long version soley by
|
||||
* double and int versions differ from long version solely by
|
||||
* replacing "long" (with case-matching)).
|
||||
*/
|
||||
|
||||
|
@ -1172,7 +1172,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
||||
* {@code fieldValuePairs} that are pairs of a field and its value.
|
||||
* For example,
|
||||
* <pre>
|
||||
* setFeilds(Calendar.YEAR, 2013,
|
||||
* setFields(Calendar.YEAR, 2013,
|
||||
* Calendar.MONTH, Calendar.DECEMBER,
|
||||
* Calendar.DAY_OF_MONTH, 23);</pre>
|
||||
* is equivalent to the sequence of the following
|
||||
@ -1298,7 +1298,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
||||
|
||||
/**
|
||||
* Sets the time zone parameter to the given {@code zone}. If no time
|
||||
* zone parameter is given to this {@code Caledar.Builder}, the
|
||||
* zone parameter is given to this {@code Calendar.Builder}, the
|
||||
* {@linkplain TimeZone#getDefault() default
|
||||
* <code>TimeZone</code>} will be used in the {@link #build() build}
|
||||
* method.
|
||||
@ -3316,7 +3316,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
||||
* @param field the calendar field
|
||||
* @return the calendar field name
|
||||
* @exception IndexOutOfBoundsException if <code>field</code> is negative,
|
||||
* equal to or greater then <code>FIELD_COUNT</code>.
|
||||
* equal to or greater than {@code FIELD_COUNT}.
|
||||
*/
|
||||
static String getFieldName(int field) {
|
||||
return FIELD_NAME[field];
|
||||
|
@ -537,7 +537,7 @@ public interface Collection<E> extends Iterable<E> {
|
||||
* @implSpec
|
||||
* The default implementation creates a
|
||||
* <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
|
||||
* from the collections's {@code Iterator}. The spliterator inherits the
|
||||
* from the collection's {@code Iterator}. The spliterator inherits the
|
||||
* <em>fail-fast</em> properties of the collection's iterator.
|
||||
* <p>
|
||||
* The created {@code Spliterator} reports {@link Spliterator#SIZED}.
|
||||
|
@ -719,7 +719,7 @@ public final class Locale implements Cloneable, Serializable {
|
||||
* created and cached.
|
||||
*
|
||||
* @param language lowercase 2 to 8 language code.
|
||||
* @param country uppercase two-letter ISO-3166 code and numric-3 UN M.49 area code.
|
||||
* @param country uppercase two-letter ISO-3166 code and numeric-3 UN M.49 area code.
|
||||
* @param variant vendor and browser specific code. See class description.
|
||||
* @return the <code>Locale</code> instance requested
|
||||
* @exception NullPointerException if any argument is null.
|
||||
@ -1236,7 +1236,7 @@ public final class Locale implements Cloneable, Serializable {
|
||||
/**
|
||||
* Package private method returning the Locale's LocaleExtensions,
|
||||
* used by ResourceBundle.
|
||||
* @return locale exnteions of this Locale,
|
||||
* @return locale extensions of this Locale,
|
||||
* or {@code null} if no extensions are defined
|
||||
*/
|
||||
LocaleExtensions getLocaleExtensions() {
|
||||
@ -2609,7 +2609,7 @@ public final class Locale implements Cloneable, Serializable {
|
||||
* href="./Locale.html#def_locale_extension">well-formed</a> or an exception
|
||||
* is thrown.
|
||||
*
|
||||
* <p>Attribute comparision for removal is case-insensitive.
|
||||
* <p>Attribute comparison for removal is case-insensitive.
|
||||
*
|
||||
* @param attribute the attribute
|
||||
* @return This builder.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2015, 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
|
||||
@ -293,6 +293,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
this.ID = ID;
|
||||
this.zoneId = null; // invalidate cache
|
||||
}
|
||||
|
||||
/**
|
||||
@ -544,7 +545,23 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* @since 1.8
|
||||
*/
|
||||
public ZoneId toZoneId() {
|
||||
ZoneId zId = zoneId;
|
||||
if (zId == null) {
|
||||
zoneId = zId = toZoneId0();
|
||||
}
|
||||
return zId;
|
||||
}
|
||||
|
||||
private ZoneId toZoneId0() {
|
||||
String id = getID();
|
||||
TimeZone defaultZone = defaultTimeZone;
|
||||
// are we not defaultTimeZone but our id is equal to default's?
|
||||
if (defaultZone != this &&
|
||||
defaultZone != null && id.equals(defaultZone.getID())) {
|
||||
// delegate to default TZ which is effectively immutable
|
||||
return defaultZone.toZoneId();
|
||||
}
|
||||
// derive it ourselves
|
||||
if (ZoneInfoFile.useOldMapping() && id.length() == 3) {
|
||||
if ("EST".equals(id))
|
||||
return ZoneId.of("America/New_York");
|
||||
@ -710,7 +727,12 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
sm.checkPermission(new PropertyPermission
|
||||
("user.timezone", "write"));
|
||||
}
|
||||
defaultTimeZone = zone;
|
||||
// by saving a defensive clone and returning a clone in getDefault() too,
|
||||
// the defaultTimeZone instance is isolated from user code which makes it
|
||||
// effectively immutable. This is important to avoid races when the
|
||||
// following is evaluated in ZoneId.systemDefault():
|
||||
// TimeZone.getDefault().toZoneId().
|
||||
defaultTimeZone = (zone == null) ? null : (TimeZone) zone.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -735,9 +757,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
public Object clone()
|
||||
{
|
||||
try {
|
||||
TimeZone other = (TimeZone) super.clone();
|
||||
other.ID = ID;
|
||||
return other;
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
@ -759,6 +779,12 @@ abstract public class TimeZone implements Serializable, Cloneable {
|
||||
* @serial
|
||||
*/
|
||||
private String ID;
|
||||
|
||||
/**
|
||||
* Cached {@link ZoneId} for this TimeZone
|
||||
*/
|
||||
private transient ZoneId zoneId;
|
||||
|
||||
private static volatile TimeZone defaultTimeZone;
|
||||
|
||||
static final String GMT_ID = "GMT";
|
||||
|
@ -859,7 +859,7 @@ public class TreeMap<K,V>
|
||||
* Returns a {@link Set} view of the mappings contained in this map.
|
||||
*
|
||||
* <p>The set's iterator returns the entries in ascending key order. The
|
||||
* sets's spliterator is
|
||||
* set's spliterator is
|
||||
* <em><a href="Spliterator.html#binding">late-binding</a></em>,
|
||||
* <em>fail-fast</em>, and additionally reports {@link Spliterator#SORTED} and
|
||||
* {@link Spliterator#ORDERED} with an encounter order that is ascending key
|
||||
@ -2643,7 +2643,7 @@ public class TreeMap<K,V>
|
||||
* child, also serving as origin for the split-off spliterator.
|
||||
* Left-hands are symmetric. Descending versions place the origin
|
||||
* at the end and invert ascending split rules. This base class
|
||||
* is non-commital about directionality, or whether the top-level
|
||||
* is non-committal about directionality, or whether the top-level
|
||||
* spliterator covers the whole tree. This means that the actual
|
||||
* split mechanics are located in subclasses. Some of the subclass
|
||||
* trySplit methods are identical (except for return types), but
|
||||
|
@ -481,7 +481,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
|
||||
*
|
||||
* Maintaining API and serialization compatibility with previous
|
||||
* versions of this class introduces several oddities. Mainly: We
|
||||
* leave untouched but unused constructor arguments refering to
|
||||
* leave untouched but unused constructor arguments referring to
|
||||
* concurrencyLevel. We accept a loadFactor constructor argument,
|
||||
* but apply it only to initial table capacity (which is the only
|
||||
* time that we can guarantee to honor it.) We also declare an
|
||||
|
@ -2710,7 +2710,7 @@ public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns lowest absolute key (ignoring directonality).
|
||||
* Returns lowest absolute key (ignoring directionality).
|
||||
*/
|
||||
K lowestKey() {
|
||||
Comparator<? super K> cmp = m.comparator;
|
||||
@ -2722,7 +2722,7 @@ public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns highest absolute key (ignoring directonality).
|
||||
* Returns highest absolute key (ignoring directionality).
|
||||
*/
|
||||
K highestKey() {
|
||||
Comparator<? super K> cmp = m.comparator;
|
||||
|
@ -1328,13 +1328,16 @@ public class ForkJoinPool extends AbstractExecutorService {
|
||||
/**
|
||||
* Number of times to spin-wait before blocking. The spins (in
|
||||
* awaitRunStateLock and awaitWork) currently use randomized
|
||||
* spins. If/when MWAIT-like intrinsics becomes available, they
|
||||
* may allow quieter spinning. The value of SPINS must be a power
|
||||
* of two, at least 4. The current value causes spinning for a
|
||||
* small fraction of typical context-switch times, well worthwhile
|
||||
* given the typical likelihoods that blocking is not necessary.
|
||||
* spins. Currently set to zero to reduce CPU usage.
|
||||
*
|
||||
* If greater than zero the value of SPINS must be a power
|
||||
* of two, at least 4. A value of 2048 causes spinning for a
|
||||
* small fraction of typical context-switch times.
|
||||
*
|
||||
* If/when MWAIT-like intrinsics becomes available, they
|
||||
* may allow quieter spinning.
|
||||
*/
|
||||
private static final int SPINS = 1 << 11;
|
||||
private static final int SPINS = 0;
|
||||
|
||||
/**
|
||||
* Increment for seed generators. See class ThreadLocal for
|
||||
|
@ -47,8 +47,7 @@ cryptographic provider developer guide:
|
||||
<ul>
|
||||
<li><a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
|
||||
<b>How to Implement a Provider for the
|
||||
Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
|
||||
<b>How to Implement a Provider for the Java™ Cryptography Architecture
|
||||
</b></a></li>
|
||||
</ul>
|
||||
|
||||
@ -66,8 +65,7 @@ For further documentation, please see:
|
||||
<li>
|
||||
<a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
|
||||
<b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
Cryptography Architecture API Specification and Reference
|
||||
<b>Java™ Cryptography Architecture API Specification and Reference
|
||||
</b></a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -62,14 +62,13 @@ and key specifications, please see:
|
||||
<li>
|
||||
<a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
|
||||
<b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
Cryptography Architecture API Specification and Reference
|
||||
<b>Java™ Cryptography Architecture API Specification and Reference
|
||||
</b></a></li>
|
||||
<li>
|
||||
<a href=
|
||||
"{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
|
||||
<b>How to Implement a Provider for the
|
||||
Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
|
||||
Java™ Cryptography Architecture
|
||||
</b></a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -38,8 +38,7 @@ and to optionally encrypt the data and/or authenticate the communicating peers.
|
||||
|
||||
<ul>
|
||||
<li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
|
||||
<b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
|
||||
Cryptography Architecture Standard Algorithm Name
|
||||
<b>Java™ Cryptography Architecture Standard Algorithm Name
|
||||
Documentation</b></a></li>
|
||||
</ul>
|
||||
|
||||
|
@ -145,12 +145,12 @@ public abstract class Parser {
|
||||
/**
|
||||
* ASCII character type array.
|
||||
*
|
||||
* This array maps an ASCII (7 bit) character to the character type.<br />
|
||||
* Possible character type values are:<br /> - ' ' for any kind of white
|
||||
* space character;<br /> - 'a' for any lower case alphabetical character
|
||||
* value;<br /> - 'A' for any upper case alphabetical character value;<br />
|
||||
* - 'd' for any decimal digit character value;<br /> - 'z' for any
|
||||
* character less then ' ' except '\t', '\n', '\r';<br /> An ASCII (7 bit)
|
||||
* This array maps an ASCII (7 bit) character to the character type.<br>
|
||||
* Possible character type values are:<br> - ' ' for any kind of white
|
||||
* space character;<br> - 'a' for any lower case alphabetical character
|
||||
* value;<br> - 'A' for any upper case alphabetical character value;<br>
|
||||
* - 'd' for any decimal digit character value;<br> - 'z' for any
|
||||
* character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit)
|
||||
* character which does not fall in any category listed above is mapped to
|
||||
* it self.
|
||||
*/
|
||||
@ -158,11 +158,11 @@ public abstract class Parser {
|
||||
/**
|
||||
* NMTOKEN character type array.
|
||||
*
|
||||
* This array maps an ASCII (7 bit) character to the character type.<br />
|
||||
* Possible character type values are:<br /> - 0 for underscore ('_') or any
|
||||
* lower and upper case alphabetical character value;<br /> - 1 for colon
|
||||
* (':') character;<br /> - 2 for dash ('-') and dot ('.') or any decimal
|
||||
* digit character value;<br /> - 3 for any kind of white space character<br
|
||||
* This array maps an ASCII (7 bit) character to the character type.<br>
|
||||
* Possible character type values are:<br> - 0 for underscore ('_') or any
|
||||
* lower and upper case alphabetical character value;<br> - 1 for colon
|
||||
* (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal
|
||||
* digit character value;<br> - 3 for any kind of white space character<br
|
||||
* /> An ASCII (7 bit) character which does not fall in any category listed
|
||||
* above is mapped to 0xff.
|
||||
*/
|
||||
@ -1841,10 +1841,12 @@ public abstract class Parser {
|
||||
/**
|
||||
* Reads an attribute value.
|
||||
*
|
||||
* The grammar which this method can read is:<br />
|
||||
* <code>eqstr := S "=" qstr</code><br />
|
||||
* <code>qstr := S ("'" string "'") |
|
||||
* ('"' string '"')</code><br /> This method resolves entities
|
||||
* The grammar this method can read is:
|
||||
* <pre>{@code
|
||||
* eqstr := S "=" qstr
|
||||
* qstr := S ("'" string "'") | ('"' string '"')
|
||||
* }</pre>
|
||||
* This method resolves entities
|
||||
* inside a string unless the parser parses DTD.
|
||||
*
|
||||
* @param flag The '=' character forces the method to accept the '='
|
||||
@ -2633,7 +2635,7 @@ public abstract class Parser {
|
||||
* Reports characters and empties the parser's buffer. This method is called
|
||||
* only if parser is going to return control to the main loop. This means
|
||||
* that this method may use parser buffer to report white space without
|
||||
* copeing characters to temporary buffer.
|
||||
* copying characters to temporary buffer.
|
||||
*/
|
||||
protected abstract void bflash()
|
||||
throws Exception;
|
||||
@ -2642,7 +2644,7 @@ public abstract class Parser {
|
||||
* Reports white space characters and empties the parser's buffer. This
|
||||
* method is called only if parser is going to return control to the main
|
||||
* loop. This means that this method may use parser buffer to report white
|
||||
* space without copeing characters to temporary buffer.
|
||||
* space without copying characters to temporary buffer.
|
||||
*/
|
||||
protected abstract void bflash_ws()
|
||||
throws Exception;
|
||||
@ -3290,16 +3292,20 @@ public abstract class Parser {
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps a character to it's type.
|
||||
* Maps a character to its type.
|
||||
*
|
||||
* Possible character type values are:<br /> - ' ' for any kind of white
|
||||
* space character;<br /> - 'a' for any lower case alphabetical character
|
||||
* value;<br /> - 'A' for any upper case alphabetical character value;<br />
|
||||
* - 'd' for any decimal digit character value;<br /> - 'z' for any
|
||||
* character less then ' ' except '\t', '\n', '\r';<br /> - 'X' for any not
|
||||
* ASCII character;<br /> - 'Z' for EOS character.<br /> An ASCII (7 bit)
|
||||
* character which does not fall in any category listed above is mapped to
|
||||
* it self.
|
||||
* Possible character type values are:
|
||||
* <ul>
|
||||
* <li>' ' - for any kind of whitespace character;</li>
|
||||
* <li>'a' - for any lower case alphabetical character value;</li>
|
||||
* <li>'A' - for any upper case alphabetical character value;</li>
|
||||
* <li>'d' - for any decimal digit character value;</li>
|
||||
* <li>'z' - for any character less than ' ' except '\t', '\n', '\r';</li>
|
||||
* <li>'X' - for any not ASCII character;</li>
|
||||
* <li>'Z' - for EOS character.</li>
|
||||
* </ul>
|
||||
* An ASCII (7 bit) character which does not fall in any category
|
||||
* listed above is mapped to itself.
|
||||
*
|
||||
* @param ch The character to map.
|
||||
* @return The type of character.
|
||||
|
@ -649,7 +649,7 @@ final class ParserSAX
|
||||
* Reports characters and empties the parser's buffer. This method is called
|
||||
* only if parser is going to return control to the main loop. This means
|
||||
* that this method may use parser buffer to report white space without
|
||||
* copeing characters to temporary buffer.
|
||||
* copying characters to temporary buffer.
|
||||
*/
|
||||
protected void bflash() throws SAXException {
|
||||
if (mBuffIdx >= 0) {
|
||||
@ -663,7 +663,7 @@ final class ParserSAX
|
||||
* Reports white space characters and empties the parser's buffer. This
|
||||
* method is called only if parser is going to return control to the main
|
||||
* loop. This means that this method may use parser buffer to report white
|
||||
* space without copeing characters to temporary buffer.
|
||||
* space without copying characters to temporary buffer.
|
||||
*/
|
||||
protected void bflash_ws() throws SAXException {
|
||||
if (mBuffIdx >= 0) {
|
||||
|
@ -196,8 +196,8 @@ public
|
||||
/**
|
||||
* Gets the object associated with the specified key in the Cache.
|
||||
* @param key the key in the hash table
|
||||
* @returns the element for the key or null if the key
|
||||
* is not defined in the hash table.
|
||||
* @return the element for the key or null if the key
|
||||
* is not defined in the hash table.
|
||||
* @see Cache#put
|
||||
*/
|
||||
public synchronized Object get(Object key) {
|
||||
|
@ -120,7 +120,7 @@ public abstract class CharacterDecoder {
|
||||
/**
|
||||
* This method does an actual decode. It takes the decoded bytes and
|
||||
* writes them to the OutputStream. The integer <i>l</i> tells the
|
||||
* method how many bytes are required. This is always <= bytesPerAtom().
|
||||
* method how many bytes are required. This is always {@literal <=} bytesPerAtom().
|
||||
*/
|
||||
protected void decodeAtom(PushbackInputStream aStream, OutputStream bStream, int l) throws IOException {
|
||||
throw new CEStreamExhausted();
|
||||
|
@ -68,7 +68,7 @@ import java.nio.ByteBuffer;
|
||||
* referenced in the See Also list below.
|
||||
*
|
||||
* @author Chuck McManis
|
||||
* @see CharacterDecoder;
|
||||
* @see CharacterDecoder
|
||||
* @see UCEncoder
|
||||
* @see UUEncoder
|
||||
* @see BASE64Encoder
|
||||
@ -107,7 +107,7 @@ public abstract class CharacterEncoder {
|
||||
|
||||
/**
|
||||
* Encode the suffix that ends every output line. By default
|
||||
* this method just prints a <newline> into the output stream.
|
||||
* this method just prints a newline into the output stream.
|
||||
*/
|
||||
protected void encodeLineSuffix(OutputStream aStream) throws IOException {
|
||||
pStream.println();
|
||||
|
@ -34,7 +34,7 @@ package sun.misc;
|
||||
* with the lock() and unlock() methods. However if there is a thread
|
||||
* waiting for the state variable to become a particular value and you
|
||||
* simply call Unlock(), that thread will not be able to acquire the
|
||||
* lock until the state variable equals its desired value. <p>
|
||||
* lock until the state variable equals its desired value.
|
||||
*
|
||||
* @author Peter King
|
||||
*/
|
||||
|
@ -45,26 +45,26 @@ import java.net.MalformedURLException;
|
||||
import sun.net.www.ParseUtil;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This class checks dependent extensions a particular jar file may have
|
||||
* declared through its manifest attributes.
|
||||
* </p>
|
||||
* <p>
|
||||
* Jar file declared dependent extensions through the extension-list
|
||||
* attribute. The extension-list contains a list of keys used to
|
||||
* fetch the other attributes describing the required extension.
|
||||
* If key is the extension key declared in the extension-list
|
||||
* attribute, the following describing attribute can be found in
|
||||
* the manifest :
|
||||
* key-Extension-Name: (Specification package name)
|
||||
* key-Specification-Version: (Specification-Version)
|
||||
* key-Implementation-Version: (Implementation-Version)
|
||||
* key-Implementation-Vendor-Id: (Imlementation-Vendor-Id)
|
||||
* key-Implementation-Version: (Implementation version)
|
||||
* key-Implementation-URL: (URL to download the requested extension)
|
||||
* the manifest:
|
||||
* <ul>
|
||||
* <li>key-Extension-Name: (Specification package name)</li>
|
||||
* <li>key-Specification-Version: (Specification-Version)</li>
|
||||
* <li>key-Implementation-Version: (Implementation-Version)</li>
|
||||
* <li>key-Implementation-Vendor-Id: (Imlementation-Vendor-Id)</li>
|
||||
* <li>key-Implementation-Version: (Implementation version)</li>
|
||||
* <li>key-Implementation-URL: (URL to download the requested extension)</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* This class also maintain versioning consistency of installed
|
||||
* extensions dependencies declared in jar file manifest.
|
||||
* </p>
|
||||
*
|
||||
* @deprecated this class will be removed in a future release.
|
||||
* @author Jerome Dochez
|
||||
@ -76,10 +76,9 @@ public class ExtensionDependency {
|
||||
private static Vector<ExtensionInstallationProvider> providers;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Register an ExtensionInstallationProvider. The provider is responsible
|
||||
* for handling the installation (upgrade) of any missing extensions.
|
||||
* </p>
|
||||
*
|
||||
* @param eip ExtensionInstallationProvider implementation
|
||||
*/
|
||||
public synchronized static void addExtensionInstallationProvider
|
||||
@ -92,9 +91,7 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Unregister a previously installed installation provider
|
||||
* </p>
|
||||
*/
|
||||
public synchronized static void removeExtensionInstallationProvider
|
||||
(ExtensionInstallationProvider eip)
|
||||
@ -103,10 +100,9 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks the dependencies of the jar file on installed extension.
|
||||
* </p>
|
||||
* @param jarFile containing the attriutes declaring the dependencies
|
||||
*
|
||||
* @param jar containing the attributes declaring the dependencies
|
||||
*/
|
||||
public static boolean checkExtensionsDependencies(JarFile jar)
|
||||
{
|
||||
@ -182,9 +178,8 @@ public class ExtensionDependency {
|
||||
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* Check that a particular dependency on an extension is satisfied.
|
||||
* </p>
|
||||
*
|
||||
* @param extensionName is the key used for the attributes in the manifest
|
||||
* @param attr is the attributes of the manifest file
|
||||
*
|
||||
@ -204,10 +199,9 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* Check if a particular extension is part of the currently installed
|
||||
* extensions.
|
||||
* </p>
|
||||
*
|
||||
* @param extensionName is the key for the attributes in the manifest
|
||||
* @param attr is the attributes of the manifest
|
||||
*
|
||||
@ -262,11 +256,9 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* Check if the requested extension described by the attributes
|
||||
* in the manifest under the key extensionName is compatible with
|
||||
* the jar file.
|
||||
* </p>
|
||||
*
|
||||
* @param extensionName key in the attribute list
|
||||
* @param attr manifest file attributes
|
||||
@ -337,10 +329,8 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* An required extension is missing, if an ExtensionInstallationProvider is
|
||||
* registered, delegate the installation of that particular extension to it.
|
||||
* </p>
|
||||
*
|
||||
* @param reqInfo Missing extension information
|
||||
* @param instInfo Older installed version information
|
||||
@ -380,11 +370,9 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Checks if the extension, that is specified in the extension-list in
|
||||
* the applet jar manifest, is already installed (i.e. exists in the
|
||||
* extension directory).
|
||||
* </p>
|
||||
*
|
||||
* @param extensionName extension name in the extension-list
|
||||
*
|
||||
@ -428,9 +416,7 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* @return the java.ext.dirs property as a list of directory
|
||||
* </p>
|
||||
*/
|
||||
private static File[] getExtDirs() {
|
||||
String s = java.security.AccessController.doPrivileged(
|
||||
@ -456,9 +442,8 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* Scan the directories and return all files installed in those
|
||||
* </p>
|
||||
*
|
||||
* @param dirs list of directories to scan
|
||||
*
|
||||
* @return the list of files installed in all the directories
|
||||
@ -483,9 +468,7 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* @return the list of installed extensions jar files
|
||||
* </p>
|
||||
*/
|
||||
private File[] getInstalledExtensions() throws IOException {
|
||||
return AccessController.doPrivileged(
|
||||
@ -503,9 +486,7 @@ public class ExtensionDependency {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* Add the newly installed jar file to the extension class loader.
|
||||
* </p>
|
||||
*
|
||||
* @param cl the current installed extension class loader
|
||||
*
|
||||
|
@ -45,9 +45,7 @@ import java.lang.Character.*;
|
||||
public class ExtensionInfo {
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* public static values returned by the isCompatible method
|
||||
* </p>
|
||||
*/
|
||||
public static final int COMPATIBLE = 0;
|
||||
public static final int REQUIRE_SPECIFICATION_UPGRADE = 1;
|
||||
@ -56,10 +54,8 @@ public class ExtensionInfo {
|
||||
public static final int INCOMPATIBLE = 4;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* attributes fully describer an extension. The underlying described
|
||||
* extension may be installed and requested.
|
||||
* <p>
|
||||
*/
|
||||
public String title;
|
||||
public String name;
|
||||
@ -76,15 +72,12 @@ public class ExtensionInfo {
|
||||
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Create a new uninitialized extension information object
|
||||
* </p>
|
||||
*/
|
||||
public ExtensionInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Create and initialize an extension information object.
|
||||
* The initialization uses the attributes passed as being
|
||||
* the content of a manifest file to load the extension
|
||||
@ -93,7 +86,7 @@ public class ExtensionInfo {
|
||||
* extension they may depend on, the extension key parameter
|
||||
* is prepanded to the attribute name to make the key used
|
||||
* to retrieve the attribute from the manifest file
|
||||
* <p>
|
||||
*
|
||||
* @param extensionKey unique extension key in the manifest
|
||||
* @param attr Attributes of a manifest file
|
||||
*/
|
||||
@ -149,13 +142,11 @@ public class ExtensionInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* @return true if the extension described by this extension information
|
||||
* is compatible with the extension described by the extension
|
||||
* information passed as a parameter
|
||||
* </p>
|
||||
*
|
||||
* @param the requested extension information to compare to
|
||||
* @param ei the requested extension information to compare to
|
||||
*/
|
||||
public int isCompatibleWith(ExtensionInfo ei) {
|
||||
|
||||
@ -204,10 +195,8 @@ public class ExtensionInfo {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* helper method to print sensible information on the undelying described
|
||||
* extension
|
||||
* </p>
|
||||
*/
|
||||
public String toString() {
|
||||
return "Extension : title(" + title + "), name(" + name + "), spec vendor(" +
|
||||
@ -217,15 +206,15 @@ public class ExtensionInfo {
|
||||
}
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* helper method to compare two versions.
|
||||
* version are in the x.y.z.t pattern.
|
||||
* </p>
|
||||
*
|
||||
* @param source version to compare to
|
||||
* @param target version used to compare against
|
||||
* @return < 0 if source < version
|
||||
* > 0 if source > version
|
||||
* = 0 if source = version
|
||||
* @return <pre>{@code
|
||||
* < 0 if source < version
|
||||
* > 0 if source > version
|
||||
* = 0 if source = version}</pre>
|
||||
*/
|
||||
private int compareExtensionVersion(String source, String target)
|
||||
throws NumberFormatException
|
||||
@ -238,15 +227,15 @@ public class ExtensionInfo {
|
||||
|
||||
|
||||
/*
|
||||
* <p>
|
||||
* helper method to compare two versions.
|
||||
* version are in the x.y.z.t pattern.
|
||||
* </p>
|
||||
*
|
||||
* @param source version to compare to
|
||||
* @param target version used to compare against
|
||||
* @return < 0 if source < version
|
||||
* > 0 if source > version
|
||||
* = 0 if source = version
|
||||
* @return <pre>{@code
|
||||
* < 0 if source < version
|
||||
* > 0 if source > version
|
||||
* = 0 if source = version}</pre>
|
||||
*/
|
||||
private int strictCompareExtensionVersion(String source, String target)
|
||||
throws NumberFormatException
|
||||
|
@ -384,8 +384,8 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
* Retrieves the normalization bias of the <code>FDBigIntger</code>. The
|
||||
* normalization bias is a left shift such that after it the highest word
|
||||
* of the value will have the 4 highest bits equal to zero:
|
||||
* <code>(highestWord & 0xf0000000) == 0</code>, but the next bit should be 1
|
||||
* <code>(highestWord & 0x08000000) != 0</code>.
|
||||
* {@code (highestWord & 0xf0000000) == 0}, but the next bit should be 1
|
||||
* {@code (highestWord & 0x08000000) != 0}.
|
||||
*
|
||||
* @return The normalization bias.
|
||||
*/
|
||||
@ -546,9 +546,9 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
* We assume that S has been normalized, as above, and that
|
||||
* "this" has been left-shifted accordingly.
|
||||
* Also assumed, of course, is that the result, q, can be expressed
|
||||
* as an integer, 0 <= q < 10.
|
||||
* as an integer, {@code 0 <= q < 10}.
|
||||
*
|
||||
* @param The divisor of this <code>FDBigInteger</code>.
|
||||
* @param S The divisor of this <code>FDBigInteger</code>.
|
||||
* @return <code>q = (int)(this / S)</code>.
|
||||
*/
|
||||
/*@
|
||||
@ -685,7 +685,7 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
*
|
||||
* @param p5 The exponent of the power-of-five factor.
|
||||
* @param p2 The exponent of the power-of-two factor.
|
||||
* @return
|
||||
* @return The multiplication result.
|
||||
*/
|
||||
/*@
|
||||
@ requires this.value() == 0 || p5 == 0 && p2 == 0;
|
||||
@ -931,11 +931,11 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
/**
|
||||
* Compares the parameter with this <code>FDBigInteger</code>. Returns an
|
||||
* integer accordingly as:
|
||||
* <pre>
|
||||
* >0: this > other
|
||||
* 0: this == other
|
||||
* <0: this < other
|
||||
* </pre>
|
||||
* <pre>{@code
|
||||
* > 0: this > other
|
||||
* 0: this == other
|
||||
* < 0: this < other
|
||||
* }</pre>
|
||||
*
|
||||
* @param other The <code>FDBigInteger</code> to compare.
|
||||
* @return A negative value, zero, or a positive value according to the
|
||||
@ -974,11 +974,11 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
* Compares this <code>FDBigInteger</code> with
|
||||
* <code>5<sup>p5</sup> * 2<sup>p2</sup></code>.
|
||||
* Returns an integer accordingly as:
|
||||
* <pre>
|
||||
* >0: this > other
|
||||
* 0: this == other
|
||||
* <0: this < other
|
||||
* </pre>
|
||||
* <pre>{@code
|
||||
* > 0: this > other
|
||||
* 0: this == other
|
||||
* < 0: this < other
|
||||
* }</pre>
|
||||
* @param p5 The exponent of the power-of-five factor.
|
||||
* @param p2 The exponent of the power-of-two factor.
|
||||
* @return A negative value, zero, or a positive value according to the
|
||||
@ -1011,11 +1011,11 @@ public /*@ spec_bigint_math @*/ class FDBigInteger {
|
||||
/**
|
||||
* Compares this <code>FDBigInteger</code> with <code>x + y</code>. Returns a
|
||||
* value according to the comparison as:
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* -1: this < x + y
|
||||
* 0: this == x + y
|
||||
* 1: this > x + y
|
||||
* </pre>
|
||||
* }</pre>
|
||||
* @param x The first addend of the sum to compare.
|
||||
* @param y The second addend of the sum to compare.
|
||||
* @return -1, 0, or 1 according to the result of the comparison.
|
||||
|
@ -154,7 +154,7 @@ public class FloatingDecimal{
|
||||
|
||||
/**
|
||||
* Indicates the sign of the value.
|
||||
* @return <code>value < 0.0</code>.
|
||||
* @return {@code value < 0.0}.
|
||||
*/
|
||||
public boolean isNegative();
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class IOUtils {
|
||||
/**
|
||||
* Read up to <code>length</code> of bytes from <code>in</code>
|
||||
* until EOF is detected.
|
||||
* @param in input stream, must not be null
|
||||
* @param is input stream, must not be null
|
||||
* @param length number of bytes to read, -1 or Integer.MAX_VALUE means
|
||||
* read as much as possible
|
||||
* @param readAll if true, an EOFException will be thrown if not enough
|
||||
|
@ -29,10 +29,8 @@ import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* This class checks that only jar and zip files are included in the file list.
|
||||
* This class is used in extension installation support (ExtensionDependency).
|
||||
* <p>
|
||||
*
|
||||
* @deprecated this class will be removed in a future release.
|
||||
* @author Michael Colburn
|
||||
|
@ -91,14 +91,14 @@ public interface JavaLangAccess {
|
||||
* may be added to the delete on exit list by the application shutdown
|
||||
* hooks.
|
||||
*
|
||||
* @params slot the slot in the shutdown hook array, whose element
|
||||
* will be invoked in order during shutdown
|
||||
* @params registerShutdownInProgress true to allow the hook
|
||||
* to be registered even if the shutdown is in progress.
|
||||
* @params hook the hook to be registered
|
||||
* @param slot the slot in the shutdown hook array, whose element
|
||||
* will be invoked in order during shutdown
|
||||
* @param registerShutdownInProgress true to allow the hook
|
||||
* to be registered even if the shutdown is in progress.
|
||||
* @param hook the hook to be registered
|
||||
*
|
||||
* @throw IllegalStateException if shutdown is in progress and
|
||||
* the slot is not valid to register.
|
||||
* @throws IllegalStateException if shutdown is in progress and
|
||||
* the slot is not valid to register.
|
||||
*/
|
||||
void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
|
||||
|
||||
|
@ -67,13 +67,13 @@ public final class Perf {
|
||||
* <code>AccessController.doPrivileged(PrivilegedAction)</code>.
|
||||
* <p> Here is a suggested idiom for use of this class:
|
||||
*
|
||||
* <blockquote><pre>
|
||||
* <blockquote><pre>{@code
|
||||
* class MyTrustedClass {
|
||||
* private static final Perf perf =
|
||||
* AccessController.doPrivileged(new Perf.GetPerfAction<Perf>());
|
||||
* ...
|
||||
* }
|
||||
* </pre></blockquote>
|
||||
* }</pre></blockquote>
|
||||
* <p>
|
||||
* In the presence of a security manager, the <code>MyTrustedClass</code>
|
||||
* class in the above example will need to be granted the
|
||||
@ -171,8 +171,7 @@ public final class Perf {
|
||||
* The attach mode specifies the access permissions requested for the
|
||||
* instrumentation buffer of the target virtual machine. The permitted
|
||||
* access permissions are:
|
||||
* <p>
|
||||
* <bl>
|
||||
* <ul>
|
||||
* <li>"r" - Read only access. This Java virtual machine has only
|
||||
* read access to the instrumentation buffer for the target Java
|
||||
* virtual machine.
|
||||
@ -180,7 +179,7 @@ public final class Perf {
|
||||
* write access to the instrumentation buffer for the target Java virtual
|
||||
* machine. This mode is currently not supported and is reserved for
|
||||
* future enhancements.
|
||||
* </bl>
|
||||
* </ul>
|
||||
*
|
||||
* @param lvmid an integer that uniquely identifies the
|
||||
* target local Java virtual machine.
|
||||
|
@ -37,7 +37,7 @@ import java.security.AccessController;
|
||||
* The perf counters will be created in the jvmstat perf buffer
|
||||
* that the HotSpot VM creates. The default size is 32K and thus
|
||||
* the number of counters is bounded. You can alter the size
|
||||
* with -XX:PerfDataMemorySize=<bytes> option. If there is
|
||||
* with {@code -XX:PerfDataMemorySize=<bytes>} option. If there is
|
||||
* insufficient memory in the jvmstat perf buffer, the C heap memory
|
||||
* will be used and thus the application will continue to run if
|
||||
* the counters added exceeds the buffer size but the counters
|
||||
|
@ -51,10 +51,12 @@ import java.io.Writer;
|
||||
* <P>
|
||||
* To automatically track startup performance in an app or applet,
|
||||
* use the command-line parameter sun.perflog as follows:<BR>
|
||||
* <pre>{@code
|
||||
* -Dsun.perflog[=file:<filename>]
|
||||
* }</pre>
|
||||
* <BR>
|
||||
* where simply using the parameter with no value will enable output
|
||||
* to the console and a value of "file:<filename>" will cause
|
||||
* to the console and a value of "{@code file:<filename>}" will cause
|
||||
* that given filename to be created and used for all output.
|
||||
* <P>
|
||||
* By default, times are measured using System.currentTimeMillis(). To use
|
||||
|
@ -154,7 +154,8 @@ public abstract class Resource {
|
||||
|
||||
/**
|
||||
* Returns the Resource data as a ByteBuffer, but only if the input stream
|
||||
* was implemented on top of a ByteBuffer. Return <tt>null</tt> otherwise.
|
||||
* was implemented on top of a ByteBuffer. Return {@code null} otherwise.
|
||||
* @return Resource data or null.
|
||||
*/
|
||||
public ByteBuffer getByteBuffer() throws IOException {
|
||||
InputStream in = cachedInputStream();
|
||||
|
@ -50,7 +50,7 @@ import java.util.Hashtable;
|
||||
* Signal objects are created based on their names. For example:
|
||||
* <blockquote><pre>
|
||||
* new Signal("INT");
|
||||
* </blockquote></pre>
|
||||
* </pre></blockquote>
|
||||
* constructs a signal object corresponding to <code>SIGINT</code>, which is
|
||||
* typically produced when the user presses <code>Ctrl-C</code> at the command line.
|
||||
* The <code>Signal</code> constructor throws <code>IllegalArgumentException</code>
|
||||
@ -64,7 +64,7 @@ import java.util.Hashtable;
|
||||
* }
|
||||
* };
|
||||
* Signal.handle(new Signal("INT"), handler);
|
||||
* </blockquote></pre>
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* @author Sheng Liang
|
||||
* @author Bill Shannon
|
||||
@ -149,7 +149,7 @@ public final class Signal {
|
||||
*
|
||||
* @param sig a signal
|
||||
* @param handler the handler to be registered with the given signal.
|
||||
* @result the old handler
|
||||
* @return the old handler
|
||||
* @exception IllegalArgumentException the signal is in use by the VM
|
||||
* @see sun.misc.Signal#raise(Signal sig)
|
||||
* @see sun.misc.SignalHandler
|
||||
|
@ -641,9 +641,9 @@ public final class Unsafe {
|
||||
* <li>String: any object (not just a java.lang.String)
|
||||
* <li>InterfaceMethodRef: (NYI) a method handle to invoke on that call site's arguments
|
||||
* </ul>
|
||||
* @params hostClass context for linkage, access control, protection domain, and class loader
|
||||
* @params data bytes of a class file
|
||||
* @params cpPatches where non-null entries exist, they replace corresponding CP entries in data
|
||||
* @param hostClass context for linkage, access control, protection domain, and class loader
|
||||
* @param data bytes of a class file
|
||||
* @param cpPatches where non-null entries exist, they replace corresponding CP entries in data
|
||||
*/
|
||||
public native Class<?> defineAnonymousClass(Class<?> hostClass, byte[] data, Object[] cpPatches);
|
||||
|
||||
@ -808,9 +808,9 @@ public final class Unsafe {
|
||||
* The system imposes a maximum of 3 samples, representing
|
||||
* averages over the last 1, 5, and 15 minutes, respectively.
|
||||
*
|
||||
* @params loadavg an array of double of size nelems
|
||||
* @params nelems the number of samples to be retrieved and
|
||||
* must be 1 to 3.
|
||||
* @param loadavg an array of double of size nelems
|
||||
* @param nelems the number of samples to be retrieved and
|
||||
* must be 1 to 3.
|
||||
*
|
||||
* @return the number of samples actually retrieved; or -1
|
||||
* if the load average is unobtainable.
|
||||
@ -1108,7 +1108,6 @@ public final class Unsafe {
|
||||
* <p>
|
||||
* 8-byte atomicity is only guaranteed on platforms on which
|
||||
* support atomic accesses to longs.
|
||||
* <p>
|
||||
*
|
||||
* @param o Java heap object in which the value resides, if any, else
|
||||
* null
|
||||
|
@ -315,7 +315,7 @@ public class VM {
|
||||
}
|
||||
|
||||
/*
|
||||
* Add <tt>n</tt> to the objects pending for finalization count.
|
||||
* Add {@code n} to the objects pending for finalization count.
|
||||
*
|
||||
* @param n an integer value to be added to the objects pending
|
||||
* for finalization count
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_de extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_es extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_fr extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_it extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_ja extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_ko extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_pt_BR extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_sv extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_zh_CN extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -26,7 +26,7 @@
|
||||
package sun.misc.resources;
|
||||
|
||||
/**
|
||||
* <p> This class represents the <code>ResourceBundle</code>
|
||||
* This class represents the {@code ResourceBundle}
|
||||
* for sun.misc.
|
||||
*
|
||||
* @author Michael Colburn
|
||||
@ -35,9 +35,9 @@ package sun.misc.resources;
|
||||
public class Messages_zh_TW extends java.util.ListResourceBundle {
|
||||
|
||||
/**
|
||||
* Returns the contents of this <code>ResourceBundle</code>.
|
||||
* <p>
|
||||
* @return the contents of this <code>ResourceBundle</code>.
|
||||
* Returns the contents of this {@code ResourceBundle}.
|
||||
*
|
||||
* @return the contents of this {@code ResourceBundle}.
|
||||
*/
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
|
@ -983,7 +983,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||
SocketPermission p = URLtoSocketPermission(this.url);
|
||||
if (p != null) {
|
||||
try {
|
||||
AccessController.doPrivileged(
|
||||
AccessController.doPrivilegedWithCombiner(
|
||||
new PrivilegedExceptionAction<>() {
|
||||
public Void run() throws IOException {
|
||||
plainConnect0();
|
||||
@ -1244,7 +1244,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||
|
||||
if (p != null) {
|
||||
try {
|
||||
return AccessController.doPrivileged(
|
||||
return AccessController.doPrivilegedWithCombiner(
|
||||
new PrivilegedExceptionAction<>() {
|
||||
public OutputStream run() throws IOException {
|
||||
return getOutputStream0();
|
||||
@ -1422,7 +1422,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||
|
||||
if (p != null) {
|
||||
try {
|
||||
return AccessController.doPrivileged(
|
||||
return AccessController.doPrivilegedWithCombiner(
|
||||
new PrivilegedExceptionAction<>() {
|
||||
public InputStream run() throws IOException {
|
||||
return getInputStream0();
|
||||
@ -2565,7 +2565,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
|
||||
|
||||
if (p != null) {
|
||||
try {
|
||||
return AccessController.doPrivileged(
|
||||
return AccessController.doPrivilegedWithCombiner(
|
||||
new PrivilegedExceptionAction<>() {
|
||||
public Boolean run() throws IOException {
|
||||
return followRedirect0(loc, stat, locUrl0);
|
||||
|
@ -378,7 +378,6 @@ public class HKSCS {
|
||||
dst[dp++] = repl[1];
|
||||
continue;
|
||||
}
|
||||
sp++;
|
||||
}
|
||||
if (bb > MAX_SINGLEBYTE) { // DoubleByte
|
||||
dst[dp++] = (byte)(bb >> 8);
|
||||
|
@ -175,10 +175,10 @@ public class Surrogate {
|
||||
* @param in The source buffer, from which one more character
|
||||
* will be consumed if c is a high surrogate
|
||||
*
|
||||
* @returns Either a parsed UCS-4 character, in which case the isPair()
|
||||
* and increment() methods will return meaningful values, or
|
||||
* -1, in which case error() will return a descriptive result
|
||||
* object
|
||||
* @return Either a parsed UCS-4 character, in which case the isPair()
|
||||
* and increment() methods will return meaningful values, or
|
||||
* -1, in which case error() will return a descriptive result
|
||||
* object
|
||||
*/
|
||||
public int parse(char c, CharBuffer in) {
|
||||
if (Character.isHighSurrogate(c)) {
|
||||
@ -216,10 +216,10 @@ public class Surrogate {
|
||||
* @param ip The input index
|
||||
* @param il The input limit
|
||||
*
|
||||
* @returns Either a parsed UCS-4 character, in which case the isPair()
|
||||
* and increment() methods will return meaningful values, or
|
||||
* -1, in which case error() will return a descriptive result
|
||||
* object
|
||||
* @return Either a parsed UCS-4 character, in which case the isPair()
|
||||
* and increment() methods will return meaningful values, or
|
||||
* -1, in which case error() will return a descriptive result
|
||||
* object
|
||||
*/
|
||||
public int parse(char c, char[] ia, int ip, int il) {
|
||||
assert (ia[ip] == c);
|
||||
@ -280,9 +280,9 @@ public class Surrogate {
|
||||
* @param dst The destination buffer, to which one or two UTF-16
|
||||
* characters will be written
|
||||
*
|
||||
* @returns Either a positive count of the number of UTF-16 characters
|
||||
* written to the destination buffer, or -1, in which case
|
||||
* error() will return a descriptive result object
|
||||
* @return Either a positive count of the number of UTF-16 characters
|
||||
* written to the destination buffer, or -1, in which case
|
||||
* error() will return a descriptive result object
|
||||
*/
|
||||
public int generate(int uc, int len, CharBuffer dst) {
|
||||
if (Character.isBmpCodePoint(uc)) {
|
||||
@ -325,9 +325,9 @@ public class Surrogate {
|
||||
* @param dp The destination position
|
||||
* @param dl The destination limit
|
||||
*
|
||||
* @returns Either a positive count of the number of UTF-16 characters
|
||||
* written to the destination buffer, or -1, in which case
|
||||
* error() will return a descriptive result object
|
||||
* @return Either a positive count of the number of UTF-16 characters
|
||||
* written to the destination buffer, or -1, in which case
|
||||
* error() will return a descriptive result object
|
||||
*/
|
||||
public int generate(int uc, int len, char[] da, int dp, int dl) {
|
||||
if (Character.isBmpCodePoint(uc)) {
|
||||
|
@ -454,7 +454,7 @@ public class AVA implements DerEncoder {
|
||||
if (embeddedHex.size() > 0) {
|
||||
// add space(s) before embedded hex bytes
|
||||
for (int i = 0; i < spaceCount; i++) {
|
||||
temp.append(" ");
|
||||
temp.append(' ');
|
||||
}
|
||||
spaceCount = 0;
|
||||
|
||||
@ -472,7 +472,7 @@ public class AVA implements DerEncoder {
|
||||
} else {
|
||||
// add space(s)
|
||||
for (int i = 0; i < spaceCount; i++) {
|
||||
temp.append(" ");
|
||||
temp.append(' ');
|
||||
}
|
||||
spaceCount = 0;
|
||||
temp.append((char)c);
|
||||
@ -853,7 +853,7 @@ public class AVA implements DerEncoder {
|
||||
}
|
||||
sbuffer.append(c);
|
||||
}
|
||||
typeAndValue.append(sbuffer.toString());
|
||||
typeAndValue.append(sbuffer);
|
||||
}
|
||||
return typeAndValue.toString();
|
||||
}
|
||||
@ -1039,7 +1039,7 @@ public class AVA implements DerEncoder {
|
||||
StringBuilder retval = new StringBuilder(40);
|
||||
|
||||
retval.append(keyword);
|
||||
retval.append("=");
|
||||
retval.append('=');
|
||||
|
||||
try {
|
||||
String valStr = value.getAsString();
|
||||
@ -1147,9 +1147,11 @@ public class AVA implements DerEncoder {
|
||||
// Emit the string ... quote it if needed
|
||||
// if string is already quoted, don't re-quote
|
||||
if (!alreadyQuoted && quoteNeeded) {
|
||||
retval.append("\"" + sbuffer.toString() + "\"");
|
||||
retval.append('\"')
|
||||
.append(sbuffer)
|
||||
.append('\"');
|
||||
} else {
|
||||
retval.append(sbuffer.toString());
|
||||
retval.append(sbuffer);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
@ -196,17 +196,20 @@ implements CertAttrSet<String> {
|
||||
* Return the object as a string.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = super.toString() + "AuthorityKeyIdentifier [\n";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append("AuthorityKeyIdentifier [\n");
|
||||
if (id != null) {
|
||||
s += id.toString(); // id already has a newline
|
||||
sb.append(id); // id already has a newline
|
||||
}
|
||||
if (names != null) {
|
||||
s += names.toString() + "\n";
|
||||
sb.append(names).append('\n');
|
||||
}
|
||||
if (serialNum != null) {
|
||||
s += serialNum.toString() + "\n";
|
||||
sb.append(serialNum).append('\n');
|
||||
}
|
||||
return (s + "]\n");
|
||||
sb.append("]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,15 +171,11 @@ implements CertAttrSet<String> {
|
||||
* Return user readable form of extension.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = super.toString() + "BasicConstraints:[\n";
|
||||
|
||||
s += ((ca) ? (" CA:true") : (" CA:false")) + "\n";
|
||||
if (pathLen >= 0) {
|
||||
s += " PathLen:" + pathLen + "\n";
|
||||
} else {
|
||||
s += " PathLen: undefined\n";
|
||||
}
|
||||
return (s + "]\n");
|
||||
return super.toString() +
|
||||
"BasicConstraints:[\n CA:" + ca +
|
||||
"\n PathLen:" +
|
||||
((pathLen >= 0) ? String.valueOf(pathLen) : " undefined") +
|
||||
"\n]\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -231,8 +231,8 @@ public class CRLDistributionPointsExtension extends Extension
|
||||
distributionPoints = (List<DistributionPoint>)obj;
|
||||
} else {
|
||||
throw new IOException("Attribute name [" + name +
|
||||
"] not recognized by " +
|
||||
"CertAttrSet:" + extensionName + ".");
|
||||
"] not recognized by " +
|
||||
"CertAttrSet:" + extensionName + '.');
|
||||
}
|
||||
encodeThis();
|
||||
}
|
||||
@ -245,8 +245,8 @@ public class CRLDistributionPointsExtension extends Extension
|
||||
return distributionPoints;
|
||||
} else {
|
||||
throw new IOException("Attribute name [" + name +
|
||||
"] not recognized by " +
|
||||
"CertAttrSet:" + extensionName + ".");
|
||||
"] not recognized by " +
|
||||
"CertAttrSet:" + extensionName + '.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,8 +146,8 @@ implements CertAttrSet<String> {
|
||||
}
|
||||
crlNumber = (BigInteger)obj;
|
||||
} else {
|
||||
throw new IOException("Attribute name not recognized by"
|
||||
+ " CertAttrSet:" + extensionName + ".");
|
||||
throw new IOException("Attribute name not recognized by" +
|
||||
" CertAttrSet:" + extensionName + '.');
|
||||
}
|
||||
encodeThis();
|
||||
}
|
||||
@ -172,8 +172,8 @@ implements CertAttrSet<String> {
|
||||
if (name.equalsIgnoreCase(NUMBER)) {
|
||||
crlNumber = null;
|
||||
} else {
|
||||
throw new IOException("Attribute name not recognized by"
|
||||
+ " CertAttrSet:" + extensionName + ".");
|
||||
throw new IOException("Attribute name not recognized by" +
|
||||
" CertAttrSet:" + extensionName + '.');
|
||||
}
|
||||
encodeThis();
|
||||
}
|
||||
@ -182,10 +182,15 @@ implements CertAttrSet<String> {
|
||||
* Returns a printable representation of the CRLNumberExtension.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = super.toString() + extensionLabel + ": " +
|
||||
((crlNumber == null) ? "" : Debug.toHexString(crlNumber))
|
||||
+ "\n";
|
||||
return (s);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append(extensionLabel)
|
||||
.append(": ");
|
||||
if (crlNumber != null) {
|
||||
sb.append(Debug.toHexString(crlNumber));
|
||||
}
|
||||
sb.append('\n');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -195,7 +200,7 @@ implements CertAttrSet<String> {
|
||||
* @exception IOException on encoding errors.
|
||||
*/
|
||||
public void encode(OutputStream out) throws IOException {
|
||||
DerOutputStream tmp = new DerOutputStream();
|
||||
DerOutputStream tmp = new DerOutputStream();
|
||||
encode(out, PKIXExtensions.CRLNumber_Id, true);
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ public class CertException extends SecurityException {
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return "[Certificate Exception: " + getMessage() + "]";
|
||||
return "[Certificate Exception: " + getMessage() + ']';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -168,6 +168,6 @@ public class CertException extends SecurityException {
|
||||
{
|
||||
return getVerfDescription()
|
||||
+ ( (moreData != null)
|
||||
? ( "\n (" + moreData + ")" ) : "" );
|
||||
? ( "\n (" + moreData + ')' ) : "" );
|
||||
}
|
||||
}
|
||||
|
@ -160,10 +160,12 @@ implements CertAttrSet<String> {
|
||||
if (certPolicies == null) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(super.toString());
|
||||
sb.append("CertificatePolicies [\n");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append("CertificatePolicies [\n");
|
||||
for (PolicyInformation info : certPolicies) {
|
||||
sb.append(info.toString());
|
||||
sb.append(info);
|
||||
}
|
||||
sb.append("]\n");
|
||||
return sb.toString();
|
||||
|
@ -134,8 +134,8 @@ public class CertificateValidity implements CertAttrSet<String> {
|
||||
public String toString() {
|
||||
if (notBefore == null || notAfter == null)
|
||||
return "";
|
||||
return ("Validity: [From: " + notBefore.toString() +
|
||||
",\n To: " + notAfter.toString() + "]");
|
||||
return "Validity: [From: " + notBefore +
|
||||
",\n To: " + notAfter + ']';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -380,23 +380,29 @@ public class DistributionPoint {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("DistributionPoint:\n ");
|
||||
if (fullName != null) {
|
||||
sb.append("DistributionPoint:\n " + fullName + "\n");
|
||||
sb.append(fullName);
|
||||
}
|
||||
if (relativeName != null) {
|
||||
sb.append("DistributionPoint:\n " + relativeName + "\n");
|
||||
sb.append(relativeName);
|
||||
}
|
||||
sb.append('\n');
|
||||
|
||||
if (reasonFlags != null) {
|
||||
sb.append(" ReasonFlags:\n");
|
||||
for (int i = 0; i < reasonFlags.length; i++) {
|
||||
if (reasonFlags[i]) {
|
||||
sb.append(" " + reasonToString(i) + "\n");
|
||||
sb.append(" ")
|
||||
.append(reasonToString(i))
|
||||
.append('\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (crlIssuer != null) {
|
||||
sb.append(" CRLIssuer:" + crlIssuer + "\n");
|
||||
sb.append(" CRLIssuer:")
|
||||
.append(crlIssuer)
|
||||
.append('\n');
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -230,13 +230,13 @@ public class DistributionPointName {
|
||||
*/
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("DistributionPointName:\n ");
|
||||
if (fullName != null) {
|
||||
sb.append("DistributionPointName:\n " + fullName + "\n");
|
||||
|
||||
sb.append(fullName);
|
||||
} else {
|
||||
sb.append("DistributionPointName:\n " + relativeName + "\n");
|
||||
sb.append(relativeName);
|
||||
}
|
||||
|
||||
sb.append('\n');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -209,10 +209,15 @@ public class EDIPartyName implements GeneralNameInterface {
|
||||
* Return the printable string.
|
||||
*/
|
||||
public String toString() {
|
||||
return ("EDIPartyName: " +
|
||||
((assigner == null) ? "" :
|
||||
(" nameAssigner = " + assigner + ","))
|
||||
+ " partyName = " + party);
|
||||
StringBuilder sb = new StringBuilder("EDIPartyName: ");
|
||||
if (assigner != null) {
|
||||
sb.append(" nameAssigner = ")
|
||||
.append(assigner)
|
||||
.append(',');
|
||||
}
|
||||
sb.append(" partyName = ")
|
||||
.append(party);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -219,13 +219,8 @@ public class Extension implements java.security.cert.Extension {
|
||||
* Returns the Extension in user readable form.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = "ObjectId: " + extensionId.toString();
|
||||
if (critical) {
|
||||
s += " Criticality=true\n";
|
||||
} else {
|
||||
s += " Criticality=false\n";
|
||||
}
|
||||
return (s);
|
||||
return "ObjectId: " + extensionId +
|
||||
" Criticality=" + critical + '\n';
|
||||
}
|
||||
|
||||
// Value to mix up the hash
|
||||
|
@ -127,15 +127,22 @@ public class GeneralSubtree {
|
||||
* Return a printable string of the GeneralSubtree.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = "\n GeneralSubtree: [\n" +
|
||||
" GeneralName: " + ((name == null) ? "" : name.toString()) +
|
||||
"\n Minimum: " + minimum;
|
||||
if (maximum == -1) {
|
||||
s += "\t Maximum: undefined";
|
||||
} else
|
||||
s += "\t Maximum: " + maximum;
|
||||
s += " ]\n";
|
||||
return (s);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("\n GeneralSubtree: [")
|
||||
.append("\n GeneralName: ");
|
||||
if (name != null) {
|
||||
sb.append(name);
|
||||
}
|
||||
sb.append("\n Minimum: ")
|
||||
.append(minimum)
|
||||
.append("\n Maximum: ");
|
||||
if (maximum == -1) {
|
||||
sb.append("undefined");
|
||||
} else {
|
||||
sb.append(maximum);
|
||||
}
|
||||
sb.append(" ]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,8 +124,7 @@ public class GeneralSubtrees implements Cloneable {
|
||||
* Return a printable string of the GeneralSubtree.
|
||||
*/
|
||||
public String toString() {
|
||||
String s = " GeneralSubtrees:\n" + trees.toString() + "\n";
|
||||
return s;
|
||||
return " GeneralSubtrees:\n" + trees + '\n';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -263,7 +263,7 @@ public class IPAddressName implements GeneralNameInterface {
|
||||
if (address.length == 8) {
|
||||
byte[] mask = new byte[4];
|
||||
System.arraycopy(address, 4, mask, 0, 4);
|
||||
name = name + "/" +
|
||||
name = name + '/' +
|
||||
InetAddress.getByAddress(mask).getHostAddress();
|
||||
}
|
||||
} else {
|
||||
@ -285,7 +285,7 @@ public class IPAddressName implements GeneralNameInterface {
|
||||
if (!ba.get(i))
|
||||
break;
|
||||
}
|
||||
name = name + "/" + i;
|
||||
name = name + '/' + i;
|
||||
// Verify remaining bits 0
|
||||
for (; i < 16*8; i++) {
|
||||
if (ba.get(i)) {
|
||||
|
@ -140,17 +140,20 @@ extends Extension implements CertAttrSet<String> {
|
||||
* Returns a printable representation of the IssuerAlternativeName.
|
||||
*/
|
||||
public String toString() {
|
||||
|
||||
String result = super.toString() + "IssuerAlternativeName [\n";
|
||||
if(names == null) {
|
||||
result += " null\n";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append("IssuerAlternativeName [\n");
|
||||
if (names == null) {
|
||||
sb.append(" null\n");
|
||||
} else {
|
||||
for(GeneralName name: names.names()) {
|
||||
result += " "+name+"\n";
|
||||
for (GeneralName name : names.names()) {
|
||||
sb.append(" ")
|
||||
.append(name)
|
||||
.append('\n');
|
||||
}
|
||||
}
|
||||
result += "]\n";
|
||||
return result;
|
||||
sb.append("]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -441,9 +441,9 @@ public class IssuingDistributionPointExtension extends Extension
|
||||
* Returns the extension as user readable string.
|
||||
*/
|
||||
public String toString() {
|
||||
|
||||
StringBuilder sb = new StringBuilder(super.toString());
|
||||
sb.append("IssuingDistributionPoint [\n ");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append("IssuingDistributionPoint [\n ");
|
||||
|
||||
if (distributionPoint != null) {
|
||||
sb.append(distributionPoint);
|
||||
@ -453,23 +453,18 @@ public class IssuingDistributionPointExtension extends Extension
|
||||
sb.append(revocationReasons);
|
||||
}
|
||||
|
||||
sb.append((hasOnlyUserCerts)
|
||||
? (" Only contains user certs: true")
|
||||
: (" Only contains user certs: false")).append("\n");
|
||||
|
||||
sb.append((hasOnlyCACerts)
|
||||
? (" Only contains CA certs: true")
|
||||
: (" Only contains CA certs: false")).append("\n");
|
||||
|
||||
sb.append((hasOnlyAttributeCerts)
|
||||
? (" Only contains attribute certs: true")
|
||||
: (" Only contains attribute certs: false")).append("\n");
|
||||
|
||||
sb.append((isIndirectCRL)
|
||||
? (" Indirect CRL: true")
|
||||
: (" Indirect CRL: false")).append("\n");
|
||||
|
||||
sb.append("]\n");
|
||||
sb.append(" Only contains user certs: ")
|
||||
.append(hasOnlyUserCerts)
|
||||
.append('\n')
|
||||
.append(" Only contains CA certs: ")
|
||||
.append(hasOnlyCACerts)
|
||||
.append('\n')
|
||||
.append(" Only contains attribute certs: ")
|
||||
.append(hasOnlyAttributeCerts)
|
||||
.append('\n')
|
||||
.append(" Indirect CRL: ")
|
||||
.append(isIndirectCRL)
|
||||
.append("\n]\n");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -214,12 +214,19 @@ implements CertAttrSet<String>, Cloneable {
|
||||
* Return the printable string.
|
||||
*/
|
||||
public String toString() {
|
||||
return (super.toString() + "NameConstraints: [" +
|
||||
((permitted == null) ? "" :
|
||||
("\n Permitted:" + permitted.toString())) +
|
||||
((excluded == null) ? "" :
|
||||
("\n Excluded:" + excluded.toString()))
|
||||
+ " ]\n");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString())
|
||||
.append("NameConstraints: [");
|
||||
if (permitted != null) {
|
||||
sb.append("\n Permitted:")
|
||||
.append(permitted);
|
||||
}
|
||||
if (excluded != null) {
|
||||
sb.append("\n Excluded:")
|
||||
.append(excluded);
|
||||
}
|
||||
sb.append(" ]\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user