openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: svn commit: r800563 - OPENJPA-1163
Date Mon, 03 Aug 2009 21:26:53 GMT
Any doc updates for this new AutoOff config option?


-Donald

mikedd@apache.org wrote:
> Author: mikedd
> Date: Mon Aug  3 21:04:50 2009
> New Revision: 800563
> 
> URL: http://svn.apache.org/viewvc?rev=800563&view=rev
> Log:
> OPENJPA-1163:
> Add configuration option that allows the elements in a persistent map to be treated as
the owners of the relationship (ie updates to the hashmap can add elements without removing
old ones). 
> Submitted By : Ravi Palacherla
> 
> Modified:
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyCollection.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManager.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
>     openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyMap.java
>     openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/util/TestProxyManager.java
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/Compatibility.java
Mon Aug  3 21:04:50 2009
> @@ -60,6 +60,7 @@
>      private boolean _useJPA2DefaultOrderColumnName = true;
>      private boolean _copyOnDetach = false;
>      private boolean _privatePersistentProperties = false;
> +    private boolean _autoOff = true;
>      
>      /**
>       * Whether to require exact identity value types when creating object
> @@ -76,6 +77,22 @@
>      public void setStrictIdentityValues(boolean strictVals) {
>          _strictIdValues = strictVals;
>      }
> +    
> +    /**
> +     * Whether to turn collection/map tracing off in case of more number of modifications.
> +     * Defaults to true.
> +     */
> +    public boolean getAutoOff() {
> +        return _autoOff;
> +    }
> +
> +    /**
> +     * Whether to turn collection/map tracing off in case of more number of modifications.
> +     * Defaults to true.
> +     */
> +    public void setAutoOff(boolean autoOff) {
> +        _autoOff = autoOff;
> +    }
>  
>      /**
>       * Whether to interpret quoted numbers in query strings as numbers.
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachManager.java
Mon Aug  3 21:04:50 2009
> @@ -743,7 +743,9 @@
>                          newVal = _proxy.newCollectionProxy(fmd.getProxyType(),
>                              fmd.getElement().getDeclaredType(),
>                              fmd.getInitializer() instanceof Comparator ?
> -                            (Comparator) fmd.getInitializer() : null);
> +                            (Comparator) fmd.getInitializer() : null,
> +                            sm.getBroker().getConfiguration().
> +                            getCompatibilityInstance().getAutoOff());
>                          ((Collection) newVal).addAll((Collection) curVal);
>                      } else
>                          newVal = _proxy.copyCollection((Collection) curVal);
> @@ -761,7 +763,9 @@
>                              fmd.getKey().getDeclaredType(),
>                              fmd.getElement().getDeclaredType(),
>                              fmd.getInitializer() instanceof Comparator ?
> -                                (Comparator) fmd.getInitializer() : null);
> +                                (Comparator) fmd.getInitializer() : null,
> +                                sm.getBroker().getConfiguration().
> +                                getCompatibilityInstance().getAutoOff());
>                          ((Map) newVal).putAll((Map) curVal);
>                      } else
>                          newVal = _proxy.copyMap((Map) curVal);
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
Mon Aug  3 21:04:50 2009
> @@ -125,7 +125,9 @@
>                      return false;
>                  proxy = checkProxy();
>                  if (proxy == null) {
> -                    proxy = getProxyManager().newCustomProxy(objval);
> +                    proxy = getProxyManager().newCustomProxy(objval,
> +                        _sm.getBroker().getConfiguration().
> +                        getCompatibilityInstance().getAutoOff());
>                      ret = proxy != null;
>                  }
>                  break;
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Mon Aug  3 21:04:50 2009
> @@ -1813,12 +1813,14 @@
>              case JavaTypes.COLLECTION:
>                  return mgr.newCollectionProxy(fmd.getProxyType(),
>                      fmd.getElement().getDeclaredType(),
> -                    init instanceof Comparator ? (Comparator) init : null);
> +                    init instanceof Comparator ? (Comparator) init : null,
> +                        _broker.getConfiguration().getCompatibilityInstance().getAutoOff());
>              case JavaTypes.MAP:
>                  return mgr.newMapProxy(fmd.getProxyType(),
>                      fmd.getKey().getDeclaredType(),
>                      fmd.getElement().getDeclaredType(),
> -                    init instanceof Comparator ? (Comparator) init : null);
> +                    init instanceof Comparator ? (Comparator) init : null,
> +                        _broker.getConfiguration().getCompatibilityInstance().getAutoOff());
>          }
>          return null;
>      }
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyCollection.java
Mon Aug  3 21:04:50 2009
> @@ -69,7 +69,7 @@
>       */
>      public AbstractLRSProxyCollection(Class elementType, boolean ordered) {
>          _elementType = elementType;
> -        _ct = new CollectionChangeTrackerImpl(this, false, ordered);
> +        _ct = new CollectionChangeTrackerImpl(this, false, ordered,false);
>          _ct.setAutoOff(false);
>      }
>  
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/AbstractLRSProxyMap.java
Mon Aug  3 21:04:50 2009
> @@ -73,7 +73,7 @@
>      public AbstractLRSProxyMap(Class<K> keyType, Class<V> valueType) {
>          _keyType = keyType;
>          _valueType = valueType;
> -        _ct = new MapChangeTrackerImpl(this);
> +        _ct = new MapChangeTrackerImpl(this,false);
>          _ct.setAutoOff(false);
>      }
>  
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/CollectionChangeTrackerImpl.java
Mon Aug  3 21:04:50 2009
> @@ -43,10 +43,11 @@
>       * @param order true if the collection is ordered, false otherwise
>       */
>      public CollectionChangeTrackerImpl(Collection coll, boolean dups,
> -        boolean order) {
> +        boolean order,boolean autoOff) {
>          _coll = coll;
>          _dups = dups;
>          _order = order;
> +        this.setAutoOff(autoOff);
>      }
>  
>      /**
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/MapChangeTrackerImpl.java
Mon Aug  3 21:04:50 2009
> @@ -36,8 +36,9 @@
>      /**
>       * Constructor; supply delegate map.
>       */
> -    public MapChangeTrackerImpl(Map map) {
> +    public MapChangeTrackerImpl(Map map, boolean autoOff) {
>          _map = map;
> +        this.setAutoOff(autoOff);
>      }
>  
>      public boolean getTrackKeys() {
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyCollection.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyCollection.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyCollection.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyCollection.java
Mon Aug  3 21:04:50 2009
> @@ -38,5 +38,5 @@
>       * Create a new instance of this proxy type.
>       */
>      public ProxyCollection newInstance(Class elementType, Comparator comp,
> -        boolean trackChanges);
> +        boolean trackChanges, boolean autoOff);
>  }
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManager.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManager.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManager.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManager.java
Mon Aug  3 21:04:50 2009
> @@ -82,7 +82,7 @@
>       * element type and will use the given comparator, if it is not null.
>       */
>      public Proxy newCollectionProxy(Class type, Class elementType,
> -        Comparator compare);
> +        Comparator compare, boolean autoOff);
>  
>      /**
>       * Return a new map of the same type as the given one
> @@ -96,7 +96,7 @@
>       * keyType/valueType, and will use the given comparator, if it is not null.
>       */
>      public Proxy newMapProxy(Class type, Class keyType, Class valueType,
> -        Comparator compare);
> +        Comparator compare, boolean autoOff);
>  
>      /**
>       * Return a copy of the given object with the same information, or null if
> @@ -112,5 +112,5 @@
>       *
>       * @since 0.2.5
>       */
> -    public Proxy newCustomProxy (Object obj);
> +    public Proxy newCustomProxy (Object obj, boolean autoOff);
>  }
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyManagerImpl.java
Mon Aug  3 21:04:50 2009
> @@ -184,11 +184,11 @@
>      }
>  
>      public Proxy newCollectionProxy(Class type, Class elementType,
> -        Comparator compare) {
> +        Comparator compare, boolean autoOff) {
>          type = toProxyableCollectionType(type);
>          ProxyCollection proxy = getFactoryProxyCollection(type);
>          return proxy.newInstance((_assertType) ? elementType : null, compare,
> -            _trackChanges);
> +            _trackChanges, autoOff);
>      }
>  
>      public Map copyMap(Map orig) {
> @@ -202,11 +202,11 @@
>      }
>  
>      public Proxy newMapProxy(Class type, Class keyType, 
> -        Class elementType, Comparator compare) {
> +        Class elementType, Comparator compare,boolean autoOff) {
>          type = toProxyableMapType(type);
>          ProxyMap proxy = getFactoryProxyMap(type);
>          return proxy.newInstance((_assertType) ? keyType : null, 
> -            (_assertType) ? elementType : null, compare, _trackChanges);
> +            (_assertType) ? elementType : null, compare, _trackChanges, autoOff);
>      }
>  
>      public Date copyDate(Date orig) {
> @@ -263,7 +263,7 @@
>          return (proxy == null) ? null : proxy.copy(orig); 
>      }
>  
> -    public Proxy newCustomProxy(Object orig) {
> +    public Proxy newCustomProxy(Object orig, boolean autoOff) {
>          if (orig == null)
>              return null;
>          if (orig instanceof Proxy)
> @@ -274,14 +274,14 @@
>              Comparator comp = (orig instanceof SortedSet) 
>                  ? ((SortedSet) orig).comparator() : null;
>              Collection c = (Collection) newCollectionProxy(orig.getClass(), 
> -                null, comp); 
> +                null, comp, autoOff); 
>              c.addAll((Collection) orig);
>              return (Proxy) c;
>          }
>          if (orig instanceof Map) {
>              Comparator comp = (orig instanceof SortedMap) 
>                  ? ((SortedMap) orig).comparator() : null;
> -            Map m = (Map) newMapProxy(orig.getClass(), null, null, comp);
> +            Map m = (Map) newMapProxy(orig.getClass(), null, null, comp, autoOff);
>              m.putAll((Map) orig);
>              return (Proxy) m;
>          }
> @@ -814,7 +814,7 @@
>  
>          // new instance factory
>          m = bc.declareMethod("newInstance", ProxyCollection.class, 
> -            new Class[] { Class.class, Comparator.class, boolean.class });
> +            new Class[] { Class.class, Comparator.class, boolean.class, boolean.class
});
>          m.makePublic();
>          code = m.getCode(true);
>  
> @@ -842,9 +842,10 @@
>          code.aload().setLocal(ret);
>          code.constant().setValue(allowsDuplicates(type));
>          code.constant().setValue(isOrdered(type));
> +        code.aload().setParam(3);
>          code.invokespecial().setMethod(CollectionChangeTrackerImpl.class, 
>              "<init>", void.class, new Class[] { Collection.class, 
> -            boolean.class, boolean.class });
> +            boolean.class, boolean.class, boolean.class });
>          code.putfield().setField(changeTracker);
>  
>          ifins.setTarget(code.aload().setLocal(ret));
> @@ -948,7 +949,7 @@
>          // new instance factory
>          m = bc.declareMethod("newInstance", ProxyMap.class, 
>              new Class[] { Class.class, Class.class, Comparator.class, 
> -            boolean.class });
> +            boolean.class,boolean.class });
>          m.makePublic();
>          code = m.getCode(true);
>  
> @@ -977,8 +978,9 @@
>          code.anew().setType(MapChangeTrackerImpl.class);
>          code.dup();
>          code.aload().setLocal(ret);
> +        code.aload().setParam(4);
>          code.invokespecial().setMethod(MapChangeTrackerImpl.class, 
> -            "<init>", void.class, new Class[] { Map.class });
> +            "<init>", void.class, new Class[] { Map.class, boolean.class });
>          code.putfield().setField(changeTracker);
>  
>          ifins.setTarget(code.aload().setLocal(ret));
> 
> Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyMap.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyMap.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyMap.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ProxyMap.java
Mon Aug  3 21:04:50 2009
> @@ -43,5 +43,5 @@
>       * Create a new instance of this proxy type.
>       */
>      public ProxyMap newInstance(Class keyType, Class valueType,
> -        Comparator compare, boolean trackChanges);
> +        Comparator compare, boolean trackChanges, boolean autoOff);
>  }
> 
> Modified: openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/util/TestProxyManager.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/util/TestProxyManager.java?rev=800563&r1=800562&r2=800563&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/util/TestProxyManager.java
(original)
> +++ openjpa/trunk/openjpa-kernel/src/test/java/org/apache/openjpa/util/TestProxyManager.java
Mon Aug  3 21:04:50 2009
> @@ -173,12 +173,12 @@
>      }
>  
>      public void testCopyProxyCollection() {
> -        List orig = (List) _mgr.newCollectionProxy(ArrayList.class, null, null);
> +        List orig = (List) _mgr.newCollectionProxy(ArrayList.class, null, null,true);
>          populate(orig);
>          assertListsEqual(new ArrayList(orig), (List) _mgr.copyCollection(orig));
>  
>          TreeSet torig = (TreeSet) _mgr.newCollectionProxy(TreeSet.class, null, 
> -            new CustomComparator());
> +            new CustomComparator(),true);
>          assertTrue(torig.comparator() instanceof CustomComparator);
>          populate(torig);
>          assertSortedSetsEqual(new TreeSet(torig), (SortedSet) 
> @@ -189,7 +189,7 @@
>          // List doesn't support clone()
>          
>          TreeSet torig = (TreeSet) _mgr.newCollectionProxy(TreeSet.class, null, 
> -            new CustomComparator());
> +            new CustomComparator(),true);
>          assertTrue(torig.comparator() instanceof CustomComparator);
>          populate(torig);
>          assertSortedSetsEquals(new TreeSet(torig), (SortedSet) torig.clone());
> @@ -197,11 +197,11 @@
>  
>      public void testListMethodsProxied() 
>          throws Exception {
> -        Class proxy = _mgr.newCollectionProxy(ArrayList.class, null, null).
> +        Class proxy = _mgr.newCollectionProxy(ArrayList.class, null, null,true).
>              getClass();
>          assertListMethodsProxied(proxy);
>  
> -        proxy = _mgr.newCollectionProxy(CustomList.class, null, null).
> +        proxy = _mgr.newCollectionProxy(CustomList.class, null, null,true).
>              getClass();
>          assertListMethodsProxied(proxy);
>      }
> @@ -255,19 +255,19 @@
>  
>      public void testSetMethodsProxied() 
>          throws Exception {
> -        Class proxy = _mgr.newCollectionProxy(HashSet.class, null, null).
> +        Class proxy = _mgr.newCollectionProxy(HashSet.class, null, null,true).
>              getClass();
>          assertCollectionMethodsProxied(proxy);
>  
> -        proxy = _mgr.newCollectionProxy(CustomSet.class, null, null).getClass();
> +        proxy = _mgr.newCollectionProxy(CustomSet.class, null, null,true).getClass();
>          assertCollectionMethodsProxied(proxy);
>  
> -        proxy = _mgr.newCollectionProxy(CustomSortedSet.class, null, null).
> +        proxy = _mgr.newCollectionProxy(CustomSortedSet.class, null, null,true).
>              getClass();
>          assertCollectionMethodsProxied(proxy);
>  
>          proxy = _mgr.newCollectionProxy(CustomComparatorSortedSet.class, null, 
> -            new CustomComparator()).getClass();
> +            new CustomComparator(),true).getClass();
>          assertCollectionMethodsProxied(proxy);
>      }
>  
> @@ -277,7 +277,7 @@
>          if (queue == null)
>              return;
>  
> -        Class proxy = _mgr.newCollectionProxy(LinkedList.class, null, null).
> +        Class proxy = _mgr.newCollectionProxy(LinkedList.class, null, null,true).
>              getClass();
>          assertTrue(queue.isAssignableFrom(proxy));        
>          assertCollectionMethodsProxied(proxy);
> @@ -295,7 +295,7 @@
>  
>      public void testLinkedListMethodsProxied() 
>          throws Exception {
> -        Class proxy = _mgr.newCollectionProxy(LinkedList.class, null, null).
> +        Class proxy = _mgr.newCollectionProxy(LinkedList.class, null, null,true).
>              getClass();
>          assertListMethodsProxied(proxy);
>          assertNotNull(proxy.getDeclaredMethod("addFirst", 
> @@ -308,7 +308,7 @@
>  
>      public void testVectorMethodsProxied() 
>          throws Exception {
> -         Class proxy = _mgr.newCollectionProxy(Vector.class, null, null).
> +         Class proxy = _mgr.newCollectionProxy(Vector.class, null, null,true).
>              getClass();
>          assertListMethodsProxied(proxy);
>          assertNotNull(proxy.getDeclaredMethod("addElement", 
> @@ -326,7 +326,7 @@
>      }
>  
>      public void testListChangeTracker() {
> -        Proxy coll = _mgr.newCollectionProxy(ArrayList.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(ArrayList.class, null, null,true);
>          assertNotNull(coll);
>          assertNotNull(coll.getChangeTracker());
>          assertTrue(coll.getChangeTracker() 
> @@ -338,7 +338,7 @@
>      }
>      
>      public void testSetChangeTracker() {
> -        Proxy coll = _mgr.newCollectionProxy(HashSet.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(HashSet.class, null, null,true);
>          assertNotNull(coll);
>          assertNotNull(coll.getChangeTracker());
>          assertTrue(coll.getChangeTracker() 
> @@ -350,25 +350,25 @@
>      }
>   
>      public void testCollectionInterfaceProxy() {
> -        Proxy coll = _mgr.newCollectionProxy(Collection.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(Collection.class, null, null,true);
>          assertNotNull(coll);
>      }
>  
>      public void testListInterfaceProxy() {
> -        Proxy coll = _mgr.newCollectionProxy(List.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(List.class, null, null,true);
>          assertNotNull(coll);
>          assertTrue(coll instanceof List);
>      }
>  
>      public void testSetInterfaceProxy() {
> -        Proxy coll = _mgr.newCollectionProxy(Set.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(Set.class, null, null,true);
>          assertNotNull(coll);
>          assertTrue(coll instanceof Set);
>          assertFalse(coll instanceof SortedSet);
>      }
>  
>      public void testSortedSetInterfaceProxy() {
> -        Proxy coll = _mgr.newCollectionProxy(SortedSet.class, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(SortedSet.class, null, null,true);
>          assertNotNull(coll);
>          assertTrue(coll instanceof SortedSet);
>      }
> @@ -378,7 +378,7 @@
>          if (queue == null)
>              return;
>  
> -        Proxy coll = _mgr.newCollectionProxy(queue, null, null);
> +        Proxy coll = _mgr.newCollectionProxy(queue, null, null,true);
>          assertNotNull(coll);
>          assertTrue(queue.isInstance(coll));
>      }
> @@ -479,12 +479,12 @@
>      }
>  
>      public void testCopyProxyMap() {
> -        Map orig = (Map) _mgr.newMapProxy(HashMap.class, null, null, null);
> +        Map orig = (Map) _mgr.newMapProxy(HashMap.class, null, null, null,true);
>          populate(orig);
>          assertMapsEqual(new HashMap(orig), (Map) _mgr.copyMap(orig));
>  
>          TreeMap torig = (TreeMap) _mgr.newMapProxy(TreeMap.class, null, null, 
> -            new CustomComparator());
> +            new CustomComparator(),true);
>          assertTrue(torig.comparator() instanceof CustomComparator);
>          populate(torig);
>          assertSortedMapsEqual(new TreeMap(torig), (SortedMap) 
> @@ -495,7 +495,7 @@
>          // Map does not support clone()
>          
>          TreeMap torig = (TreeMap) _mgr.newMapProxy(TreeMap.class, null, null, 
> -            new CustomComparator());
> +            new CustomComparator(),true);
>          assertTrue(torig.comparator() instanceof CustomComparator);
>          populate(torig);
>          assertSortedMapsEquals(new TreeMap(torig), (SortedMap) torig.clone());
> @@ -503,26 +503,26 @@
>  
>      public void testMapMethodsProxied() 
>          throws Exception {
> -        Class proxy = _mgr.newMapProxy(HashMap.class, null, null, null).
> +        Class proxy = _mgr.newMapProxy(HashMap.class, null, null, null,true).
>              getClass();
>          assertMapMethodsProxied(proxy);
>  
> -        proxy = _mgr.newMapProxy(TreeMap.class, null, null, null).getClass();
> +        proxy = _mgr.newMapProxy(TreeMap.class, null, null, null,true).getClass();
>          assertMapMethodsProxied(proxy);
>  
>          proxy = _mgr.newMapProxy(TreeMap.class, null, null, 
> -            new CustomComparator()).getClass();
> +            new CustomComparator(),true).getClass();
>          assertMapMethodsProxied(proxy);
>  
> -        proxy = _mgr.newMapProxy(CustomMap.class, null, null, null).getClass();
> +        proxy = _mgr.newMapProxy(CustomMap.class, null, null, null,true).getClass();
>          assertMapMethodsProxied(proxy);
>  
> -        proxy = _mgr.newMapProxy(CustomSortedMap.class, null, null, null).
> +        proxy = _mgr.newMapProxy(CustomSortedMap.class, null, null, null,true).
>              getClass();
>          assertMapMethodsProxied(proxy);
>  
>          proxy = _mgr.newMapProxy(CustomComparatorSortedMap.class, null, null, 
> -            new CustomComparator()).getClass();
> +            new CustomComparator(),true).getClass();
>          assertMapMethodsProxied(proxy);
>      }
>  
> @@ -554,7 +554,7 @@
>  
>      public void testPropertiesMethodsProxied() 
>          throws Exception {
> -        Class proxy = _mgr.newMapProxy(Properties.class, null, null, null).
> +        Class proxy = _mgr.newMapProxy(Properties.class, null, null, null,true).
>              getClass();
>          assertMapMethodsProxied(proxy);
>          assertNotNull(proxy.getDeclaredMethod("setProperty", 
> @@ -797,7 +797,7 @@
>          NonproxyableBean orig = new NonproxyableBean(1);
>          populate(orig);
>          assertNull(_mgr.copyCustom(orig));
> -        assertNull(_mgr.newCustomProxy(orig));
> +        assertNull(_mgr.newCustomProxy(orig,true));
>      }
>  
>  
> @@ -815,7 +815,7 @@
>      }
>  
>      public void testCopyProxyBean() {
> -        CustomBean orig = (CustomBean) _mgr.newCustomProxy(new CustomBean());
> +        CustomBean orig = (CustomBean) _mgr.newCustomProxy(new CustomBean(),true);
>          populate(orig);
>          CustomBean comp = new CustomBean();
>          populate(comp);
> @@ -824,11 +824,11 @@
>  
>      public void testBeanMethodsProxied()
>          throws Exception {
> -        Class proxy = _mgr.newCustomProxy(new CustomBean()).getClass();
> +        Class proxy = _mgr.newCustomProxy(new CustomBean(),true).getClass();
>          assertBeanMethodsProxied(proxy);
>  
>          proxy = _mgr.newCustomProxy(new CustomCopyConstructorBean
> -            (new CustomBean())).getClass();
> +            (new CustomBean()),true).getClass();
>          assertBeanMethodsProxied(proxy);
>      }
>  
> 
> 
> 

Mime
View raw message