[jboss-cvs] JBossAS SVN: r78093 - in projects/aop/trunk/aop: src/main/org/jboss/aop/util and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Sep 5 12:16:50 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-09-05 12:16:50 -0400 (Fri, 05 Sep 2008)
New Revision: 78093

Added:
   projects/aop/trunk/aop/src/main/org/jboss/aop/util/UnmodifiableLinkedHashMap.java
Modified:
   projects/aop/trunk/aop/pom.xml
Log:
[JBAOP-632] Attempt to fix ConcurrentModificationException. Replace the internal collections in ClassifiedBindingCollection with CopyOnWriteArraySets, and initialise those when needed. As part of this replace the use of synchronized with read/write locks

Modified: projects/aop/trunk/aop/pom.xml
===================================================================
--- projects/aop/trunk/aop/pom.xml	2008-09-05 16:12:02 UTC (rev 78092)
+++ projects/aop/trunk/aop/pom.xml	2008-09-05 16:16:50 UTC (rev 78093)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.jboss.aop</groupId>
     <artifactId>jboss-aop-parent</artifactId>
-    <version>2.0.0.CR16</version>
+    <version>2.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jboss.aop</groupId>

Added: projects/aop/trunk/aop/src/main/org/jboss/aop/util/UnmodifiableLinkedHashMap.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/util/UnmodifiableLinkedHashMap.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/util/UnmodifiableLinkedHashMap.java	2008-09-05 16:16:50 UTC (rev 78093)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.aop.util;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class UnmodifiableLinkedHashMap<K, V> extends LinkedHashMap<K, V>
+{
+   private static final long serialVersionUID = 1L;
+   
+   public UnmodifiableLinkedHashMap(LinkedHashMap<K, V> map)
+   {
+      super(map);
+   }
+
+   @Override
+   public void clear()
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public V put(K key, V value)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public void putAll(Map<? extends K, ? extends V> m)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   @Override
+   public V remove(Object key)
+   {
+      throw new UnsupportedOperationException();
+   }
+}




More information about the jboss-cvs-commits mailing list