提交 d50c3829 编写于 作者: M mfang

Merge

...@@ -319,3 +319,4 @@ c67acfb24eed87629887128df51007218ddf1f60 jdk8u40-b03 ...@@ -319,3 +319,4 @@ c67acfb24eed87629887128df51007218ddf1f60 jdk8u40-b03
dde62d949f7847469b2ede2ca4190c95066adc91 jdk8u40-b04 dde62d949f7847469b2ede2ca4190c95066adc91 jdk8u40-b04
d587834579dadd18cb8b096e61d92e2dbccc2782 jdk8u40-b05 d587834579dadd18cb8b096e61d92e2dbccc2782 jdk8u40-b05
25788892a6723c0742a24050cc25ab103d9804de jdk8u40-b06 25788892a6723c0742a24050cc25ab103d9804de jdk8u40-b06
07f0e22b5c238dd7b89fedbed35f02ac6b392c96 jdk8u40-b07
...@@ -37,6 +37,7 @@ import java.security.cert.CertificateException; ...@@ -37,6 +37,7 @@ import java.security.cert.CertificateException;
* @author Vincent Ryan * @author Vincent Ryan
*/ */
@jdk.Exported
public abstract class ContentSigner { public abstract class ContentSigner {
/** /**
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This package comprises the interfaces and classes used to define the
* signing mechanism used by the <tt>jarsigner</tt> tool.
* <p>
* Clients may override the default signing mechanism of the <tt>jarsigner</tt>
* tool by supplying an alternative implementation of
* {@link com.sun.jarsigner.ContentSigner}.
*/
@jdk.Exported
package com.sun.jarsigner;
<html>
<!--
Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<head>
<title>Jarsigner Signing Mechanism Package</title>
</head>
<body>
This package comprises the interfaces and classes used to define the
signing mechanism used by the <tt>jarsigner</tt> tool.
<p>
Clients may override the default signing mechanism of the <tt>jarsigner</tt>
tool by supplying an alternative implementation of
{@link com.sun.jarsigner.ContentSigner}.
</body>
</html>
...@@ -62,7 +62,7 @@ class InvokerBytecodeGenerator { ...@@ -62,7 +62,7 @@ class InvokerBytecodeGenerator {
private static final String CLL_SIG = "(L" + CLS + ";L" + OBJ + ";)L" + OBJ + ";"; private static final String CLL_SIG = "(L" + CLS + ";L" + OBJ + ";)L" + OBJ + ";";
/** Name of its super class*/ /** Name of its super class*/
private static final String superName = LF; private static final String superName = OBJ;
/** Name of new class */ /** Name of new class */
private final String className; private final String className;
...@@ -97,7 +97,7 @@ class InvokerBytecodeGenerator { ...@@ -97,7 +97,7 @@ class InvokerBytecodeGenerator {
if (DUMP_CLASS_FILES) { if (DUMP_CLASS_FILES) {
className = makeDumpableClassName(className); className = makeDumpableClassName(className);
} }
this.className = superName + "$" + className; this.className = LF + "$" + className;
this.sourceFile = "LambdaForm$" + className; this.sourceFile = "LambdaForm$" + className;
this.lambdaForm = lambdaForm; this.lambdaForm = lambdaForm;
this.invokerName = invokerName; this.invokerName = invokerName;
......
...@@ -354,10 +354,11 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { ...@@ -354,10 +354,11 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
* @exception NullPointerException if {@code name} is {@code null}. * @exception NullPointerException if {@code name} is {@code null}.
*/ */
protected Class<?> findClass(final String name) protected Class<?> findClass(final String name)
throws ClassNotFoundException throws ClassNotFoundException
{ {
final Class<?> result;
try { try {
return AccessController.doPrivileged( result = AccessController.doPrivileged(
new PrivilegedExceptionAction<Class<?>>() { new PrivilegedExceptionAction<Class<?>>() {
public Class<?> run() throws ClassNotFoundException { public Class<?> run() throws ClassNotFoundException {
String path = name.replace('.', '/').concat(".class"); String path = name.replace('.', '/').concat(".class");
...@@ -369,13 +370,17 @@ public class URLClassLoader extends SecureClassLoader implements Closeable { ...@@ -369,13 +370,17 @@ public class URLClassLoader extends SecureClassLoader implements Closeable {
throw new ClassNotFoundException(name, e); throw new ClassNotFoundException(name, e);
} }
} else { } else {
throw new ClassNotFoundException(name); return null;
} }
} }
}, acc); }, acc);
} catch (java.security.PrivilegedActionException pae) { } catch (java.security.PrivilegedActionException pae) {
throw (ClassNotFoundException) pae.getException(); throw (ClassNotFoundException) pae.getException();
} }
if (result == null) {
throw new ClassNotFoundException(name);
}
return result;
} }
/* /*
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ import java.security.Provider.Service; ...@@ -33,6 +33,7 @@ import java.security.Provider.Service;
import sun.security.jca.*; import sun.security.jca.*;
import sun.security.jca.GetInstance.Instance; import sun.security.jca.GetInstance.Instance;
import sun.security.util.Debug;
/** /**
* The KeyPairGenerator class is used to generate pairs of * The KeyPairGenerator class is used to generate pairs of
...@@ -126,6 +127,11 @@ import sun.security.jca.GetInstance.Instance; ...@@ -126,6 +127,11 @@ import sun.security.jca.GetInstance.Instance;
public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("keypairgenerator");
private final String algorithm; private final String algorithm;
// The provider // The provider
...@@ -167,6 +173,12 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { ...@@ -167,6 +173,12 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
kpg = new Delegate(spi, algorithm); kpg = new Delegate(spi, algorithm);
} }
kpg.provider = instance.provider; kpg.provider = instance.provider;
if (!skipDebug && pdebug != null) {
pdebug.println("KeyPairGenerator." + algorithm +
" algorithm from: " + kpg.provider.getName());
}
return kpg; return kpg;
} }
...@@ -557,6 +569,11 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi { ...@@ -557,6 +569,11 @@ public abstract class KeyPairGenerator extends KeyPairGeneratorSpi {
provider = instance.provider; provider = instance.provider;
this.serviceIterator = serviceIterator; this.serviceIterator = serviceIterator;
initType = I_NONE; initType = I_NONE;
if (!skipDebug && pdebug != null) {
pdebug.println("KeyPairGenerator." + algorithm +
" algorithm from: " + provider.getName());
}
} }
/** /**
......
...@@ -37,6 +37,8 @@ import javax.crypto.SecretKey; ...@@ -37,6 +37,8 @@ import javax.crypto.SecretKey;
import javax.security.auth.DestroyFailedException; import javax.security.auth.DestroyFailedException;
import javax.security.auth.callback.*; import javax.security.auth.callback.*;
import sun.security.util.Debug;
/** /**
* This class represents a storage facility for cryptographic * This class represents a storage facility for cryptographic
* keys and certificates. * keys and certificates.
...@@ -177,6 +179,11 @@ import javax.security.auth.callback.*; ...@@ -177,6 +179,11 @@ import javax.security.auth.callback.*;
public class KeyStore { public class KeyStore {
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("keystore");
/* /*
* Constant to lookup in the Security properties file to determine * Constant to lookup in the Security properties file to determine
* the default keystore type. * the default keystore type.
...@@ -801,6 +808,11 @@ public class KeyStore { ...@@ -801,6 +808,11 @@ public class KeyStore {
this.keyStoreSpi = keyStoreSpi; this.keyStoreSpi = keyStoreSpi;
this.provider = provider; this.provider = provider;
this.type = type; this.type = type;
if (!skipDebug && pdebug != null) {
pdebug.println("KeyStore." + type.toUpperCase() + " type from: " +
this.provider.getName());
}
} }
/** /**
......
...@@ -35,6 +35,8 @@ import java.io.ByteArrayInputStream; ...@@ -35,6 +35,8 @@ import java.io.ByteArrayInputStream;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import sun.security.util.Debug;
/** /**
* This MessageDigest class provides applications the functionality of a * This MessageDigest class provides applications the functionality of a
* message digest algorithm, such as SHA-1 or SHA-256. * message digest algorithm, such as SHA-1 or SHA-256.
...@@ -103,6 +105,11 @@ import java.nio.ByteBuffer; ...@@ -103,6 +105,11 @@ import java.nio.ByteBuffer;
public abstract class MessageDigest extends MessageDigestSpi { public abstract class MessageDigest extends MessageDigestSpi {
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("messagedigest");
private String algorithm; private String algorithm;
// The state of this digest // The state of this digest
...@@ -156,18 +163,23 @@ public abstract class MessageDigest extends MessageDigestSpi { ...@@ -156,18 +163,23 @@ public abstract class MessageDigest extends MessageDigestSpi {
public static MessageDigest getInstance(String algorithm) public static MessageDigest getInstance(String algorithm)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
try { try {
MessageDigest md;
Object[] objs = Security.getImpl(algorithm, "MessageDigest", Object[] objs = Security.getImpl(algorithm, "MessageDigest",
(String)null); (String)null);
if (objs[0] instanceof MessageDigest) { if (objs[0] instanceof MessageDigest) {
MessageDigest md = (MessageDigest)objs[0]; md = (MessageDigest)objs[0];
md.provider = (Provider)objs[1];
return md;
} else { } else {
MessageDigest delegate = md = new Delegate((MessageDigestSpi)objs[0], algorithm);
new Delegate((MessageDigestSpi)objs[0], algorithm); }
delegate.provider = (Provider)objs[1]; md.provider = (Provider)objs[1];
return delegate;
if (!skipDebug && pdebug != null) {
pdebug.println("MessageDigest." + algorithm +
" algorithm from: " + md.provider.getName());
} }
return md;
} catch(NoSuchProviderException e) { } catch(NoSuchProviderException e) {
throw new NoSuchAlgorithmException(algorithm + " not found"); throw new NoSuchAlgorithmException(algorithm + " not found");
} }
......
...@@ -32,6 +32,7 @@ import java.security.Provider.Service; ...@@ -32,6 +32,7 @@ import java.security.Provider.Service;
import sun.security.jca.*; import sun.security.jca.*;
import sun.security.jca.GetInstance.Instance; import sun.security.jca.GetInstance.Instance;
import sun.security.util.Debug;
/** /**
* This class provides a cryptographically strong random number * This class provides a cryptographically strong random number
...@@ -92,6 +93,11 @@ import sun.security.jca.GetInstance.Instance; ...@@ -92,6 +93,11 @@ import sun.security.jca.GetInstance.Instance;
public class SecureRandom extends java.util.Random { public class SecureRandom extends java.util.Random {
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("securerandom");
/** /**
* The provider. * The provider.
* *
...@@ -234,6 +240,11 @@ public class SecureRandom extends java.util.Random { ...@@ -234,6 +240,11 @@ public class SecureRandom extends java.util.Random {
this.secureRandomSpi = secureRandomSpi; this.secureRandomSpi = secureRandomSpi;
this.provider = provider; this.provider = provider;
this.algorithm = algorithm; this.algorithm = algorithm;
if (!skipDebug && pdebug != null) {
pdebug.println("SecureRandom." + algorithm +
" algorithm from: " + this.provider.getName());
}
} }
/** /**
......
/* /*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -121,6 +121,11 @@ public abstract class Signature extends SignatureSpi { ...@@ -121,6 +121,11 @@ public abstract class Signature extends SignatureSpi {
private static final Debug debug = private static final Debug debug =
Debug.getInstance("jca", "Signature"); Debug.getInstance("jca", "Signature");
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("signature");
/* /*
* The algorithm for this signature object. * The algorithm for this signature object.
* This value is used to map an OID to the particular algorithm. * This value is used to map an OID to the particular algorithm.
...@@ -451,6 +456,11 @@ public abstract class Signature extends SignatureSpi { ...@@ -451,6 +456,11 @@ public abstract class Signature extends SignatureSpi {
throws InvalidKeyException { throws InvalidKeyException {
engineInitVerify(publicKey); engineInitVerify(publicKey);
state = VERIFY; state = VERIFY;
if (!skipDebug && pdebug != null) {
pdebug.println("Signature." + algorithm +
" verification algorithm from: " + this.provider.getName());
}
} }
/** /**
...@@ -495,6 +505,11 @@ public abstract class Signature extends SignatureSpi { ...@@ -495,6 +505,11 @@ public abstract class Signature extends SignatureSpi {
PublicKey publicKey = certificate.getPublicKey(); PublicKey publicKey = certificate.getPublicKey();
engineInitVerify(publicKey); engineInitVerify(publicKey);
state = VERIFY; state = VERIFY;
if (!skipDebug && pdebug != null) {
pdebug.println("Signature." + algorithm +
" verification algorithm from: " + this.provider.getName());
}
} }
/** /**
...@@ -511,6 +526,11 @@ public abstract class Signature extends SignatureSpi { ...@@ -511,6 +526,11 @@ public abstract class Signature extends SignatureSpi {
throws InvalidKeyException { throws InvalidKeyException {
engineInitSign(privateKey); engineInitSign(privateKey);
state = SIGN; state = SIGN;
if (!skipDebug && pdebug != null) {
pdebug.println("Signature." + algorithm +
" signing algorithm from: " + this.provider.getName());
}
} }
/** /**
...@@ -529,6 +549,11 @@ public abstract class Signature extends SignatureSpi { ...@@ -529,6 +549,11 @@ public abstract class Signature extends SignatureSpi {
throws InvalidKeyException { throws InvalidKeyException {
engineInitSign(privateKey, random); engineInitSign(privateKey, random);
state = SIGN; state = SIGN;
if (!skipDebug && pdebug != null) {
pdebug.println("Signature." + algorithm +
" signing algorithm from: " + this.provider.getName());
}
} }
/** /**
......
...@@ -297,15 +297,22 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -297,15 +297,22 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
} }
/** /**
* Tries to set SIGNAL status unless already completed. Used by * If not done, sets SIGNAL status and performs Object.wait(timeout).
* ForkJoinPool. Other variants are directly incorporated into * This task may or may not be done on exit. Ignores interrupts.
* externalAwaitDone etc.
* *
* @return true if successful * @param timeout using Object.wait conventions.
*/ */
final boolean trySetSignal() { final void internalWait(long timeout) {
int s = status; int s;
return s >= 0 && U.compareAndSwapInt(this, STATUS, s, s | SIGNAL); if ((s = status) >= 0 && // force completer to issue notify
U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) {
synchronized (this) {
if (status >= 0)
try { wait(timeout); } catch (InterruptedException ie) { }
else
notifyAll();
}
}
} }
/** /**
...@@ -313,35 +320,29 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -313,35 +320,29 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
* @return status upon completion * @return status upon completion
*/ */
private int externalAwaitDone() { private int externalAwaitDone() {
int s; int s = ((this instanceof CountedCompleter) ? // try helping
ForkJoinPool cp = ForkJoinPool.common; ForkJoinPool.common.externalHelpComplete(
if ((s = status) >= 0) { (CountedCompleter<?>)this, 0) :
if (cp != null) { ForkJoinPool.common.tryExternalUnpush(this) ? doExec() : 0);
if (this instanceof CountedCompleter) if (s >= 0 && (s = status) >= 0) {
s = cp.externalHelpComplete((CountedCompleter<?>)this, Integer.MAX_VALUE); boolean interrupted = false;
else if (cp.tryExternalUnpush(this)) do {
s = doExec(); if (U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) {
} synchronized (this) {
if (s >= 0 && (s = status) >= 0) { if (status >= 0) {
boolean interrupted = false; try {
do { wait(0L);
if (U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) { } catch (InterruptedException ie) {
synchronized (this) { interrupted = true;
if (status >= 0) {
try {
wait();
} catch (InterruptedException ie) {
interrupted = true;
}
} }
else
notifyAll();
} }
else
notifyAll();
} }
} while ((s = status) >= 0); }
if (interrupted) } while ((s = status) >= 0);
Thread.currentThread().interrupt(); if (interrupted)
} Thread.currentThread().interrupt();
} }
return s; return s;
} }
...@@ -351,22 +352,22 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -351,22 +352,22 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
*/ */
private int externalInterruptibleAwaitDone() throws InterruptedException { private int externalInterruptibleAwaitDone() throws InterruptedException {
int s; int s;
ForkJoinPool cp = ForkJoinPool.common;
if (Thread.interrupted()) if (Thread.interrupted())
throw new InterruptedException(); throw new InterruptedException();
if ((s = status) >= 0 && cp != null) { if ((s = status) >= 0 &&
if (this instanceof CountedCompleter) (s = ((this instanceof CountedCompleter) ?
cp.externalHelpComplete((CountedCompleter<?>)this, Integer.MAX_VALUE); ForkJoinPool.common.externalHelpComplete(
else if (cp.tryExternalUnpush(this)) (CountedCompleter<?>)this, 0) :
doExec(); ForkJoinPool.common.tryExternalUnpush(this) ? doExec() :
} 0)) >= 0) {
while ((s = status) >= 0) { while ((s = status) >= 0) {
if (U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) { if (U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) {
synchronized (this) { synchronized (this) {
if (status >= 0) if (status >= 0)
wait(); wait(0L);
else else
notifyAll(); notifyAll();
}
} }
} }
} }
...@@ -386,7 +387,7 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -386,7 +387,7 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ? ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ?
(w = (wt = (ForkJoinWorkerThread)t).workQueue). (w = (wt = (ForkJoinWorkerThread)t).workQueue).
tryUnpush(this) && (s = doExec()) < 0 ? s : tryUnpush(this) && (s = doExec()) < 0 ? s :
wt.pool.awaitJoin(w, this) : wt.pool.awaitJoin(w, this, 0L) :
externalAwaitDone(); externalAwaitDone();
} }
...@@ -399,7 +400,8 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -399,7 +400,8 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
int s; Thread t; ForkJoinWorkerThread wt; int s; Thread t; ForkJoinWorkerThread wt;
return (s = doExec()) < 0 ? s : return (s = doExec()) < 0 ? s :
((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ? ((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) ?
(wt = (ForkJoinWorkerThread)t).pool.awaitJoin(wt.workQueue, this) : (wt = (ForkJoinWorkerThread)t).pool.
awaitJoin(wt.workQueue, this, 0L) :
externalAwaitDone(); externalAwaitDone();
} }
...@@ -577,7 +579,7 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -577,7 +579,7 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
Throwable ex; Throwable ex;
if (e == null || (ex = e.ex) == null) if (e == null || (ex = e.ex) == null)
return null; return null;
if (false && e.thrower != Thread.currentThread().getId()) { if (e.thrower != Thread.currentThread().getId()) {
Class<? extends Throwable> ec = ex.getClass(); Class<? extends Throwable> ec = ex.getClass();
try { try {
Constructor<?> noArgCtor = null; Constructor<?> noArgCtor = null;
...@@ -587,13 +589,17 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -587,13 +589,17 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
Class<?>[] ps = c.getParameterTypes(); Class<?>[] ps = c.getParameterTypes();
if (ps.length == 0) if (ps.length == 0)
noArgCtor = c; noArgCtor = c;
else if (ps.length == 1 && ps[0] == Throwable.class) else if (ps.length == 1 && ps[0] == Throwable.class) {
return (Throwable)(c.newInstance(ex)); Throwable wx = (Throwable)c.newInstance(ex);
return (wx == null) ? ex : wx;
}
} }
if (noArgCtor != null) { if (noArgCtor != null) {
Throwable wx = (Throwable)(noArgCtor.newInstance()); Throwable wx = (Throwable)(noArgCtor.newInstance());
wx.initCause(ex); if (wx != null) {
return wx; wx.initCause(ex);
return wx;
}
} }
} catch (Exception ignore) { } catch (Exception ignore) {
} }
...@@ -1017,67 +1023,40 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable { ...@@ -1017,67 +1023,40 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
*/ */
public final V get(long timeout, TimeUnit unit) public final V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException { throws InterruptedException, ExecutionException, TimeoutException {
int s;
long nanos = unit.toNanos(timeout);
if (Thread.interrupted()) if (Thread.interrupted())
throw new InterruptedException(); throw new InterruptedException();
// Messy in part because we measure in nanosecs, but wait in millisecs if ((s = status) >= 0 && nanos > 0L) {
int s; long ms; long d = System.nanoTime() + nanos;
long ns = unit.toNanos(timeout); long deadline = (d == 0L) ? 1L : d; // avoid 0
ForkJoinPool cp;
if ((s = status) >= 0 && ns > 0L) {
long deadline = System.nanoTime() + ns;
ForkJoinPool p = null;
ForkJoinPool.WorkQueue w = null;
Thread t = Thread.currentThread(); Thread t = Thread.currentThread();
if (t instanceof ForkJoinWorkerThread) { if (t instanceof ForkJoinWorkerThread) {
ForkJoinWorkerThread wt = (ForkJoinWorkerThread)t; ForkJoinWorkerThread wt = (ForkJoinWorkerThread)t;
p = wt.pool; s = wt.pool.awaitJoin(wt.workQueue, this, deadline);
w = wt.workQueue;
p.helpJoinOnce(w, this); // no retries on failure
}
else if ((cp = ForkJoinPool.common) != null) {
if (this instanceof CountedCompleter)
cp.externalHelpComplete((CountedCompleter<?>)this, Integer.MAX_VALUE);
else if (cp.tryExternalUnpush(this))
doExec();
} }
boolean canBlock = false; else if ((s = ((this instanceof CountedCompleter) ?
boolean interrupted = false; ForkJoinPool.common.externalHelpComplete(
try { (CountedCompleter<?>)this, 0) :
while ((s = status) >= 0) { ForkJoinPool.common.tryExternalUnpush(this) ?
if (w != null && w.qlock < 0) doExec() : 0)) >= 0) {
cancelIgnoringExceptions(this); long ns, ms; // measure in nanosecs, but wait in millisecs
else if (!canBlock) { while ((s = status) >= 0 &&
if (p == null || p.tryCompensate(p.ctl)) (ns = deadline - System.nanoTime()) > 0L) {
canBlock = true; if ((ms = TimeUnit.NANOSECONDS.toMillis(ns)) > 0L &&
} U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) {
else { synchronized (this) {
if ((ms = TimeUnit.NANOSECONDS.toMillis(ns)) > 0L && if (status >= 0)
U.compareAndSwapInt(this, STATUS, s, s | SIGNAL)) { wait(ms); // OK to throw InterruptedException
synchronized (this) { else
if (status >= 0) { notifyAll();
try {
wait(ms);
} catch (InterruptedException ie) {
if (p == null)
interrupted = true;
}
}
else
notifyAll();
}
} }
if ((s = status) < 0 || interrupted ||
(ns = deadline - System.nanoTime()) <= 0L)
break;
} }
} }
} finally {
if (p != null && canBlock)
p.incrementActiveCount();
} }
if (interrupted)
throw new InterruptedException();
} }
if (s >= 0)
s = status;
if ((s &= DONE_MASK) != NORMAL) { if ((s &= DONE_MASK) != NORMAL) {
Throwable ex; Throwable ex;
if (s == CANCELLED) if (s == CANCELLED)
......
...@@ -66,7 +66,7 @@ public class ForkJoinWorkerThread extends Thread { ...@@ -66,7 +66,7 @@ public class ForkJoinWorkerThread extends Thread {
* owning thread. * owning thread.
* *
* Support for (non-public) subclass InnocuousForkJoinWorkerThread * Support for (non-public) subclass InnocuousForkJoinWorkerThread
* requires that we break quite a lot of encapulation (via Unsafe) * requires that we break quite a lot of encapsulation (via Unsafe)
* both here and in the subclass to access and set Thread fields. * both here and in the subclass to access and set Thread fields.
*/ */
...@@ -118,7 +118,7 @@ public class ForkJoinWorkerThread extends Thread { ...@@ -118,7 +118,7 @@ public class ForkJoinWorkerThread extends Thread {
* @return the index number * @return the index number
*/ */
public int getPoolIndex() { public int getPoolIndex() {
return workQueue.poolIndex >>> 1; // ignore odd/even tag bit return workQueue.getPoolIndex();
} }
/** /**
...@@ -171,7 +171,7 @@ public class ForkJoinWorkerThread extends Thread { ...@@ -171,7 +171,7 @@ public class ForkJoinWorkerThread extends Thread {
} }
/** /**
* Erases ThreadLocals by nulling out Thread maps * Erases ThreadLocals by nulling out Thread maps.
*/ */
final void eraseThreadLocals() { final void eraseThreadLocals() {
U.putObject(this, THREADLOCALS, null); U.putObject(this, THREADLOCALS, null);
...@@ -246,8 +246,8 @@ public class ForkJoinWorkerThread extends Thread { ...@@ -246,8 +246,8 @@ public class ForkJoinWorkerThread extends Thread {
/** /**
* Returns a new group with the system ThreadGroup (the * Returns a new group with the system ThreadGroup (the
* topmost, parentless group) as parent. Uses Unsafe to * topmost, parent-less group) as parent. Uses Unsafe to
* traverse Thread group and ThreadGroup parent fields. * traverse Thread.group and ThreadGroup.parent fields.
*/ */
private static ThreadGroup createThreadGroup() { private static ThreadGroup createThreadGroup() {
try { try {
...@@ -274,4 +274,3 @@ public class ForkJoinWorkerThread extends Thread { ...@@ -274,4 +274,3 @@ public class ForkJoinWorkerThread extends Thread {
} }
} }
...@@ -402,6 +402,14 @@ public class FileHandler extends StreamHandler { ...@@ -402,6 +402,14 @@ public class FileHandler extends StreamHandler {
openFiles(); openFiles();
} }
private boolean isParentWritable(Path path) {
Path parent = path.getParent();
if (parent == null) {
parent = path.toAbsolutePath().getParent();
}
return parent != null && Files.isWritable(parent);
}
/** /**
* Open the set of output files, based on the configured * Open the set of output files, based on the configured
* instance variables. * instance variables.
...@@ -458,7 +466,7 @@ public class FileHandler extends StreamHandler { ...@@ -458,7 +466,7 @@ public class FileHandler extends StreamHandler {
// Note that this is a situation that may happen, // Note that this is a situation that may happen,
// but not too frequently. // but not too frequently.
if (Files.isRegularFile(lockFilePath, LinkOption.NOFOLLOW_LINKS) if (Files.isRegularFile(lockFilePath, LinkOption.NOFOLLOW_LINKS)
&& Files.isWritable(lockFilePath.getParent())) { && isParentWritable(lockFilePath)) {
try { try {
channel = FileChannel.open(lockFilePath, channel = FileChannel.open(lockFilePath,
WRITE, APPEND); WRITE, APPEND);
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -167,6 +167,11 @@ public class Cipher { ...@@ -167,6 +167,11 @@ public class Cipher {
private static final Debug debug = private static final Debug debug =
Debug.getInstance("jca", "Cipher"); Debug.getInstance("jca", "Cipher");
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("cipher");
/** /**
* Constant used to initialize cipher to encryption mode. * Constant used to initialize cipher to encryption mode.
*/ */
...@@ -1110,6 +1115,21 @@ public class Cipher { ...@@ -1110,6 +1115,21 @@ public class Cipher {
} }
} }
private static String getOpmodeString(int opmode) {
switch (opmode) {
case ENCRYPT_MODE:
return "encryption";
case DECRYPT_MODE:
return "decryption";
case WRAP_MODE:
return "key wrapping";
case UNWRAP_MODE:
return "key unwrapping";
default:
return "";
}
}
/** /**
* Initializes this cipher with a key. * Initializes this cipher with a key.
* *
...@@ -1235,6 +1255,12 @@ public class Cipher { ...@@ -1235,6 +1255,12 @@ public class Cipher {
initialized = true; initialized = true;
this.opmode = opmode; this.opmode = opmode;
if (!skipDebug && pdebug != null) {
pdebug.println("Cipher." + transformation + " " +
getOpmodeString(opmode) + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
...@@ -1372,6 +1398,12 @@ public class Cipher { ...@@ -1372,6 +1398,12 @@ public class Cipher {
initialized = true; initialized = true;
this.opmode = opmode; this.opmode = opmode;
if (!skipDebug && pdebug != null) {
pdebug.println("Cipher." + transformation + " " +
getOpmodeString(opmode) + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
...@@ -1509,6 +1541,12 @@ public class Cipher { ...@@ -1509,6 +1541,12 @@ public class Cipher {
initialized = true; initialized = true;
this.opmode = opmode; this.opmode = opmode;
if (!skipDebug && pdebug != null) {
pdebug.println("Cipher." + transformation + " " +
getOpmodeString(opmode) + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
...@@ -1693,6 +1731,12 @@ public class Cipher { ...@@ -1693,6 +1731,12 @@ public class Cipher {
initialized = true; initialized = true;
this.opmode = opmode; this.opmode = opmode;
if (!skipDebug && pdebug != null) {
pdebug.println("Cipher." + transformation + " " +
getOpmodeString(opmode) + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -78,6 +78,11 @@ public class KeyAgreement { ...@@ -78,6 +78,11 @@ public class KeyAgreement {
private static final Debug debug = private static final Debug debug =
Debug.getInstance("jca", "KeyAgreement"); Debug.getInstance("jca", "KeyAgreement");
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("keyagreement");
// The provider // The provider
private Provider provider; private Provider provider;
...@@ -468,6 +473,11 @@ public class KeyAgreement { ...@@ -468,6 +473,11 @@ public class KeyAgreement {
throw new InvalidKeyException(e); throw new InvalidKeyException(e);
} }
} }
if (!skipDebug && pdebug != null) {
pdebug.println("KeyAgreement." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
...@@ -524,6 +534,11 @@ public class KeyAgreement { ...@@ -524,6 +534,11 @@ public class KeyAgreement {
} else { } else {
chooseProvider(I_PARAMS, key, params, random); chooseProvider(I_PARAMS, key, params, random);
} }
if (!skipDebug && pdebug != null) {
pdebug.println("KeyAgreement." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ import java.security.spec.*; ...@@ -33,6 +33,7 @@ import java.security.spec.*;
import sun.security.jca.*; import sun.security.jca.*;
import sun.security.jca.GetInstance.Instance; import sun.security.jca.GetInstance.Instance;
import sun.security.util.Debug;
/** /**
* This class provides the functionality of a secret (symmetric) key generator. * This class provides the functionality of a secret (symmetric) key generator.
...@@ -108,6 +109,11 @@ import sun.security.jca.GetInstance.Instance; ...@@ -108,6 +109,11 @@ import sun.security.jca.GetInstance.Instance;
public class KeyGenerator { public class KeyGenerator {
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("keygenerator");
// see java.security.KeyPairGenerator for failover notes // see java.security.KeyPairGenerator for failover notes
private final static int I_NONE = 1; private final static int I_NONE = 1;
...@@ -145,6 +151,11 @@ public class KeyGenerator { ...@@ -145,6 +151,11 @@ public class KeyGenerator {
this.spi = keyGenSpi; this.spi = keyGenSpi;
this.provider = provider; this.provider = provider;
this.algorithm = algorithm; this.algorithm = algorithm;
if (!skipDebug && pdebug != null) {
pdebug.println("KeyGenerator." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
private KeyGenerator(String algorithm) throws NoSuchAlgorithmException { private KeyGenerator(String algorithm) throws NoSuchAlgorithmException {
...@@ -158,6 +169,11 @@ public class KeyGenerator { ...@@ -158,6 +169,11 @@ public class KeyGenerator {
throw new NoSuchAlgorithmException throw new NoSuchAlgorithmException
(algorithm + " KeyGenerator not available"); (algorithm + " KeyGenerator not available");
} }
if (!skipDebug && pdebug != null) {
pdebug.println("KeyGenerator." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
......
/* /*
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -77,6 +77,11 @@ public class Mac implements Cloneable { ...@@ -77,6 +77,11 @@ public class Mac implements Cloneable {
private static final Debug debug = private static final Debug debug =
Debug.getInstance("jca", "Mac"); Debug.getInstance("jca", "Mac");
private static final Debug pdebug =
Debug.getInstance("provider", "Provider");
private static final boolean skipDebug =
Debug.isOn("engine=") && !Debug.isOn("mac");
// The provider // The provider
private Provider provider; private Provider provider;
...@@ -413,6 +418,11 @@ public class Mac implements Cloneable { ...@@ -413,6 +418,11 @@ public class Mac implements Cloneable {
throw new InvalidKeyException("init() failed", e); throw new InvalidKeyException("init() failed", e);
} }
initialized = true; initialized = true;
if (!skipDebug && pdebug != null) {
pdebug.println("Mac." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
...@@ -435,6 +445,11 @@ public class Mac implements Cloneable { ...@@ -435,6 +445,11 @@ public class Mac implements Cloneable {
chooseProvider(key, params); chooseProvider(key, params);
} }
initialized = true; initialized = true;
if (!skipDebug && pdebug != null) {
pdebug.println("Mac." + algorithm + " algorithm from: " +
this.provider.getName());
}
} }
/** /**
......
...@@ -56,6 +56,7 @@ import java.io.ObjectInputStream; ...@@ -56,6 +56,7 @@ import java.io.ObjectInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.ObjectInputValidation; import java.io.ObjectInputValidation;
import java.io.InvalidObjectException; import java.io.InvalidObjectException;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.swing.border.*; import javax.swing.border.*;
import javax.swing.event.*; import javax.swing.event.*;
...@@ -352,7 +353,8 @@ public abstract class JComponent extends Container implements Serializable, ...@@ -352,7 +353,8 @@ public abstract class JComponent extends Container implements Serializable,
private static final int AUTOSCROLLS_SET = 25; private static final int AUTOSCROLLS_SET = 25;
private static final int FOCUS_TRAVERSAL_KEYS_FORWARD_SET = 26; private static final int FOCUS_TRAVERSAL_KEYS_FORWARD_SET = 26;
private static final int FOCUS_TRAVERSAL_KEYS_BACKWARD_SET = 27; private static final int FOCUS_TRAVERSAL_KEYS_BACKWARD_SET = 27;
private static final int REVALIDATE_RUNNABLE_SCHEDULED = 28;
private transient AtomicBoolean revalidateRunnableScheduled = new AtomicBoolean(false);
/** /**
* Temporary rectangles. * Temporary rectangles.
...@@ -4859,16 +4861,11 @@ public abstract class JComponent extends Container implements Serializable, ...@@ -4859,16 +4861,11 @@ public abstract class JComponent extends Container implements Serializable,
// To avoid a flood of Runnables when constructing GUIs off // To avoid a flood of Runnables when constructing GUIs off
// the EDT, a flag is maintained as to whether or not // the EDT, a flag is maintained as to whether or not
// a Runnable has been scheduled. // a Runnable has been scheduled.
synchronized(this) { if (revalidateRunnableScheduled.getAndSet(true)) {
if (getFlag(REVALIDATE_RUNNABLE_SCHEDULED)) { return;
return;
}
setFlag(REVALIDATE_RUNNABLE_SCHEDULED, true);
} }
SunToolkit.executeOnEventHandlerThread(this, () -> { SunToolkit.executeOnEventHandlerThread(this, () -> {
synchronized(JComponent.this) { revalidateRunnableScheduled.set(false);
setFlag(REVALIDATE_RUNNABLE_SCHEDULED, false);
}
revalidate(); revalidate();
}); });
} }
...@@ -5508,6 +5505,7 @@ public abstract class JComponent extends Container implements Serializable, ...@@ -5508,6 +5505,7 @@ public abstract class JComponent extends Container implements Serializable,
ToolTipManager.sharedInstance().registerComponent(this); ToolTipManager.sharedInstance().registerComponent(this);
} }
setWriteObjCounter(this, (byte)0); setWriteObjCounter(this, (byte)0);
revalidateRunnableScheduled = new AtomicBoolean(false);
} }
......
...@@ -2895,6 +2895,14 @@ search: ...@@ -2895,6 +2895,14 @@ search:
return comp; return comp;
} }
if (flavor1.isFlavorTextType()) {
return 1;
}
if (flavor2.isFlavorTextType()) {
return -1;
}
// Next, look for application/x-java-* types. Prefer unknown // Next, look for application/x-java-* types. Prefer unknown
// MIME types because if the user provides his own data flavor, // MIME types because if the user provides his own data flavor,
// it will likely be the most descriptive one. // it will likely be the most descriptive one.
......
...@@ -523,13 +523,6 @@ public class SpNegoContext implements GSSContextSpi { ...@@ -523,13 +523,6 @@ public class SpNegoContext implements GSSContextSpi {
valid = false; valid = false;
} }
// get the mechanism token
byte[] mechToken = initToken.getMechToken();
if (mechToken == null) {
throw new GSSException(GSSException.FAILURE, -1,
"mechToken is missing");
}
/* /*
* Select the best match between the list of mechs * Select the best match between the list of mechs
* that the initiator requested and the list that * that the initiator requested and the list that
...@@ -545,7 +538,19 @@ public class SpNegoContext implements GSSContextSpi { ...@@ -545,7 +538,19 @@ public class SpNegoContext implements GSSContextSpi {
internal_mech = mech_wanted; internal_mech = mech_wanted;
// get the token for mechanism // get the token for mechanism
byte[] accept_token = GSS_acceptSecContext(mechToken); byte[] accept_token;
if (mechList[0].equals(mech_wanted)) {
// get the mechanism token
byte[] mechToken = initToken.getMechToken();
if (mechToken == null) {
throw new GSSException(GSSException.FAILURE, -1,
"mechToken is missing");
}
accept_token = GSS_acceptSecContext(mechToken);
} else {
accept_token = null;
}
// verify MIC // verify MIC
if (!GSSUtil.useMSInterop() && valid) { if (!GSSUtil.useMSInterop() && valid) {
...@@ -594,9 +599,27 @@ public class SpNegoContext implements GSSContextSpi { ...@@ -594,9 +599,27 @@ public class SpNegoContext implements GSSContextSpi {
retVal = targToken.getEncoded(); retVal = targToken.getEncoded();
} else if (state == STATE_IN_PROCESS) { } else if (state == STATE_IN_PROCESS) {
// read data
byte[] token = new byte[is.available()];
SpNegoToken.readFully(is, token);
if (DEBUG) {
System.out.println("SpNegoContext.acceptSecContext: " +
"receiving token = " +
SpNegoToken.getHexBytes(token));
}
// read the SPNEGO token
// token will be validated when parsing
NegTokenTarg inputToken = new NegTokenTarg(token);
if (DEBUG) {
System.out.println("SpNegoContext.acceptSecContext: " +
"received token of type = " +
SpNegoToken.getTokenName(inputToken.getType()));
}
// read the token // read the token
byte[] client_token = new byte[is.available()]; byte[] client_token = inputToken.getResponseToken();
SpNegoToken.readFully(is, client_token);
byte[] accept_token = GSS_acceptSecContext(client_token); byte[] accept_token = GSS_acceptSecContext(client_token);
if (accept_token == null) { if (accept_token == null) {
valid = false; valid = false;
...@@ -1055,7 +1078,7 @@ public class SpNegoContext implements GSSContextSpi { ...@@ -1055,7 +1078,7 @@ public class SpNegoContext implements GSSContextSpi {
* This is only valid on the acceptor side of the context. * This is only valid on the acceptor side of the context.
* @return GSSCredentialSpi object for the delegated credential * @return GSSCredentialSpi object for the delegated credential
* @exception GSSException * @exception GSSException
* @see GSSContext#getDelegCredState * @see GSSContext#getCredDelegState
*/ */
public final GSSCredentialSpi getDelegCred() throws GSSException { public final GSSCredentialSpi getDelegCred() throws GSSException {
if (state != STATE_IN_PROCESS && state != STATE_DONE) if (state != STATE_IN_PROCESS && state != STATE_DONE)
......
...@@ -336,7 +336,7 @@ public class Resources extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources extends java.util.ListResourceBundle {
{"New.prompt.", "New {0}: "}, {"New.prompt.", "New {0}: "},
{"Passwords.must.differ", "Passwords must differ"}, {"Passwords.must.differ", "Passwords must differ"},
{"Re.enter.new.prompt.", "Re-enter new {0}: "}, {"Re.enter.new.prompt.", "Re-enter new {0}: "},
{"Re.enter.passpword.", "Re-enter password: "}, {"Re.enter.password.", "Re-enter password: "},
{"Re.enter.new.password.", "Re-enter new password: "}, {"Re.enter.new.password.", "Re-enter new password: "},
{"They.don.t.match.Try.again", "They don't match. Try again"}, {"They.don.t.match.Try.again", "They don't match. Try again"},
{"Enter.prompt.alias.name.", "Enter {0} alias name: "}, {"Enter.prompt.alias.name.", "Enter {0} alias name: "},
......
...@@ -336,7 +336,7 @@ public class Resources_de extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_de extends java.util.ListResourceBundle {
{"New.prompt.", "Neues {0}: "}, {"New.prompt.", "Neues {0}: "},
{"Passwords.must.differ", "Kennw\u00F6rter m\u00FCssen sich unterscheiden"}, {"Passwords.must.differ", "Kennw\u00F6rter m\u00FCssen sich unterscheiden"},
{"Re.enter.new.prompt.", "Neues {0} erneut eingeben: "}, {"Re.enter.new.prompt.", "Neues {0} erneut eingeben: "},
{"Re.enter.passpword.", "Geben Sie das Kennwort erneut ein: "}, {"Re.enter.password.", "Geben Sie das Kennwort erneut ein: "},
{"Re.enter.new.password.", "Neues Kennwort erneut eingeben: "}, {"Re.enter.new.password.", "Neues Kennwort erneut eingeben: "},
{"They.don.t.match.Try.again", "Keine \u00DCbereinstimmung. Wiederholen Sie den Vorgang"}, {"They.don.t.match.Try.again", "Keine \u00DCbereinstimmung. Wiederholen Sie den Vorgang"},
{"Enter.prompt.alias.name.", "{0}-Aliasnamen eingeben: "}, {"Enter.prompt.alias.name.", "{0}-Aliasnamen eingeben: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_es extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_es extends java.util.ListResourceBundle {
{"New.prompt.", "Nuevo {0}: "}, {"New.prompt.", "Nuevo {0}: "},
{"Passwords.must.differ", "Las contrase\u00F1as deben ser distintas"}, {"Passwords.must.differ", "Las contrase\u00F1as deben ser distintas"},
{"Re.enter.new.prompt.", "Vuelva a escribir el nuevo {0}: "}, {"Re.enter.new.prompt.", "Vuelva a escribir el nuevo {0}: "},
{"Re.enter.passpword.", "Vuelva a introducir la contrase\u00F1a: "}, {"Re.enter.password.", "Vuelva a introducir la contrase\u00F1a: "},
{"Re.enter.new.password.", "Volver a escribir la contrase\u00F1a nueva: "}, {"Re.enter.new.password.", "Volver a escribir la contrase\u00F1a nueva: "},
{"They.don.t.match.Try.again", "No coinciden. Int\u00E9ntelo de nuevo"}, {"They.don.t.match.Try.again", "No coinciden. Int\u00E9ntelo de nuevo"},
{"Enter.prompt.alias.name.", "Escriba el nombre de alias de {0}: "}, {"Enter.prompt.alias.name.", "Escriba el nombre de alias de {0}: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_fr extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_fr extends java.util.ListResourceBundle {
{"New.prompt.", "Nouveau {0} : "}, {"New.prompt.", "Nouveau {0} : "},
{"Passwords.must.differ", "Les mots de passe doivent diff\u00E9rer"}, {"Passwords.must.differ", "Les mots de passe doivent diff\u00E9rer"},
{"Re.enter.new.prompt.", "Indiquez encore le nouveau {0} : "}, {"Re.enter.new.prompt.", "Indiquez encore le nouveau {0} : "},
{"Re.enter.passpword.", "R\u00E9p\u00E9tez le mot de passe : "}, {"Re.enter.password.", "R\u00E9p\u00E9tez le mot de passe : "},
{"Re.enter.new.password.", "Ressaisissez le nouveau mot de passe : "}, {"Re.enter.new.password.", "Ressaisissez le nouveau mot de passe : "},
{"They.don.t.match.Try.again", "Ils sont diff\u00E9rents. R\u00E9essayez."}, {"They.don.t.match.Try.again", "Ils sont diff\u00E9rents. R\u00E9essayez."},
{"Enter.prompt.alias.name.", "Indiquez le nom d''alias {0} : "}, {"Enter.prompt.alias.name.", "Indiquez le nom d''alias {0} : "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_it extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_it extends java.util.ListResourceBundle {
{"New.prompt.", "Nuova {0}: "}, {"New.prompt.", "Nuova {0}: "},
{"Passwords.must.differ", "Le password non devono coincidere"}, {"Passwords.must.differ", "Le password non devono coincidere"},
{"Re.enter.new.prompt.", "Reimmettere un nuovo valore per {0}: "}, {"Re.enter.new.prompt.", "Reimmettere un nuovo valore per {0}: "},
{"Re.enter.passpword.", "Reimmettere la password: "}, {"Re.enter.password.", "Reimmettere la password: "},
{"Re.enter.new.password.", "Immettere nuovamente la nuova password: "}, {"Re.enter.new.password.", "Immettere nuovamente la nuova password: "},
{"They.don.t.match.Try.again", "Non corrispondono. Riprovare."}, {"They.don.t.match.Try.again", "Non corrispondono. Riprovare."},
{"Enter.prompt.alias.name.", "Immettere nome alias {0}: "}, {"Enter.prompt.alias.name.", "Immettere nome alias {0}: "},
......
...@@ -336,7 +336,7 @@ public class Resources_ja extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_ja extends java.util.ListResourceBundle {
{"New.prompt.", "\u65B0\u898F{0}: "}, {"New.prompt.", "\u65B0\u898F{0}: "},
{"Passwords.must.differ", "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u7570\u306A\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"}, {"Passwords.must.differ", "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F\u7570\u306A\u3063\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
{"Re.enter.new.prompt.", "\u65B0\u898F{0}\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"Re.enter.new.prompt.", "\u65B0\u898F{0}\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "},
{"Re.enter.passpword.", "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"Re.enter.password.", "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "},
{"Re.enter.new.password.", "\u65B0\u898F\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"Re.enter.new.password.", "\u65B0\u898F\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "},
{"They.don.t.match.Try.again", "\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"}, {"They.don.t.match.Try.again", "\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u3082\u3046\u4E00\u5EA6\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"},
{"Enter.prompt.alias.name.", "{0}\u306E\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "}, {"Enter.prompt.alias.name.", "{0}\u306E\u5225\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_ko extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_ko extends java.util.ListResourceBundle {
{"New.prompt.", "\uC0C8 {0}: "}, {"New.prompt.", "\uC0C8 {0}: "},
{"Passwords.must.differ", "\uBE44\uBC00\uBC88\uD638\uB294 \uB2EC\uB77C\uC57C \uD569\uB2C8\uB2E4."}, {"Passwords.must.differ", "\uBE44\uBC00\uBC88\uD638\uB294 \uB2EC\uB77C\uC57C \uD569\uB2C8\uB2E4."},
{"Re.enter.new.prompt.", "\uC0C8 {0} \uB2E4\uC2DC \uC785\uB825: "}, {"Re.enter.new.prompt.", "\uC0C8 {0} \uB2E4\uC2DC \uC785\uB825: "},
{"Re.enter.passpword.", "\uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "}, {"Re.enter.password.", "\uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "},
{"Re.enter.new.password.", "\uC0C8 \uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "}, {"Re.enter.new.password.", "\uC0C8 \uBE44\uBC00\uBC88\uD638 \uB2E4\uC2DC \uC785\uB825: "},
{"They.don.t.match.Try.again", "\uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC2ED\uC2DC\uC624."}, {"They.don.t.match.Try.again", "\uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD558\uC2ED\uC2DC\uC624."},
{"Enter.prompt.alias.name.", "{0} \uBCC4\uCE6D \uC774\uB984 \uC785\uB825: "}, {"Enter.prompt.alias.name.", "{0} \uBCC4\uCE6D \uC774\uB984 \uC785\uB825: "},
......
...@@ -336,7 +336,7 @@ public class Resources_pt_BR extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_pt_BR extends java.util.ListResourceBundle {
{"New.prompt.", "Nova {0}: "}, {"New.prompt.", "Nova {0}: "},
{"Passwords.must.differ", "As senhas devem ser diferentes"}, {"Passwords.must.differ", "As senhas devem ser diferentes"},
{"Re.enter.new.prompt.", "Informe novamente a nova {0}: "}, {"Re.enter.new.prompt.", "Informe novamente a nova {0}: "},
{"Re.enter.passpword.", "Redigite a senha: "}, {"Re.enter.password.", "Redigite a senha: "},
{"Re.enter.new.password.", "Informe novamente a nova senha: "}, {"Re.enter.new.password.", "Informe novamente a nova senha: "},
{"They.don.t.match.Try.again", "Elas n\u00E3o correspondem. Tente novamente"}, {"They.don.t.match.Try.again", "Elas n\u00E3o correspondem. Tente novamente"},
{"Enter.prompt.alias.name.", "Informe o nome do alias {0}: "}, {"Enter.prompt.alias.name.", "Informe o nome do alias {0}: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_sv extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_sv extends java.util.ListResourceBundle {
{"New.prompt.", "Nytt {0}: "}, {"New.prompt.", "Nytt {0}: "},
{"Passwords.must.differ", "L\u00F6senorden m\u00E5ste vara olika"}, {"Passwords.must.differ", "L\u00F6senorden m\u00E5ste vara olika"},
{"Re.enter.new.prompt.", "Ange nytt {0} igen: "}, {"Re.enter.new.prompt.", "Ange nytt {0} igen: "},
{"Re.enter.passpword.", "Ange l\u00F6senord igen: "}, {"Re.enter.password.", "Ange l\u00F6senord igen: "},
{"Re.enter.new.password.", "Ange det nya l\u00F6senordet igen: "}, {"Re.enter.new.password.", "Ange det nya l\u00F6senordet igen: "},
{"They.don.t.match.Try.again", "De matchar inte. F\u00F6rs\u00F6k igen"}, {"They.don.t.match.Try.again", "De matchar inte. F\u00F6rs\u00F6k igen"},
{"Enter.prompt.alias.name.", "Ange aliasnamn f\u00F6r {0}: "}, {"Enter.prompt.alias.name.", "Ange aliasnamn f\u00F6r {0}: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_zh_CN extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_zh_CN extends java.util.ListResourceBundle {
{"New.prompt.", "\u65B0{0}: "}, {"New.prompt.", "\u65B0{0}: "},
{"Passwords.must.differ", "\u53E3\u4EE4\u4E0D\u80FD\u76F8\u540C"}, {"Passwords.must.differ", "\u53E3\u4EE4\u4E0D\u80FD\u76F8\u540C"},
{"Re.enter.new.prompt.", "\u91CD\u65B0\u8F93\u5165\u65B0{0}: "}, {"Re.enter.new.prompt.", "\u91CD\u65B0\u8F93\u5165\u65B0{0}: "},
{"Re.enter.passpword.", "\u518D\u6B21\u8F93\u5165\u53E3\u4EE4: "}, {"Re.enter.password.", "\u518D\u6B21\u8F93\u5165\u53E3\u4EE4: "},
{"Re.enter.new.password.", "\u518D\u6B21\u8F93\u5165\u65B0\u53E3\u4EE4: "}, {"Re.enter.new.password.", "\u518D\u6B21\u8F93\u5165\u65B0\u53E3\u4EE4: "},
{"They.don.t.match.Try.again", "\u5B83\u4EEC\u4E0D\u5339\u914D\u3002\u8BF7\u91CD\u8BD5"}, {"They.don.t.match.Try.again", "\u5B83\u4EEC\u4E0D\u5339\u914D\u3002\u8BF7\u91CD\u8BD5"},
{"Enter.prompt.alias.name.", "\u8F93\u5165{0}\u522B\u540D: "}, {"Enter.prompt.alias.name.", "\u8F93\u5165{0}\u522B\u540D: "},
......
/* /*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -336,7 +336,7 @@ public class Resources_zh_TW extends java.util.ListResourceBundle { ...@@ -336,7 +336,7 @@ public class Resources_zh_TW extends java.util.ListResourceBundle {
{"New.prompt.", "\u65B0 {0}: "}, {"New.prompt.", "\u65B0 {0}: "},
{"Passwords.must.differ", "\u5FC5\u9808\u662F\u4E0D\u540C\u7684\u5BC6\u78BC"}, {"Passwords.must.differ", "\u5FC5\u9808\u662F\u4E0D\u540C\u7684\u5BC6\u78BC"},
{"Re.enter.new.prompt.", "\u91CD\u65B0\u8F38\u5165\u65B0 {0}: "}, {"Re.enter.new.prompt.", "\u91CD\u65B0\u8F38\u5165\u65B0 {0}: "},
{"Re.enter.passpword.", "\u91CD\u65B0\u8F38\u5165\u5BC6\u78BC:"}, {"Re.enter.password.", "\u91CD\u65B0\u8F38\u5165\u5BC6\u78BC:"},
{"Re.enter.new.password.", "\u91CD\u65B0\u8F38\u5165\u65B0\u5BC6\u78BC: "}, {"Re.enter.new.password.", "\u91CD\u65B0\u8F38\u5165\u65B0\u5BC6\u78BC: "},
{"They.don.t.match.Try.again", "\u5B83\u5011\u4E0D\u76F8\u7B26\u3002\u8ACB\u91CD\u8A66"}, {"They.don.t.match.Try.again", "\u5B83\u5011\u4E0D\u76F8\u7B26\u3002\u8ACB\u91CD\u8A66"},
{"Enter.prompt.alias.name.", "\u8F38\u5165 {0} \u5225\u540D\u540D\u7A31: "}, {"Enter.prompt.alias.name.", "\u8F38\u5165 {0} \u5225\u540D\u540D\u7A31: "},
......
/* /*
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -104,7 +104,15 @@ public class Debug { ...@@ -104,7 +104,15 @@ public class Debug {
System.err.println("codebase=<URL>"); System.err.println("codebase=<URL>");
System.err.println(" only dump output if specified codebase"); System.err.println(" only dump output if specified codebase");
System.err.println(" is being checked"); System.err.println(" is being checked");
System.err.println();
System.err.println("The following can be used with provider:");
System.err.println();
System.err.println("engine=<engines>");
System.err.println(" only dump output for the specified list");
System.err.println(" of JCA engines. Supported values:");
System.err.println(" Cipher, KeyAgreement, KeyGenerator,");
System.err.println(" KeyPairGenerator, KeyStore, Mac,");
System.err.println(" MessageDigest, SecureRandom, Signature.");
System.err.println(); System.err.println();
System.err.println("Note: Separate multiple options with a comma"); System.err.println("Note: Separate multiple options with a comma");
System.exit(0); System.exit(0);
......
/* /*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -154,18 +154,18 @@ public class FormatData extends ParallelListResourceBundle { ...@@ -154,18 +154,18 @@ public class FormatData extends ParallelListResourceBundle {
}, },
{ "MonthNarrows", { "MonthNarrows",
new String[] { new String[] {
"J", "1",
"F", "2",
"M", "3",
"A", "4",
"M", "5",
"J", "6",
"J", "7",
"A", "8",
"S", "9",
"O", "10",
"N", "11",
"D", "12",
"", "",
} }
}, },
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -53,6 +53,23 @@ public class FormatData_en extends ParallelListResourceBundle { ...@@ -53,6 +53,23 @@ public class FormatData_en extends ParallelListResourceBundle {
// define this method as follows: // define this method as follows:
// return new Object[][] { }; // return new Object[][] { };
return new Object[][] { return new Object[][] {
{ "MonthNarrows",
new String[] {
"J",
"F",
"M",
"A",
"M",
"J",
"J",
"A",
"S",
"O",
"N",
"D",
"",
}
},
{ "NumberPatterns", { "NumberPatterns",
new String[] { new String[] {
"#,##0.###;-#,##0.###", // decimal pattern "#,##0.###;-#,##0.###", // decimal pattern
......
/* /*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -46,7 +46,8 @@ class XRootWindow extends XBaseWindow { ...@@ -46,7 +46,8 @@ class XRootWindow extends XBaseWindow {
} }
private XRootWindow() { private XRootWindow() {
super(new XCreateWindowParams(new Object[] {DELAYED, Boolean.TRUE})); super(new XCreateWindowParams(new Object[] { DELAYED, Boolean.TRUE,
EVENT_MASK, XConstants.StructureNotifyMask }));
} }
public void postInit(XCreateWindowParams params){ public void postInit(XCreateWindowParams params){
......
...@@ -2354,9 +2354,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2354,9 +2354,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
private static XEventDispatcher oops_waiter; private static XEventDispatcher oops_waiter;
private static boolean oops_updated; private static boolean oops_updated;
private static boolean oops_failed; private static boolean oops_move;
private XAtom oops;
private static final long WORKAROUND_SLEEP = 100;
/** /**
* @inheritDoc * @inheritDoc
...@@ -2367,52 +2365,33 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2367,52 +2365,33 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
if (oops_waiter == null) { if (oops_waiter == null) {
oops_waiter = new XEventDispatcher() { oops_waiter = new XEventDispatcher() {
public void dispatchEvent(XEvent e) { public void dispatchEvent(XEvent e) {
if (e.get_type() == XConstants.SelectionNotify) { if (e.get_type() == XConstants.ConfigureNotify) {
XSelectionEvent pe = e.get_xselection(); // OOPS ConfigureNotify event catched
if (pe.get_property() == oops.getAtom()) { oops_updated = true;
oops_updated = true; awtLockNotifyAll();
awtLockNotifyAll();
} else if (pe.get_selection() == XAtom.get("WM_S0").getAtom() &&
pe.get_target() == XAtom.get("VERSION").getAtom() &&
pe.get_property() == 0 &&
XlibWrapper.XGetSelectionOwner(getDisplay(), XAtom.get("WM_S0").getAtom()) == 0)
{
// WM forgot to acquire selection or there is no WM
oops_failed = true;
awtLockNotifyAll();
}
} }
} }
}; };
} }
if (oops == null) {
oops = XAtom.get("OOPS");
}
awtLock(); awtLock();
try { try {
addEventDispatcher(win.getWindow(), oops_waiter); addEventDispatcher(win.getWindow(), oops_waiter);
oops_updated = false; oops_updated = false;
oops_failed = false;
// Wait for selection notify for oops on win
long event_number = getEventNumber(); long event_number = getEventNumber();
XAtom atom = XAtom.get("WM_S0"); // Generate OOPS ConfigureNotify event
if (eventLog.isLoggable(PlatformLogger.Level.FINER)) { XlibWrapper.XMoveWindow(getDisplay(), win.getWindow(), oops_move ? 0 : 1, 0);
eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom())); // Change win position each time to avoid system optimization
} oops_move = !oops_move;
XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(),
XAtom.get("VERSION").getAtom(), oops.getAtom(),
win.getWindow(), XConstants.CurrentTime);
XSync(); XSync();
eventLog.finer("Requested OOPS"); eventLog.finer("Generated OOPS ConfigureNotify event");
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
while (!oops_updated && !oops_failed) { while (!oops_updated) {
try { try {
// Wait for OOPS ConfigureNotify event
awtLockWait(timeout); awtLockWait(timeout);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
...@@ -2423,20 +2402,8 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2423,20 +2402,8 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
throw new OperationTimedOut(Long.toString(System.currentTimeMillis() - start)); throw new OperationTimedOut(Long.toString(System.currentTimeMillis() - start));
} }
} }
if (oops_failed && getEventNumber() - event_number == 1) { // Don't take into account OOPS ConfigureNotify event
// If selection update failed we can simply wait some time return getEventNumber() - event_number > 1;
// hoping some events will arrive
awtUnlock();
eventLog.finest("Emergency sleep");
try {
Thread.sleep(WORKAROUND_SLEEP);
} catch (InterruptedException ie) {
throw new RuntimeException(ie);
} finally {
awtLock();
}
}
return getEventNumber() - event_number > 2;
} finally { } finally {
removeEventDispatcher(win.getWindow(), oops_waiter); removeEventDispatcher(win.getWindow(), oops_waiter);
eventLog.finer("Exiting syncNativeQueue"); eventLog.finer("Exiting syncNativeQueue");
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
*/ */
extern XErrorHandler current_native_xerror_handler; extern XErrorHandler current_native_xerror_handler;
Window get_xawt_root_shell(JNIEnv *env);
#endif /* !HEADLESS */ #endif /* !HEADLESS */
#ifndef INTERSECTS #ifndef INTERSECTS
......
...@@ -2011,10 +2011,14 @@ static Bool exitSecondaryLoop = True; ...@@ -2011,10 +2011,14 @@ static Bool exitSecondaryLoop = True;
* Toolkit thread to process PropertyNotify or SelectionNotify events. * Toolkit thread to process PropertyNotify or SelectionNotify events.
*/ */
static Bool static Bool
secondary_loop_event(Display* dpy, XEvent* event, char* arg) { secondary_loop_event(Display* dpy, XEvent* event, XPointer xawt_root_window) {
return (event->type == SelectionNotify || return (
event->type == SelectionClear || event->type == SelectionNotify ||
event->type == PropertyNotify) ? True : False; event->type == SelectionClear ||
event->type == PropertyNotify ||
(event->type == ConfigureNotify
&& event->xany.window == *(Window*) xawt_root_window)
) ? True : False;
} }
...@@ -2025,8 +2029,11 @@ Java_sun_awt_X11_XlibWrapper_XNextSecondaryLoopEvent(JNIEnv *env, jclass clazz, ...@@ -2025,8 +2029,11 @@ Java_sun_awt_X11_XlibWrapper_XNextSecondaryLoopEvent(JNIEnv *env, jclass clazz,
AWT_CHECK_HAVE_LOCK_RETURN(JNI_FALSE); AWT_CHECK_HAVE_LOCK_RETURN(JNI_FALSE);
exitSecondaryLoop = False; exitSecondaryLoop = False;
Window xawt_root_window = get_xawt_root_shell(env);
while (!exitSecondaryLoop) { while (!exitSecondaryLoop) {
if (XCheckIfEvent((Display*) jlong_to_ptr(display), (XEvent*) jlong_to_ptr(ptr), secondary_loop_event, NULL)) { if (XCheckIfEvent((Display*) jlong_to_ptr(display),
(XEvent*) jlong_to_ptr(ptr), secondary_loop_event, (XPointer) &xawt_root_window)) {
return JNI_TRUE; return JNI_TRUE;
} }
timeout = (timeout < AWT_SECONDARY_LOOP_TIMEOUT) ? (timeout << 1) : AWT_SECONDARY_LOOP_TIMEOUT; timeout = (timeout < AWT_SECONDARY_LOOP_TIMEOUT) ? (timeout << 1) : AWT_SECONDARY_LOOP_TIMEOUT;
......
...@@ -670,7 +670,7 @@ Java_sun_java2d_windows_GDIRenderer_doFillPoly ...@@ -670,7 +670,7 @@ Java_sun_java2d_windows_GDIRenderer_doFillPoly
if (ypoints != NULL) { if (ypoints != NULL) {
pPoints = TransformPoly(xpoints, ypoints, transx, transy, pPoints = TransformPoly(xpoints, ypoints, transx, transy,
tmpPts, &npoints, FALSE, FALSE); tmpPts, &npoints, FALSE, FALSE);
env->ReleasePrimitiveArrayCritical(ypointsarray, xpoints, JNI_ABORT); env->ReleasePrimitiveArrayCritical(ypointsarray, ypoints, JNI_ABORT);
} }
env->ReleasePrimitiveArrayCritical(xpointsarray, xpoints, JNI_ABORT); env->ReleasePrimitiveArrayCritical(xpointsarray, xpoints, JNI_ABORT);
} }
......
...@@ -57,17 +57,11 @@ public: ...@@ -57,17 +57,11 @@ public:
static size_t GetALength(JNIEnv* env, jstring jStr, size_t maxlen); static size_t GetALength(JNIEnv* env, jstring jStr, size_t maxlen);
LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK EditProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
MsgRouting WmEnable(BOOL fEnabled); MsgRouting WmEnable(BOOL fEnabled);
MsgRouting WmContextMenu(HWND hCtrl, UINT xPos, UINT yPos);
MsgRouting WmNotify(UINT notifyCode);
MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT &retVal); MsgRouting WmNcHitTest(UINT x, UINT y, LRESULT &retVal);
MsgRouting HandleEvent(MSG *msg, BOOL synthetic); MsgRouting HandleEvent(MSG *msg, BOOL synthetic);
INLINE void SetIgnoreEnChange(BOOL b) { m_bIgnoreEnChange = b; }
virtual BOOL InheritsNativeMouseWheelBehavior(); virtual BOOL InheritsNativeMouseWheelBehavior();
virtual void Reshape(int x, int y, int w, int h); virtual void Reshape(int x, int y, int w, int h);
...@@ -81,22 +75,7 @@ public: ...@@ -81,22 +75,7 @@ public:
protected: protected:
void EditSetSel(CHARRANGE &cr); void EditSetSel(CHARRANGE &cr);
void EditGetSel(CHARRANGE &cr);
private: private:
// RichEdit 1.0 control generates EN_CHANGE notifications not only
// on text changes, but also on any character formatting change.
// This flag is true when the latter case is detected.
BOOL m_bIgnoreEnChange;
// RichEdit 1.0 control undoes a character formatting change
// if it is the latest. We don't create our own undo buffer,
// but just prohibit undo in case if the latest operation
// is a formatting change.
BOOL m_bCanUndo;
HWND m_hEditCtrl;
static WNDPROC sm_pDefWindowProc;
LONG m_lHDeltaAccum; LONG m_lHDeltaAccum;
LONG m_lVDeltaAccum; LONG m_lVDeltaAccum;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册