harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r638188 - in /harmony/enhanced/classlib/trunk/modules/security/src: main/java/common/java/security/Security.java test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
Date Tue, 18 Mar 2008 03:09:51 GMT
Author: tonywu
Date: Mon Mar 17 20:09:50 2008
New Revision: 638188

URL: http://svn.apache.org/viewvc?rev=638188&view=rev
Log:
Security property should not have the whitespace at the end

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
    harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java?rev=638188&r1=638187&r2=638188&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
Mon Mar 17 20:09:50 2008
@@ -361,7 +361,11 @@
         if (sm != null) {
             sm.checkSecurityAccess("getProperty." + key); //$NON-NLS-1$
         }
-        return secprops.getProperty(key);
+        String property = secprops.getProperty(key);
+        if (property != null) {
+            property = property.trim();
+        }
+        return property;
     }
 
 	/**

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java?rev=638188&r1=638187&r2=638188&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/SecurityTest.java
Mon Mar 17 20:09:50 2008
@@ -324,6 +324,9 @@
             fail("No expected NullPointerException.");
         } catch (NullPointerException e) {
         }
+        
+        Security.setProperty("myprop","test white space    ");
+        assertEquals("test white space", Security.getProperty("myprop"));
     }
 
     /**



Mime
View raw message