You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/10/06 16:57:51 UTC
svn commit: r822302 [5/5] - in /harmony/enhanced/classlib/branches/java6: ./
depends/build/ depends/build/platform/ depends/files/
depends/libs/windows.x86/ depends/oss/ make/ modules/accessibility/
modules/annotation/ modules/annotation/make/ modules/...
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestInputStream.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestInputStream.java Tue Oct 6 14:57:42 2009
@@ -78,6 +78,7 @@
* @throws IOException
* if reading the source stream causes an {@code IOException}.
*/
+ @Override
public int read() throws IOException {
// read the next byte
int byteRead = in.read();
@@ -110,6 +111,7 @@
* @throws IOException
* if reading the source stream causes an {@code IOException}
*/
+ @Override
public int read(byte[] b, int off, int len) throws IOException {
// read next up to len bytes
int bytesRead = in.read(b, off, len);
@@ -141,6 +143,7 @@
*
* @return a printable representation for this {@code DigestInputStream}.
*/
+ @Override
public String toString() {
return super.toString() + ", " + digest.toString() + //$NON-NLS-1$
(isOn ? ", is on" : ", is off"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestOutputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestOutputStream.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestOutputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/DigestOutputStream.java Tue Oct 6 14:57:42 2009
@@ -77,6 +77,7 @@
* @throws IOException
* if writing to the stream causes a {@code IOException}
*/
+ @Override
public void write(int b) throws IOException {
// update digest only if digest functionality is on
if (isOn) {
@@ -99,6 +100,7 @@
* @throws IOException
* if writing to the stream causes an {@code IOException}.
*/
+ @Override
public void write(byte[] b, int off, int len) throws IOException {
// update digest only if digest functionality is on
if (isOn) {
@@ -126,6 +128,7 @@
*
* @return a printable representation for this {@code DigestOutputStream}.
*/
+ @Override
public String toString() {
return super.toString() + ", " + digest.toString() + //$NON-NLS-1$
(isOn ? ", is on" : ", is off"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Identity.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Identity.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Identity.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Identity.java Tue Oct 6 14:57:42 2009
@@ -344,6 +344,7 @@
* @return {@code true} if the specified object is equal to this {@code
* Identity}, otherwise {@code false}.
*/
+ @Override
public final boolean equals(Object obj) {
if (this == obj) {
return true;
@@ -383,6 +384,7 @@
* @see Object#equals(Object)
* @see Identity#equals(Object)
*/
+ @Override
public int hashCode() {
int hash = 0;
if (name != null) {
@@ -410,14 +412,16 @@
* if a {@code SecurityManager} is installed and the caller does
* not have permission to invoke this method.
*/
+ @Override
+ @SuppressWarnings("nls")
public String toString() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- sm.checkSecurityAccess("printIdentity"); //$NON-NLS-1$
+ sm.checkSecurityAccess("printIdentity");
}
- String s = (this.name == null? "" : this.name);
+ String s = (this.name == null ? "" : this.name);
if (scope != null) {
- s += " [" + scope.getName() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ s += " [" + scope.getName() + "]";
}
return s;
}
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/IdentityScope.java Tue Oct 6 14:57:42 2009
@@ -194,6 +194,7 @@
*
* @return a printable representation for this {@code IdentityScope}.
*/
+ @Override
public String toString() {
return new StringBuilder(super.toString())
.append("[").append(size()).append("]").toString(); //$NON-NLS-1$ //$NON-NLS-2$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyFactory.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyFactory.java Tue Oct 6 14:57:42 2009
@@ -104,14 +104,15 @@
* @throws IllegalArgumentException
* if {@code provider} is {@code null} or empty.
*/
+ @SuppressWarnings("nls")
public static KeyFactory getInstance(String algorithm, String provider)
throws NoSuchAlgorithmException, NoSuchProviderException {
if ((provider == null) || (provider.length() == 0)) {
- throw new IllegalArgumentException(Messages.getString("security.02")); //$NON-NLS-1$
+ throw new IllegalArgumentException(Messages.getString("security.02"));
}
Provider p = Security.getProvider(provider);
if (p == null) {
- throw new NoSuchProviderException(Messages.getString("security.03", provider)); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new NoSuchProviderException(Messages.getString("security.03", provider));
}
return getInstance(algorithm, p);
}
@@ -196,6 +197,9 @@
/**
* Returns the key specification for the specified key.
*
+ * @param <T>
+ * The key type
+ *
* @param key
* the key from which the specification is requested.
* @param keySpec
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyPairGenerator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyPairGenerator.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyPairGenerator.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyPairGenerator.java Tue Oct 6 14:57:42 2009
@@ -92,11 +92,10 @@
result.algorithm = algorithm;
result.provider = engine.provider;
return result;
- } else {
- result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
- engine.provider, algorithm);
- return result;
}
+ result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
+ engine.provider, algorithm);
+ return result;
}
}
@@ -158,11 +157,10 @@
result.algorithm = algorithm;
result.provider = provider;
return result;
- } else {
- result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
- provider, algorithm);
- return result;
}
+ result = new KeyPairGeneratorImpl((KeyPairGeneratorSpi) engine.spi,
+ provider, algorithm);
+ return result;
}
}
@@ -222,6 +220,7 @@
*
* @return a new unique {@code KeyPair} each time this method is called
*/
+ @Override
public KeyPair generateKeyPair() {
return null;
}
@@ -235,6 +234,7 @@
* @param random
* the source of randomness
*/
+ @Override
public void initialize(int keysize, SecureRandom random) {
}
@@ -249,6 +249,7 @@
* @throws InvalidAlgorithmParameterException
* if the specified parameters are not supported
*/
+ @Override
public void initialize(AlgorithmParameterSpec param, SecureRandom random)
throws InvalidAlgorithmParameterException {
}
@@ -276,18 +277,21 @@
// implementation of initialize(int keysize, SecureRandom random)
// using corresponding spi initialize() method
+ @Override
public void initialize(int keysize, SecureRandom random) {
spiImpl.initialize(keysize, random);
}
// implementation of generateKeyPair()
// using corresponding spi generateKeyPair() method
+ @Override
public KeyPair generateKeyPair() {
return spiImpl.generateKeyPair();
}
// implementation of initialize(int keysize, SecureRandom random)
// using corresponding spi initialize() method
+ @Override
public void initialize(AlgorithmParameterSpec param, SecureRandom random)
throws InvalidAlgorithmParameterException {
spiImpl.initialize(param, random);
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java Tue Oct 6 14:57:42 2009
@@ -983,6 +983,7 @@
//
// Result KeyStore object is returned.
//
+ @Override
public synchronized KeyStore getKeyStore() throws KeyStoreException {
// If KeyStore was created but in final block some exception was
// thrown
@@ -1059,6 +1060,7 @@
// Return: ProtectionParameter to get Entry which was saved in
// KeyStore with defined alias
//
+ @Override
public synchronized ProtectionParameter getProtectionParameter(
String alias) throws KeyStoreException {
if (alias == null) {
@@ -1073,8 +1075,6 @@
/*
* Implementation of LoadStoreParameter interface
- *
- * @author Vera Petrashkova
*/
private static class TmpLSParameter implements LoadStoreParameter {
@@ -1083,6 +1083,7 @@
/**
* Creates TmpLoadStoreParameter object
+ * @param protPar protection parameter
*/
public TmpLSParameter(ProtectionParameter protPar) {
this.protPar = protPar;
@@ -1336,6 +1337,7 @@
*
* @return a printable representation for this {@code PrivateKeyEntry}.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder(
"PrivateKeyEntry: number of elements in certificate chain is "); //$NON-NLS-1$
@@ -1390,6 +1392,7 @@
* @return a printable representation for this {@code
* SecretKeyEntry}.
*/
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("SecretKeyEntry: algorithm - "); //$NON-NLS-1$
sb.append(secretKey.getAlgorithm());
@@ -1438,6 +1441,7 @@
* @return a printable representation for this {@code
* TrustedCertificateEntry}.
*/
+ @Override
public String toString() {
return "Trusted certificate entry:\n" + trustCertificate; //$NON-NLS-1$
}
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigest.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigest.java Tue Oct 6 14:57:42 2009
@@ -80,11 +80,9 @@
result.algorithm = algorithm;
result.provider = engine.provider;
return result;
- } else {
- result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
- engine.provider, algorithm);
- return result;
}
+ return new MessageDigestImpl((MessageDigestSpi) engine.spi,
+ engine.provider, algorithm);
}
}
@@ -151,11 +149,10 @@
result.algorithm = algorithm;
result.provider = provider;
return result;
- } else {
- result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
- provider, algorithm);
- return result;
}
+ result = new MessageDigestImpl((MessageDigestSpi) engine.spi,
+ provider, algorithm);
+ return result;
}
}
@@ -280,6 +277,7 @@
*
* @return a printable representation for this {@code MessageDigest}
*/
+ @Override
public String toString() {
return "MESSAGE DIGEST " + algorithm; //$NON-NLS-1$
}
@@ -347,12 +345,12 @@
}
}
+ @Override
public Object clone() throws CloneNotSupportedException {
if (this instanceof Cloneable) {
return super.clone();
- } else {
- throw new CloneNotSupportedException();
}
+ throw new CloneNotSupportedException();
}
/**
@@ -384,38 +382,44 @@
}
// engineReset() implementation
+ @Override
protected void engineReset() {
spiImpl.engineReset();
}
// engineDigest() implementation
+ @Override
protected byte[] engineDigest() {
return spiImpl.engineDigest();
}
// engineGetDigestLength() implementation
+ @Override
protected int engineGetDigestLength() {
return spiImpl.engineGetDigestLength();
}
// engineUpdate() implementation
+ @Override
protected void engineUpdate(byte arg0) {
spiImpl.engineUpdate(arg0);
}
// engineUpdate() implementation
+ @Override
protected void engineUpdate(byte[] arg0, int arg1, int arg2) {
spiImpl.engineUpdate(arg0, arg1, arg2);
}
// Returns a clone if the spiImpl is cloneable
+ @Override
public Object clone() throws CloneNotSupportedException {
if (spiImpl instanceof Cloneable) {
MessageDigestSpi spi = (MessageDigestSpi) spiImpl.clone();
return new MessageDigestImpl(spi, getProvider(), getAlgorithm());
- } else {
- throw new CloneNotSupportedException();
}
+
+ throw new CloneNotSupportedException();
}
}
}
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigestSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigestSpi.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigestSpi.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/MessageDigestSpi.java Tue Oct 6 14:57:42 2009
@@ -148,6 +148,7 @@
*/
protected abstract void engineReset();
+ @Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Permission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Permission.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Permission.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Permission.java Tue Oct 6 14:57:42 2009
@@ -45,6 +45,7 @@
* @return {@code true} if the specified object is equal to this {@code
* Permission}, otherwise {@code false}.
*/
+ @Override
public abstract boolean equals(Object obj);
/**
@@ -56,6 +57,7 @@
* @see Object#equals(Object)
* @see Permission#equals(Object)
*/
+ @Override
public abstract int hashCode();
/**
@@ -149,6 +151,7 @@
*
* @return a printable representation for this {@code Permission}.
*/
+ @Override
public String toString() {
String actions = getActions();
actions = (actions == null || actions.length() == 0) ? "" : " " //$NON-NLS-1$ //$NON-NLS-2$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PermissionCollection.java Tue Oct 6 14:57:42 2009
@@ -95,9 +95,10 @@
*
* @return a printable representation for this {@code PermissionCollection}.
*/
+ @Override
public String toString() {
- List elist = new ArrayList(100);
- Enumeration elenum = elements();
+ List<String> elist = new ArrayList<String>(100);
+ Enumeration<Permission> elenum = elements();
String superStr = super.toString();
int totalLength = superStr.length() + 5;
if (elenum != null) {
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PrivilegedActionException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PrivilegedActionException.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PrivilegedActionException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/PrivilegedActionException.java Tue Oct 6 14:57:42 2009
@@ -71,6 +71,7 @@
* @return the exception that was thrown by a
* {@code PrivilegedExceptionAction}.
*/
+ @Override
public Throwable getCause() {
return exception;
}
@@ -82,6 +83,7 @@
* @return a printable representation for this {@code
* PrivilegedActionException}.
*/
+ @Override
public String toString() {
String s = getClass().getName();
return exception == null ? s : s + ": " + exception; //$NON-NLS-1$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/ProtectionDomain.java Tue Oct 6 14:57:42 2009
@@ -211,6 +211,7 @@
*
* @return a printable representation for this {@code ProtectionDomain}.
*/
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder(200);
buf.append("ProtectionDomain\n"); //$NON-NLS-1$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Provider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Provider.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Provider.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Provider.java Tue Oct 6 14:57:42 2009
@@ -142,6 +142,7 @@
*
* @return a printable representation for this {@code Provider}.
*/
+ @Override
public String toString() {
return name + " version " + version; //$NON-NLS-1$
}
@@ -159,6 +160,7 @@
* if a {@code SecurityManager} is installed and the caller does
* not have permission to invoke this method.
*/
+ @Override
public synchronized void clear() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -188,6 +190,7 @@
servicesChanged();
}
+ @Override
public synchronized void load(InputStream inStream) throws IOException {
Properties tmp = new Properties();
tmp.load(inStream);
@@ -208,6 +211,7 @@
* if a {@code SecurityManager} is installed and the caller does
* not have permission to invoke this method.
*/
+ @Override
public synchronized void putAll(Map<?,?> t) {
// Implementation note:
@@ -248,14 +252,17 @@
}
}
+ @Override
public synchronized Set<Map.Entry<Object,Object>> entrySet() {
return Collections.unmodifiableSet(super.entrySet());
}
+ @Override
public Set<Object> keySet() {
return Collections.unmodifiableSet(super.keySet());
}
+ @Override
public Collection<Object> values() {
return Collections.unmodifiableCollection(super.values());
}
@@ -279,6 +286,7 @@
* if a {@code SecurityManager} is installed and the caller does
* not have permission to invoke this method.
*/
+ @Override
public synchronized Object put(Object key, Object value) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -319,6 +327,7 @@
* if a {@code SecurityManager} is installed and the caller does
* not have the permission to invoke this method.
*/
+ @Override
public synchronized Object remove(Object key) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -360,15 +369,14 @@
alg = getPropertyIgnoreCase("Alg.Alias." + servAlg); //$NON-NLS-1$
if (alg != null) {
servAlg = serv + "." + alg; //$NON-NLS-1$
- prop = getPropertyIgnoreCase(servAlg); //$NON-NLS-1$
+ prop = getPropertyIgnoreCase(servAlg);
}
}
if (prop != null) {
if (attribute == null) {
return true;
- } else {
- return checkAttribute(servAlg, attribute, val); //$NON-NLS-1$
}
+ return checkAttribute(servAlg, attribute, val);
}
return false;
}
@@ -835,11 +843,12 @@
// These attributes should be placed in each Provider object:
// Provider.id name, Provider.id version, Provider.id info,
// Provider.id className
+ @SuppressWarnings("nls")
private void putProviderInfo() {
- super.put("Provider.id name", null != name ? name : "null"); //$NON-NLS-1$
- super.put("Provider.id version", versionString); //$NON-NLS-1$
- super.put("Provider.id info", null != info ? info : "null"); //$NON-NLS-1$
- super.put("Provider.id className", this.getClass().getName()); //$NON-NLS-1$
+ super.put("Provider.id name", null != name ? name : "null");
+ super.put("Provider.id version", versionString);
+ super.put("Provider.id info", null != info ? info : "null");
+ super.put("Provider.id className", this.getClass().getName());
}
// Searches for the property with the specified key in the provider
@@ -1091,6 +1100,7 @@
*
* @return a printable representation for this {@code Service}.
*/
+ @Override
public String toString() {
String result = "Provider " + provider.getName() + " Service " //$NON-NLS-1$ //$NON-NLS-2$
+ type + "." + algorithm + " " + className; //$NON-NLS-1$ //$NON-NLS-2$
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureClassLoader.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureClassLoader.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureClassLoader.java Tue Oct 6 14:57:42 2009
@@ -28,7 +28,7 @@
public class SecureClassLoader extends ClassLoader {
// A cache of ProtectionDomains for a given CodeSource
- private HashMap pds = new HashMap();
+ private HashMap<CodeSource, ProtectionDomain> pds = new HashMap<CodeSource, ProtectionDomain>();
/**
* Constructs a new instance of {@code SecureClassLoader}. The default
@@ -150,7 +150,7 @@
// will have it's own ProtectionDomain, which does not look right.
ProtectionDomain pd;
synchronized (pds) {
- if ((pd = (ProtectionDomain) pds.get(cs)) != null) {
+ if ((pd = pds.get(cs)) != null) {
return pd;
}
PermissionCollection perms = getPermissions(cs);
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureRandom.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureRandom.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureRandom.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SecureRandom.java Tue Oct 6 14:57:42 2009
@@ -252,6 +252,7 @@
* @param seed
* the new seed.
*/
+ @Override
public void setSeed(long seed) {
if (seed == 0) { // skip call from Random
return;
@@ -276,6 +277,7 @@
* @param bytes
* the {@code byte[]} to be filled with random bytes.
*/
+ @Override
public synchronized void nextBytes(byte[] bytes) {
secureRandomSpi.engineNextBytes(bytes);
}
@@ -289,6 +291,7 @@
* the range [0, 32].
* @return an {@code int} containing the specified number of random bits.
*/
+ @Override
protected final int next(int numBits) {
if (numBits < 0) {
numBits = 0;
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Security.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Security.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Security.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Security.java Tue Oct 6 14:57:42 2009
@@ -30,6 +30,7 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
+import java.util.Map.Entry;
import org.apache.harmony.security.Util;
import org.apache.harmony.security.fortress.Engine;
@@ -362,12 +363,12 @@
return null;
}
java.util.List<Provider> result = Services.getProvidersList();
- Set keys = filter.entrySet();
- Map.Entry entry;
- for (Iterator it = keys.iterator(); it.hasNext();) {
- entry = (Map.Entry) it.next();
- String key = (String) entry.getKey();
- String val = (String) entry.getValue();
+ Set<Entry<String, String>> keys = filter.entrySet();
+ Map.Entry<String, String> entry;
+ for (Iterator<Entry<String, String>> it = keys.iterator(); it.hasNext();) {
+ entry = it.next();
+ String key = entry.getKey();
+ String val = entry.getValue();
String attribute = null;
int i = key.indexOf(' ');
int j = key.indexOf('.');
@@ -401,7 +402,7 @@
Provider p;
for (int k = 0; k < result.size(); k++) {
try {
- p = (Provider) result.get(k);
+ p = result.get(k);
} catch (IndexOutOfBoundsException e) {
break;
}
@@ -413,9 +414,8 @@
}
if (result.size() > 0) {
return result.toArray(new Provider[result.size()]);
- } else {
- return null;
}
+ return null;
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signature.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signature.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signature.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signature.java Tue Oct 6 14:57:42 2009
@@ -515,6 +515,7 @@
*
* @return a printable representation for this {@code Signature}.
*/
+ @Override
public String toString() {
return "SIGNATURE " + algorithm + " state: " + stateToString(state); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -594,12 +595,12 @@
return engineGetParameter(param);
}
+ @Override
public Object clone() throws CloneNotSupportedException {
if (this instanceof Cloneable) {
return super.clone();
- } else {
- throw new CloneNotSupportedException();
}
+ throw new CloneNotSupportedException();
}
/**
@@ -620,58 +621,66 @@
}
// engineSign() implementation
+ @Override
protected byte[] engineSign() throws SignatureException {
return spiImpl.engineSign();
}
// engineUpdate() implementation
+ @Override
protected void engineUpdate(byte arg0) throws SignatureException {
spiImpl.engineUpdate(arg0);
}
// engineVerify() implementation
+ @Override
protected boolean engineVerify(byte[] arg0) throws SignatureException {
return spiImpl.engineVerify(arg0);
}
// engineUpdate() implementation
+ @Override
protected void engineUpdate(byte[] arg0, int arg1, int arg2)
throws SignatureException {
spiImpl.engineUpdate(arg0, arg1, arg2);
}
// engineInitSign() implementation
+ @Override
protected void engineInitSign(PrivateKey arg0)
throws InvalidKeyException {
spiImpl.engineInitSign(arg0);
}
// engineInitVerify() implementation
+ @Override
protected void engineInitVerify(PublicKey arg0)
throws InvalidKeyException {
spiImpl.engineInitVerify(arg0);
}
// engineGetParameter() implementation
+ @Override
protected Object engineGetParameter(String arg0)
throws InvalidParameterException {
return spiImpl.engineGetParameter(arg0);
}
// engineSetParameter() implementation
+ @Override
protected void engineSetParameter(String arg0, Object arg1)
throws InvalidParameterException {
spiImpl.engineSetParameter(arg0, arg1);
}
// Returns a clone if the spiImpl is cloneable
+ @Override
public Object clone() throws CloneNotSupportedException {
if (spiImpl instanceof Cloneable) {
SignatureSpi spi = (SignatureSpi) spiImpl.clone();
return new SignatureImpl(spi, getProvider(), getAlgorithm());
- } else {
- throw new CloneNotSupportedException();
}
+ throw new CloneNotSupportedException();
}
}
}
\ No newline at end of file
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SignatureSpi.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SignatureSpi.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SignatureSpi.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/SignatureSpi.java Tue Oct 6 14:57:42 2009
@@ -308,11 +308,11 @@
protected abstract Object engineGetParameter(String param)
throws InvalidParameterException;
+ @Override
public Object clone() throws CloneNotSupportedException {
if (this instanceof Cloneable) {
return super.clone();
- } else {
- throw new CloneNotSupportedException();
}
+ throw new CloneNotSupportedException();
}
}
\ No newline at end of file
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signer.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Signer.java Tue Oct 6 14:57:42 2009
@@ -136,6 +136,7 @@
*
* @return a printable representation for this {@code Signer}.
*/
+ @Override
public String toString() {
String s = "[Signer]" + getName(); //$NON-NLS-1$
if (getScope() != null) {
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/Timestamp.java Tue Oct 6 14:57:42 2009
@@ -76,6 +76,7 @@
* Timestamp}, otherwise {@code false}.
* @see #hashCode
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -115,6 +116,7 @@
* @see Object#equals(Object)
* @see Timestamp#equals(Object)
*/
+ @Override
public int hashCode() {
if (hash == 0) {
hash = timestamp.hashCode() ^ signerCertPath.hashCode();
@@ -128,6 +130,7 @@
*
* @return a printable representation for this {@code Timestamp}.
*/
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder(256);
// Dump only the first certificate
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/UnresolvedPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/UnresolvedPermission.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/UnresolvedPermission.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/UnresolvedPermission.java Tue Oct 6 14:57:42 2009
@@ -118,6 +118,7 @@
* @return {@code true} if the specified object is equal to this {@code
* UnresolvedPermission}, otherwise {@code false}.
*/
+ @Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -200,6 +201,7 @@
* @see Object#equals(Object)
* @see UnresolvedPermission#equals(Object)
*/
+ @Override
public int hashCode() {
if (hash == 0) {
hash = getName().hashCode();
@@ -220,6 +222,7 @@
*
* @return an empty string, indicating that there are no actions.
*/
+ @Override
public String getActions() {
return ""; //$NON-NLS-1$
}
@@ -287,6 +290,7 @@
* the permission to check.
* @return always {@code false}
*/
+ @Override
public boolean implies(Permission permission) {
return false;
}
@@ -298,6 +302,7 @@
*
* @return a printable representation for this {@code UnresolvedPermission}.
*/
+ @Override
public String toString() {
return "(unresolved " + type + " " + name + " " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ actions + ")"; //$NON-NLS-1$
@@ -310,6 +315,7 @@
* @return a new PermissionCollection for holding {@code
* UnresolvedPermission} objects.
*/
+ @Override
public PermissionCollection newPermissionCollection() {
return new UnresolvedPermissionCollection();
}
Propchange: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/
('svn:ignore' removed)
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/makefile?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/unix/makefile Tue Oct 6 14:57:42 2009
@@ -22,7 +22,7 @@
BUILDFILES = \
$(SHAREDSUB)security_copyright.o getUnixSystemRandom.o
-DLLNAME = ../libhysecurity$(HY_SHLIB_SUFFIX)
+DLLNAME = $(DLLPATH)libhysecurity$(HY_SHLIB_SUFFIX)
EXPNAME = HYSECURITY_0.1
MDLLIBFILES += $(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX)
Modified: harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/src/main/native/security/windows/makefile Tue Oct 6 14:57:42 2009
@@ -20,7 +20,7 @@
!include <$(HY_HDK)\build\make\defines.mak>
LIBBASE=hysecurity
-DLLNAME=..\$(LIBBASE).dll
+DLLNAME=$(DLLPATH)$(LIBBASE).dll
LIBNAME=$(LIBPATH)$(LIBBASE).lib
BUILDFILES = $(SHAREDSUB)security_copyright.obj getWindowsRandom.obj
VIRTFILES = $(LIBBASE).res
Modified: harmony/enhanced/classlib/branches/java6/modules/sound/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sound/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sound/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sound/build.xml Tue Oct 6 14:57:42 2009
@@ -81,6 +81,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/sound.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/sound.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/sound.jar"
manifest="META-INF/MANIFEST.MF"
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/build.xml Tue Oct 6 14:57:42 2009
@@ -95,6 +95,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/sql.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/sql.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/sql.jar"
manifest="META-INF/MANIFEST.MF"
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Date.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Date.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Date.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Date.java Tue Oct 6 14:57:42 2009
@@ -167,6 +167,7 @@
* "yyyy-mm-dd"}.
*/
@Override
+ @SuppressWarnings("deprecation")
public String toString() {
StringBuilder sb = new StringBuilder(10);
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/ResultSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/ResultSet.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/ResultSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/ResultSet.java Tue Oct 6 14:57:42 2009
@@ -1933,7 +1933,7 @@
* Determines whether the last column read from this {@code ResultSet}
* contained SQL {@code NULL}.
*
- * @return {@code {@code true} if the last column contained SQL {@code
+ * @return {@code true} if the last column contained SQL {@code
* NULL}, {@code false} otherwise
* @throws SQLException
* if a database error happens.
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Time.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Time.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Time.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Time.java Tue Oct 6 14:57:42 2009
@@ -47,7 +47,6 @@
* @param theSecond
* a value in the range {@code [0,59]}.
*/
- @SuppressWarnings("deprecation")
@Deprecated
public Time(int theHour, int theMinute, int theSecond) {
super(70, 0, 1, theHour, theMinute, theSecond);
@@ -72,7 +71,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getDate() {
@@ -86,7 +84,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getDay() {
@@ -100,7 +97,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getMonth() {
@@ -114,7 +110,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public int getYear() {
@@ -127,7 +122,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setDate(int i) {
@@ -140,7 +134,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setMonth(int i) {
@@ -153,7 +146,6 @@
* @throws IllegalArgumentException
* if this method is called.
*/
- @SuppressWarnings("deprecation")
@Deprecated
@Override
public void setYear(int i) {
@@ -182,6 +174,7 @@
* format: {@code HH:mm:ss}
*/
@Override
+ @SuppressWarnings("deprecation")
public String toString() {
StringBuilder sb = new StringBuilder(8);
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Timestamp.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Timestamp.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Timestamp.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/java/sql/Timestamp.java Tue Oct 6 14:57:42 2009
@@ -77,7 +77,6 @@
* @throws IllegalArgumentException
* if any of the parameters is out of range.
*/
- @SuppressWarnings("deprecation")
@Deprecated
public Timestamp(int theYear, int theMonth, int theDate, int theHour,
int theMinute, int theSecond, int theNano) {
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java Tue Oct 6 14:57:42 2009
@@ -40,11 +40,20 @@
* Applications can also use it to add and remove SyncProviders at runtime.
*/
public class SyncFactory {
- public static String ROWSET_SYNC_PROVIDER = "rowset.provider.classname"; //$NON-NLS-1$
+ /**
+ * The property name for the synchronization provider's implementation class.
+ */
+ public static final String ROWSET_SYNC_PROVIDER = "rowset.provider.classname"; //$NON-NLS-1$
- public static String ROWSET_SYNC_VENDOR = "rowset.provider.vendor"; //$NON-NLS-1$
+ /**
+ * The property name for the synchronization provider's vendor name.
+ */
+ public static final String ROWSET_SYNC_VENDOR = "rowset.provider.vendor"; //$NON-NLS-1$
- public static String ROWSET_SYNC_PROVIDER_VERSION = "rowset.provider.version"; //$NON-NLS-1$
+ /**
+ * The property name for the synchronization provider's version information.
+ */
+ public static final String ROWSET_SYNC_PROVIDER_VERSION = "rowset.provider.version"; //$NON-NLS-1$
private static SyncFactory instance = new SyncFactory();
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java Tue Oct 6 14:57:42 2009
@@ -21,27 +21,27 @@
import javax.sql.RowSetWriter;
public abstract class SyncProvider {
- public static int GRADE_NONE = 1;
+ public static final int GRADE_NONE = 1;
- public static int GRADE_CHECK_MODIFIED_AT_COMMIT = 2;
+ public static final int GRADE_CHECK_MODIFIED_AT_COMMIT = 2;
- public static int GRADE_CHECK_ALL_AT_COMMIT = 3;
+ public static final int GRADE_CHECK_ALL_AT_COMMIT = 3;
- public static int GRADE_LOCK_WHEN_MODIFIED = 4;
+ public static final int GRADE_LOCK_WHEN_MODIFIED = 4;
- public static int GRADE_LOCK_WHEN_LOADED = 5;
+ public static final int GRADE_LOCK_WHEN_LOADED = 5;
- public static int DATASOURCE_NO_LOCK = 1;
+ public static final int DATASOURCE_NO_LOCK = 1;
- public static int DATASOURCE_ROW_LOCK = 2;
+ public static final int DATASOURCE_ROW_LOCK = 2;
- public static int DATASOURCE_TABLE_LOCK = 3;
+ public static final int DATASOURCE_TABLE_LOCK = 3;
- public static int DATASOURCE_DB_LOCK = 4;
+ public static final int DATASOURCE_DB_LOCK = 4;
- public static int UPDATABLE_VIEW_SYNC = 5;
+ public static final int UPDATABLE_VIEW_SYNC = 5;
- public static int NONUPDATABLE_VIEW_SYNC = 6;
+ public static final int NONUPDATABLE_VIEW_SYNC = 6;
public SyncProvider() {
super();
Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml Tue Oct 6 14:57:42 2009
@@ -81,6 +81,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/suncompat.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/suncompat.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/suncompat.jar"
manifest="META-INF/MANIFEST.MF"
Modified: harmony/enhanced/classlib/branches/java6/modules/swing/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/build.xml Tue Oct 6 14:57:42 2009
@@ -94,6 +94,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/swing.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/swing.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/swing.jar"
manifest="META-INF/MANIFEST.MF"
Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 6 14:57:42 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-814402
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-822279
Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 6 14:57:42 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-814402
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-822279
Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 6 14:57:42 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-814402
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-822279
Modified: harmony/enhanced/classlib/branches/java6/modules/text/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/build.xml Tue Oct 6 14:57:42 2009
@@ -81,6 +81,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/text.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/text.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/text.jar"
manifest="META-INF/MANIFEST.MF"
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml Tue Oct 6 14:57:42 2009
@@ -81,6 +81,13 @@
</javac>
</target>
+ <target name="findbugs" depends="build-jar">
+ <run-findBugs
+ jarFile="${hy.jdk}/jre/lib/boot/x-net.jar"
+ excludeFilter="make/findbugs-exclude-filter.xml"
+ outputFile="${findBugs.report}/x-net.xml"/>
+ </target>
+
<target name="build-jar" depends="svn-info,class-patternset">
<jar destfile="${hy.jdk}/jre/lib/boot/x-net.jar"
manifest="META-INF/MANIFEST.MF"
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/CipherSuite.java Tue Oct 6 14:57:42 2009
@@ -557,6 +557,14 @@
}
return false;
}
+
+ /**
+ * Returns the hash for this instance.
+ */
+ @Override
+ public int hashCode() {
+ return cipherSuiteCode[0] + cipherSuiteCode[1];
+ }
/**
* Returns cipher algorithm name
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Finished.java Tue Oct 6 14:57:42 2009
@@ -52,7 +52,6 @@
throws IOException {
if (length == 12 || length == 36) {
data = in.read(length);
- length = data.length;
} else {
fatalAlert(AlertProtocol.DECODE_ERROR, "DECODE ERROR: incorrect Finished");
}
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/ProtocolVersion.java Tue Oct 6 14:57:42 2009
@@ -155,4 +155,12 @@
}
return false;
}
+
+ /**
+ * Returns the hash of the receiver.
+ */
+ @Override
+ public int hashCode() {
+ return version[0] + version[1];
+ }
}
\ No newline at end of file
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLInputStream.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLInputStream.java Tue Oct 6 14:57:42 2009
@@ -94,10 +94,10 @@
* Reads and returns uint64 value.
*/
public long readUint64() throws IOException {
- return (read() << 56) | (read() << 48)
- | (read() << 40) | (read() << 32)
- | (read() << 24) | (read() << 16)
- | (read() << 8) | (read() & 0x00FF);
+ return ((long) read() << 56) | ((long) read() << 48)
+ | ((long) read() << 40) | ((long) read() << 32)
+ | (read() << 24) | (read() << 16) | (read() << 8)
+ | (read() & 0x00FF);
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java?rev=822302&r1=822301&r2=822302&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java Tue Oct 6 14:57:42 2009
@@ -93,11 +93,11 @@
timeout = seconds * 1000;
// Check timeouts and remove expired sessions
- SSLSessionImpl ses;
for (Enumeration<IdKey> en = sessions.keys(); en.hasMoreElements();) {
- ses = (sessions.get(en.nextElement()));
+ IdKey key = en.nextElement();
+ SSLSessionImpl ses = (sessions.get(key));
if (!ses.isValid()) {
- sessions.remove(ses.getId());
+ sessions.remove(key);
}
}
}