cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <daniel.k...@iona.com>
Subject Re: svn commit: r509262 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Date Tue, 20 Feb 2007 15:23:15 GMT

I'm -1 on this commit.

In the WSDLManagerImpl, we go to a lot of work to make sure the definitionsMap 
is properly serialized.   This commit throws that completely out the window 
allowing direct access to the map outside the class.

The getDefinitions() call needs to be changed to return a copy of the map or 
use Collections.unmodifiableMap(..) to create a readonly version.


Dan


On Monday 19 February 2007 12:26, seanoc@apache.org wrote:
> Author: seanoc
> Date: Mon Feb 19 09:26:22 2007
> New Revision: 509262
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=509262
> Log:
> Added method to allow access to the definitions map.
>
> Modified:
>    
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManager
>Impl.java
>
> Modified:
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
> URL:
> http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apac
>he/cxf/wsdl/WSDLManager.java?view=diff&rev=509262&r1=509261&r2=509262
> ===========================================================================
>=== ---
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
> (original) +++
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
> Mon Feb 19 09:26:22 2007 @@ -20,6 +20,7 @@
>  package org.apache.cxf.wsdl;
>
>  import java.net.URL;
> +import java.util.WeakHashMap;
>
>  import javax.wsdl.Definition;
>  import javax.wsdl.WSDLException;
> @@ -83,5 +84,11 @@
>       * @param wsdl
>       */
>      void addDefinition(Object key, Definition wsdl);
> +
> +    /**
> +     *
> +     * @return all Definitions in the map
> +     */
> +    WeakHashMap<Object, Definition> getDefinitions();
>
>  }
>
> Modified:
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManager
>Impl.java URL:
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/
>apache/cxf/wsdl11/WSDLManagerImpl.java?view=diff&rev=509262&r1=509261&r2=509
>262
> ===========================================================================
>=== ---
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManager
>Impl.java (original) +++
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManager
>Impl.java Mon Feb 19 09:26:22 2007 @@ -90,6 +90,12 @@
>      public WSDLFactory getWSDLFactory() {
>          return factory;
>      }
> +
> +    public WeakHashMap<Object, Definition> getDefinitions() {
> +        synchronized (definitionsMap) {
> +            return definitionsMap;
> +        }
> +    }
>
>      /*
>       * (non-Javadoc)

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com

Mime
View raw message