Merge "Canonicalize additional Android-changed comments."
diff --git a/ojluni/src/main/java/javax/crypto/JceSecurity.java b/ojluni/src/main/java/javax/crypto/JceSecurity.java
index 72a6c31..073d827 100644
--- a/ojluni/src/main/java/javax/crypto/JceSecurity.java
+++ b/ojluni/src/main/java/javax/crypto/JceSecurity.java
@@ -73,7 +73,8 @@
private JceSecurity() {
}
- /* BEGIN Android-changed
+ // BEGIN Android-changed
+ /*
static {
try {
AccessController.doPrivileged(
@@ -91,7 +92,8 @@
"Can not initialize cryptographic mechanism", e);
}
}
- END Android-changed */
+ */
+ // END Android-changed
static Instance getInstance(String type, Class<?> clazz, String algorithm,
String provider) throws NoSuchAlgorithmException,
@@ -199,9 +201,8 @@
// return whether this provider is properly signed and can be used by JCE
static boolean canUseProvider(Provider p) {
- /* BEGIN Android-changed
- return getVerificationResult(p) == null;
- */
+ // BEGIN Android-changed
+ // return getVerificationResult(p) == null;
return true;
// END Android-changed
}
diff --git a/ojluni/src/main/java/sun/net/util/IPAddressUtil.java b/ojluni/src/main/java/sun/net/util/IPAddressUtil.java
index e43e386..7ca0f12 100644
--- a/ojluni/src/main/java/sun/net/util/IPAddressUtil.java
+++ b/ojluni/src/main/java/sun/net/util/IPAddressUtil.java
@@ -48,7 +48,8 @@
long val;
try {
switch(s.length) {
- /* BEGIN Android-changed
+ // BEGIN Android-removed
+ /*
case 1:
// When only one part is given, the value is stored directly in
// the network address without any byte rearrangement.
@@ -97,7 +98,9 @@
return null;
res[2] = (byte) ((val >> 8) & 0xff);
res[3] = (byte) (val & 0xff);
- break; */
+ break;
+ */
+ // END Android-removed
case 4:
/*
* When four parts are specified, each is interpreted as a
diff --git a/ojluni/src/main/java/sun/nio/ch/FileChannelImpl.java b/ojluni/src/main/java/sun/nio/ch/FileChannelImpl.java
index 2b5615d..de78c68 100644
--- a/ojluni/src/main/java/sun/nio/ch/FileChannelImpl.java
+++ b/ojluni/src/main/java/sun/nio/ch/FileChannelImpl.java
@@ -929,12 +929,14 @@
return null;
if (filesize < position + size) { // Extend file size
- /* BEGIN Android-changed
+ // BEGIN Android-changed
+ /*
if (!writable) {
throw new IOException("Channel not open for writing " +
"- cannot extend file to required size");
}
- END Android-changed */
+ */
+ // END Android-changed
int rv = 0;
do {
// BEGIN Android-changed
diff --git a/ojluni/src/main/java/sun/reflect/Reflection.java b/ojluni/src/main/java/sun/reflect/Reflection.java
index f866d3e..a3fa56d 100644
--- a/ojluni/src/main/java/sun/reflect/Reflection.java
+++ b/ojluni/src/main/java/sun/reflect/Reflection.java
@@ -75,10 +75,9 @@
return true;
}
- /* BEGIN Android-changed
- if (!Modifier.isPublic(getClassAccessFlags(memberClass))) {*/
+ // Android-changed
+ // if (!Modifier.isPublic(getClassAccessFlags(memberClass))) {
if (!Modifier.isPublic(memberClass.getAccessFlags())) {
- // END Android-changed
isSameClassPackage = isSameClassPackage(currentClass, memberClass);
gotIsSameClassPackage = true;
if (!isSameClassPackage) {
diff --git a/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java b/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java
index 20d7495..b78fdf9 100644
--- a/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java
+++ b/ojluni/src/main/java/sun/security/pkcs/SignerInfo.java
@@ -64,9 +64,8 @@
byte[] encryptedDigest;
Timestamp timestamp;
private boolean hasTimestamp = true;
- /* BEGIN Android-removed
- private static final Debug debug = Debug.getInstance("jar");
- * END Android-removed */
+ // Android-removed
+ // private static final Debug debug = Debug.getInstance("jar");
PKCS9Attributes authenticatedAttributes;
PKCS9Attributes unauthenticatedAttributes;
@@ -562,14 +561,16 @@
" is inapplicable");
}
- /* BEGIN Android-removed
+ // BEGIN Android-removed
+ /*
if (debug != null) {
debug.println();
debug.println("Detected signature timestamp (#" +
token.getSerialNumber() + ") generated on " + token.getDate());
debug.println();
}
- * END Android-removed */
+ */
+ // END Android-removed
}
public String toString() {
diff --git a/ojluni/src/main/java/sun/security/provider/X509Factory.java b/ojluni/src/main/java/sun/security/provider/X509Factory.java
index f894f89..4fa6ec2 100644
--- a/ojluni/src/main/java/sun/security/provider/X509Factory.java
+++ b/ojluni/src/main/java/sun/security/provider/X509Factory.java
@@ -25,24 +25,10 @@
package sun.security.provider;
-/* BEGIN Android-removed
-import java.io.*;
-import java.util.*;
- * END Android-removed */
import java.security.cert.*;
import sun.security.x509.X509CertImpl;
import sun.security.x509.X509CRLImpl;
-/* BEGIN Android-removed
-import sun.security.pkcs.PKCS7;
-import sun.security.provider.certpath.X509CertPath;
-import sun.security.provider.certpath.X509CertificatePair;
-import sun.security.util.DerValue;
- * END Android-removed */
import sun.security.util.Cache;
-/* BEGIN Android-removed
-import java.util.Base64;
-import sun.security.pkcs.ParsingException;
- * END Android-removed */
/**
* This class defines a certificate factory for X.509 v3 certificates &
@@ -63,15 +49,14 @@
* @see sun.security.x509.X509CRLImpl
*/
-// BEGIN Android-changed
-// Was: public class X509Factory extends CertificateFactorySpi {
+// Android-changed
+// public class X509Factory extends CertificateFactorySpi {
public class X509Factory {
-// END Android-changed
- /* BEGIN Android-removed
- public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----";
- public static final String END_CERT = "-----END CERTIFICATE-----";
- * END Android-removed */
+ // BEGIN Android-removed
+ // public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----";
+ // public static final String END_CERT = "-----END CERTIFICATE-----";
+ // END Android-removed
private static final int ENC_MAX_LENGTH = 4096 * 1024; // 4 MB MAX
@@ -80,7 +65,8 @@
private static final Cache<Object, X509CRLImpl> crlCache
= Cache.newSoftMemoryCache(750);
- /* BEGIN Android-removed
+ // BEGIN Android-removed
+ /*
/**
* Generates an X.509 certificate object and initializes it with
* the data read from the input stream <code>is</code>.
@@ -140,7 +126,8 @@
}
return read;
}
- * END Android-removed */
+ */
+ // END Android-removed
/**
* Return an interned X509CertImpl for the given certificate.
@@ -244,7 +231,8 @@
cache.put(key, value);
}
- /* BEGIN Android-removed
+ // BEGIN Android-removed
+ /*
/**
* Generates a <code>CertPath</code> object and initializes it with
* the data read from the <code>InputStream</code> inStream. The data
@@ -767,5 +755,6 @@
}
return tag;
}
- * END Android-removed */
+ */
+ // END Android-removed
}
diff --git a/ojluni/src/main/java/sun/security/provider/certpath/ForwardBuilder.java b/ojluni/src/main/java/sun/security/provider/certpath/ForwardBuilder.java
index 8f2a929..ae3e628 100644
--- a/ojluni/src/main/java/sun/security/provider/certpath/ForwardBuilder.java
+++ b/ojluni/src/main/java/sun/security/provider/certpath/ForwardBuilder.java
@@ -666,12 +666,11 @@
ForwardState currState = (ForwardState)currentState;
- /**
- * BEGIN Android-removed: this mechanism for checking untrusted certificates is not used in
- * Android.
- // Don't bother to verify untrusted certificate more.
- currState.untrustedChecker.check(cert, Collections.<String>emptySet());
- * END Android-removed */
+ // BEGIN Android-removed: Certificate checking
+ // Android doesn't use this mechanism for checking untrusted certificates.
+ // // Don't bother to verify untrusted certificate more.
+ // currState.untrustedChecker.check(cert, Collections.<String>emptySet());
+ // END Android-removed: Certificate checking
/*
* check for looping - abort a loop if we encounter the same
diff --git a/ojluni/src/main/java/sun/security/provider/certpath/ForwardState.java b/ojluni/src/main/java/sun/security/provider/certpath/ForwardState.java
index 09b9699..bdc437c 100644
--- a/ojluni/src/main/java/sun/security/provider/certpath/ForwardState.java
+++ b/ojluni/src/main/java/sun/security/provider/certpath/ForwardState.java
@@ -75,11 +75,8 @@
/* the untrusted certificates checker */
- /**
- * BEGIN Android-removed: this mechanism for checking untrusted certificates is not used in
- * Android.
- UntrustedChecker untrustedChecker;
- * END ANDROID_REMOVED */
+ // Android-removed: Android doesn't use this mechanism for checking untrusted certificates.
+ // UntrustedChecker untrustedChecker;
/* The list of user-defined checkers that support forward checking */
ArrayList<PKIXCertPathChecker> forwardCheckers;
diff --git a/ojluni/src/main/java/sun/security/provider/certpath/PKIXCertPathValidator.java b/ojluni/src/main/java/sun/security/provider/certpath/PKIXCertPathValidator.java
index 550785e..f8dfff1 100644
--- a/ojluni/src/main/java/sun/security/provider/certpath/PKIXCertPathValidator.java
+++ b/ojluni/src/main/java/sun/security/provider/certpath/PKIXCertPathValidator.java
@@ -167,11 +167,8 @@
// create PKIXCertPathCheckers
List<PKIXCertPathChecker> certPathCheckers = new ArrayList<>();
// add standard checkers that we will be using
- /**
- * BEGIN Android-removed: this mechanism for checking untrusted certificates is not used in
- * Android.
- certPathCheckers.add(new UntrustedChecker());
- * END Android-removed */
+ // Android-removed: Android doesn't use this mechanism for checking untrusted certificates.
+ // certPathCheckers.add(new UntrustedChecker());
certPathCheckers.add(new AlgorithmChecker(anchor));
certPathCheckers.add(new KeyChecker(certPathLen,
params.targetCertConstraints()));
diff --git a/ojluni/src/main/java/sun/security/provider/certpath/ReverseBuilder.java b/ojluni/src/main/java/sun/security/provider/certpath/ReverseBuilder.java
index 78e8db6..1815a22 100644
--- a/ojluni/src/main/java/sun/security/provider/certpath/ReverseBuilder.java
+++ b/ojluni/src/main/java/sun/security/provider/certpath/ReverseBuilder.java
@@ -356,13 +356,11 @@
return;
}
- /**
- * BEGIN Android-removed: this mechanism for checking untrusted certificates is not used in
- * Android.
- // Don't bother to verify untrusted certificate more.
- currentState.untrustedChecker.check(cert,
- Collections.<String>emptySet());
- * END Android-removed */
+ // BEGIN Android-removed: Android doesn't use this mechanism for checking untrusted certificates.
+ // // Don't bother to verify untrusted certificate more.
+ // currentState.untrustedChecker.check(cert,
+ // Collections.<String>emptySet());
+ // END Android-removed: Android doesn't use this mechanism for checking untrusted certificates.
/*
* check for looping - abort a loop if
diff --git a/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java b/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java
index 7ffd924..a9944af 100644
--- a/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java
+++ b/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java
@@ -101,11 +101,8 @@
AlgorithmChecker algorithmChecker;
/* the untrusted certificates checker */
- /**
- * BEGIN Android-removed: this mechanism for checking untrusted certificates is not used in
- * Android.
- UntrustedChecker untrustedChecker;
- * END Android-removed */
+ // Android-removed: Android doesn't use this mechanism for checking untrusted certificates.
+ // UntrustedChecker untrustedChecker;
/* the trust anchor used to validate the path */
TrustAnchor trustAnchor;