You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2006/06/02 21:59:56 UTC

svn commit: r411284 - /xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java

Author: mullan
Date: Fri Jun  2 12:59:56 2006
New Revision: 411284

URL: http://svn.apache.org/viewvc?rev=411284&view=rev
Log:
Fix findbugs bug:
engineGetPropertyKeys() may expose internal representation by returning 
reference to mutable object

Modified:
    xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java

Modified: xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java?rev=411284&r1=411283&r2=411284&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/resolver/implementations/ResolverDirectHTTP.java Fri Jun  2 12:59:56 2006
@@ -17,8 +17,6 @@
  */
 package org.apache.xml.security.utils.resolver.implementations;
 
-
-
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -65,11 +63,12 @@
                             ResolverDirectHTTP.class.getName());
 
    /** Field properties[] */
-   static final String properties[] = { "http.proxy.host", "http.proxy.port",
-                                        "http.proxy.username",
-                                        "http.proxy.password",
-                                        "http.basic.username",
-                                        "http.basic.password" };
+   private static final String properties[] = 
+	{ "http.proxy.host", "http.proxy.port",
+          "http.proxy.username",
+          "http.proxy.password",
+          "http.basic.username",
+          "http.basic.password" };
 
    /** Field HttpProxyHost */
    private static final int HttpProxyHost = 0;
@@ -280,7 +279,7 @@
     * @inheritDoc 
     */
    public String[] engineGetPropertyKeys() {
-      return ResolverDirectHTTP.properties;
+      return (String[]) ResolverDirectHTTP.properties.clone();
    }
 
    private URI getNewURI(String uri, String BaseURI)