harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r483906 - in /harmony/enhanced/classlib/trunk/modules/x-net/src/main/java: javax/net/ssl/ org/apache/harmony/xnet/provider/jsse/
Date Fri, 08 Dec 2006 10:17:50 GMT
Author: smishura
Date: Fri Dec  8 02:17:49 2006
New Revision: 483906

URL: http://svn.apache.org/viewvc?view=rev&rev=483906
Log:
Fix warnings: AccessController.doPrivileged(new PrivilegedAction<T>)

Modified:
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/DefaultSSLContext.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
    harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/DefaultSSLContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/DefaultSSLContext.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/DefaultSSLContext.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/DefaultSSLContext.java
Fri Dec  8 02:17:49 2006
@@ -43,9 +43,9 @@
 
     public static SSLContext getContext() {
         if (defaultSSLContext == null) {
-            defaultSSLContext = (SSLContext) AccessController
-                    .doPrivileged(new java.security.PrivilegedAction() {
-                        public Object run() {
+            defaultSSLContext = AccessController
+                    .doPrivileged(new java.security.PrivilegedAction<SSLContext>()
{
+                        public SSLContext run() {
                             return findDefault();
                         }
                     });

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/KeyManagerFactory.java
Fri Dec  8 02:17:49 2006
@@ -176,12 +176,11 @@
      *  
      */
     public static final String getDefaultAlgorithm() {
-        return (String) AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                    return Security.getProperty(PROPERTY_NAME);
-                }
-            }
-         );
+        return AccessController
+                .doPrivileged(new java.security.PrivilegedAction<String>() {
+                    public String run() {
+                        return Security.getProperty(PROPERTY_NAME);
+                    }
+                });
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/javax/net/ssl/TrustManagerFactory.java
Fri Dec  8 02:17:49 2006
@@ -173,12 +173,11 @@
      *  
      */
     public static final String getDefaultAlgorithm() {
-        return (String) AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
-                public Object run() {
-                    return Security.getProperty(PROPERTYNAME);
-                }
-            }
-         );
+        return AccessController
+                .doPrivileged(new java.security.PrivilegedAction<String>() {
+                    public String run() {
+                        return Security.getProperty(PROPERTYNAME);
+                    }
+                });
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/JSSEProvider.java
Fri Dec  8 02:17:49 2006
@@ -106,8 +106,8 @@
 
     public JSSEProvider() {
         super("HarmonyJSSE", 1.0, "Harmony JSSE Provider");
-        AccessController.doPrivileged(new java.security.PrivilegedAction() {
-            public Object run() {
+        AccessController.doPrivileged(new java.security.PrivilegedAction<Void>() {
+            public Void run() {
                 put("SSLContext.TLS",
                         "org.apache.harmony.xnet.provider.jsse.SSLContextImpl");
                 put("Alg.Alias.SSLContext.TLSv1", "TLS");

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/KeyManagerFactoryImpl.java
Fri Dec  8 02:17:49 2006
@@ -65,9 +65,9 @@
             }
         } else {
             keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
-            String keyStoreName = (String) AccessController
-                    .doPrivileged(new java.security.PrivilegedAction() {
-                        public Object run() {
+            String keyStoreName = AccessController
+                    .doPrivileged(new java.security.PrivilegedAction<String>() {
+                        public String run() {
                             return System.getProperty("javax.net.ssl.keyStore");
                         }
                     });
@@ -82,9 +82,9 @@
                     throw new KeyStoreException(e);
                 }
             } else {
-                keyStorePwd = (String) AccessController
-                        .doPrivileged(new java.security.PrivilegedAction() {
-                            public Object run() {
+                keyStorePwd = AccessController
+                        .doPrivileged(new java.security.PrivilegedAction<String>()
{
+                            public String run() {
                                 return System
                                         .getProperty("javax.net.ssl.keyStorePassword");
                             }

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/Logger.java
Fri Dec  8 02:17:49 2006
@@ -102,21 +102,12 @@
     
     static {
         try {
-            names = (String[]) AccessController.doPrivileged(
-                    new PrivilegedAction() {
-                        public Object run() {
-                            return System.getProperty("jsse", "").split(",");
-                        }
-                    });
-            /* 1.5:
-            names = AccessController.doPrivileged(
-                    new PrivilegedAction<String[]>() {
+            names = AccessController
+                    .doPrivileged(new PrivilegedAction<String[]>() {
                         public String[] run() {
                             return System.getProperty("jsse", "").split(",");
                         }
-                    }
-                );
-            */
+                    });
         } catch (Exception e) {
             names = new String[0];
         }

Modified: harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java?view=diff&rev=483906&r1=483905&r2=483906
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/TrustManagerFactoryImpl.java
Fri Dec  8 02:17:49 2006
@@ -55,10 +55,11 @@
             keyStore = ks;
         } else {
             keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
-            String keyStoreName = (String) AccessController
-                    .doPrivileged(new java.security.PrivilegedAction() {
-                        public Object run() {
-                            return System.getProperty("javax.net.ssl.trustStore");
+            String keyStoreName = AccessController
+                    .doPrivileged(new java.security.PrivilegedAction<String>() {
+                        public String run() {
+                            return System
+                                    .getProperty("javax.net.ssl.trustStore");
                         }
                     });
             String keyStorePwd = null;
@@ -74,9 +75,9 @@
                     throw new KeyStoreException(e);
                 }
             } else {
-                keyStorePwd = (String) AccessController
-                        .doPrivileged(new java.security.PrivilegedAction() {
-                            public Object run() {
+                keyStorePwd = AccessController
+                        .doPrivileged(new java.security.PrivilegedAction<String>()
{
+                            public String run() {
                                 return System
                                         .getProperty("javax.net.ssl.trustStorePassword");
                             }



Mime
View raw message