Hi,

Will change it to make it unmodifable.

Seán.


> -----Original Message-----
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: 20 February 2007 15:23
> To: [email protected]
> 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
> 
> 
> 
> 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, [EMAIL PROTECTED] 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/WSDL
> Manager.java
> > 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl1
> 1/WSDLManager
> >Impl.java
> >
> > Modified:
> > 
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDL
> Manager.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/WSDL
> Manager.java
> > (original) +++
> > 
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDL
> Manager.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/wsdl1
> 1/WSDLManager
> >Impl.java URL:
> > 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/m
ain/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
[EMAIL PROTECTED]

Reply via email to