JBoss Remoting SVN: r6080 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-31 11:50:46 -0400 (Tue, 31 Aug 2010)
New Revision: 6080
Added:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/CopyOnWriteHashMapTestCase.java
Log:
JBREM-1244: New unit test.
Added: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/CopyOnWriteHashMapTestCase.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/CopyOnWriteHashMapTestCase.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/CopyOnWriteHashMapTestCase.java 2010-08-31 15:50:46 UTC (rev 6080)
@@ -0,0 +1,246 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.remoting3.test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import org.jboss.remoting3.CopyOnWriteHashMapWrapper;
+import org.jboss.xnio.log.Logger;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ *
+ * Copyright Aug 28, 2010
+ */
+@Test(suiteName = "CopyOnWriteHashMap")
+public class CopyOnWriteHashMapTestCase extends RemotingTestBase {
+
+ private static final Logger log = Logger.getLogger(CopyOnWriteHashMapTestCase.class);
+
+ @BeforeMethod
+ public void setUp() {
+ }
+
+ @AfterMethod
+ public void tearDown() throws IOException {
+ }
+
+ @Test
+ public void testIdentityFalse() throws Exception {
+ enter();
+
+ try {
+ doTest(false);
+ log.info(getName() + " PASSES");
+ } finally {
+ exit();
+ }
+ }
+
+ @Test
+ public void testIdentityTrue() throws Exception {
+ enter();
+
+ try {
+ doTest(true);
+ log.info(getName() + " PASSES");
+ } finally {
+ exit();
+ }
+ }
+
+ protected void doTest(boolean identity) {
+ CopyOnWriteHashMapWrapper<Object, Object> map = new CopyOnWriteHashMapWrapper<Object, Object>(identity, new Object());
+
+ // Test putIfAbsent().
+ try {
+ map.putIfAbsent(null, new Object());
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ try {
+ map.putIfAbsent(new Object(), null);
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ Object key1 = new Object();
+ Object value1 = new Object();
+ assertNull(map.putIfAbsent(key1, value1)); // map = {key1=value1}
+ Object value2 = new Object();
+ assertEquals(value1, map.putIfAbsent(key1, value2)); // map = {key1=value1}
+
+ // Test remove().
+ assertFalse(map.remove(null, new Object()));
+ assertFalse(map.remove(new Object(), null));
+ assertFalse(map.remove(key1, value2)); // map = {key1=value1}
+ assertTrue(map.remove(key1, value1)); // map = {}
+ assertNull(map.putIfAbsent(key1, value1)); // map = {key1=value1}
+ Object key2 = new Object();
+ assertFalse(map.remove(key2, value1)); // map = {key1=value1}
+
+ // Test replace(final K key, final V oldValue, final V newValue).
+ assertFalse(map.replace(null, new Object(), new Object()));
+ assertFalse(map.replace(new Object(), null, new Object()));
+ try {
+ map.replace(new Object(), new Object(), null);
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ assertFalse(map.replace(key2, value1, value2)); // map = {key1=value1}
+ assertFalse(map.replace(key1, value2, value2)); // map = {key1=value1}
+ assertTrue(map.replace(key1, value1, value2)); // map = {key1=value2}
+
+ // Test replace(final K key, final V value).
+ assertNull(map.replace(null, new Object()));
+ try {
+ map.replace(new Object(), null);
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ assertNull(map.replace(key2, value1)); // map = {key1=value2}
+ assertEquals(value2, map.replace(key1, value1)); // map = {key1=value1}
+
+ // Test size().
+ assertEquals(1, map.size());
+
+ // Test isEmpty().
+ assertFalse(map.isEmpty());
+ map.remove(key1); // map = {}
+ assertTrue(map.isEmpty());
+
+ // Test containsKey().
+ assertFalse(map.containsKey(key1));
+ map.putIfAbsent(key1, value1); // map = {key1=value1}
+ assertTrue(map.containsKey(key1));
+
+ // Test containsValue().
+ assertFalse(map.containsValue(value2));
+ assertTrue(map.containsValue(value1));
+
+ // Test get().
+ assertNull(map.get(key2));
+ assertEquals(value1, map.get(key1));
+
+ // Test put().
+ try {
+ map.put(null, new Object());
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ try {
+ map.put(new Object(), null);
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ assertNull(map.put(key2, value2)); // map = {key1=value1, key2=value2}
+ assertEquals(value2, map.put(key2, value1)); // map = {key1=value1, key2=value1}
+
+ // Test remove().
+ assertNull(map.remove(null));
+ assertEquals(value1, map.remove(key2)); // map = {key1=value1}
+ assertNull(map.remove(key2));
+
+ // Test putAll().
+ try {
+ map.putAll(null);
+ fail("expected NullPointerException");
+ } catch (NullPointerException e) {
+ log.info("got expected NullPointerException");
+ } catch (Exception e) {
+ fail("expected NullPointerException, got " + e.getClass() + "(" + e.getMessage() + ")");
+ }
+ CopyOnWriteHashMapWrapper<Object, Object> map2 = new CopyOnWriteHashMapWrapper<Object, Object>(identity, new Object());
+ Object key3 = new Object();
+ Object value3 = new Object();
+ Object key4 = new Object();
+ Object value4 = new Object();
+ map2.put(key3, value3);
+ map2.put(key4, value4);
+ map.putAll(map2); // map = {key1=value1, key3=value3, key4=value4}
+ assertEquals(3, map.size());
+ assertEquals(value1, map.get(key1));
+ assertEquals(value3, map.get(key3));
+ assertEquals(value4, map.get(key4));
+
+ // Test clear().
+ map.clear(); // map = {}
+ assertEquals(0, map.size());
+
+ // Test keySet().
+ map.putAll(map2); // map = {key3=value3, key4=value4}
+ Set<Object> keySet = map.keySet();
+ assertEquals(2, keySet.size());
+ assertTrue(keySet.contains(key3));
+ assertTrue(keySet.contains(key4));
+
+ // Test values().
+ Collection<Object> values = map.values();
+ assertEquals(2, values.size());
+ assertTrue(values.contains(value3));
+ assertTrue(values.contains(value4));
+
+ // Test entrySet().
+ Set<Entry<Object, Object>> entrySet = map.entrySet();
+ assertEquals(2, entrySet.size());
+ Iterator<Map.Entry<Object, Object>> it = entrySet.iterator();
+ while (it.hasNext()) {
+ Map.Entry<Object, Object> entry = it.next();
+ Object key = entry.getKey();
+ Object value = entry.getValue();
+ assertTrue(key == key3 && value == value3 || key == key4 && value == value4);
+ }
+ }
+}
14 years, 3 months
JBoss Remoting SVN: r6079 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-31 11:49:46 -0400 (Tue, 31 Aug 2010)
New Revision: 6079
Added:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/CopyOnWriteHashMapWrapper.java
Log:
JBREM-1244: Wrapper for package private class CopyOnWriteHashMap.
Added: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/CopyOnWriteHashMapWrapper.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/CopyOnWriteHashMapWrapper.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/CopyOnWriteHashMapWrapper.java 2010-08-31 15:49:46 UTC (rev 6079)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.remoting3;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ *
+ * Copyright Aug 28, 2010
+ */
+public class CopyOnWriteHashMapWrapper<K, V> implements ConcurrentMap<K, V> {
+ private CopyOnWriteHashMap<K, V> map = new CopyOnWriteHashMap<K, V>();
+
+ public CopyOnWriteHashMapWrapper() {
+ this(new Object());
+ }
+
+ public CopyOnWriteHashMapWrapper(final Object writeLock) {
+ this(false, writeLock);
+ }
+
+ public CopyOnWriteHashMapWrapper(final boolean identity, final Object writeLock) {
+ map = new CopyOnWriteHashMap<K, V>(identity, writeLock);
+ }
+
+ public V putIfAbsent(final K key, final V value) {
+ return map.putIfAbsent(key, value);
+ }
+
+ public boolean remove(final Object key, final Object value) {
+ return map.remove(key, value);
+ }
+
+ public boolean replace(final K key, final V oldValue, final V newValue) {
+ return map.replace(key, oldValue, newValue);
+ }
+
+ public V replace(final K key, final V value) {
+ return map.replace(key, value);
+ }
+
+ public int size() {
+ return map.size();
+ }
+
+ public boolean isEmpty() {
+ return map.isEmpty();
+ }
+
+ public boolean containsKey(final Object key) {
+ return map.containsKey(key);
+ }
+
+ public boolean containsValue(final Object value) {
+ return map.containsValue(value);
+ }
+
+ public V get(final Object key) {
+ return map.get(key);
+ }
+
+ public V put(final K key, final V value) {
+ return map.put(key, value);
+ }
+
+ public V remove(final Object key) {
+ return map.remove(key);
+ }
+
+ public void putAll(final Map<? extends K, ? extends V> orig) {
+ map.putAll(orig);
+ }
+
+ public void clear() {
+ map.clear();
+ }
+
+ public Set<K> keySet() {
+ return map.keySet();
+ }
+
+ public Collection<V> values() {
+ return map.values();
+ }
+
+ public Set<Entry<K, V>> entrySet() {
+ return map.entrySet();
+ }
+}
14 years, 3 months
JBoss Remoting SVN: r6078 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-31 11:48:20 -0400 (Tue, 31 Aug 2010)
New Revision: 6078
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CopyOnWriteHashMap.java
Log:
JBREM-1244: remove() and replace() with current value arguments now test against the current value before updating the map.
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CopyOnWriteHashMap.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CopyOnWriteHashMap.java 2010-08-31 15:12:35 UTC (rev 6077)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CopyOnWriteHashMap.java 2010-08-31 15:48:20 UTC (rev 6078)
@@ -80,7 +80,7 @@
synchronized (writeLock) {
final Map<K, V> map = this.map;
final V old = map.get(key);
- if (old == null) {
+ if (old == null || old != value && !old.equals(value)) {
return false;
}
if (map.size() == 1) {
@@ -102,7 +102,7 @@
synchronized (writeLock) {
final Map<K, V> map = this.map;
final V old = map.get(key);
- if (old == null) {
+ if (old == null || old != oldValue && !old.equals(oldValue)) {
return false;
}
if (map.size() == 1) {
14 years, 3 months
JBoss Remoting SVN: r6077 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-31 11:12:35 -0400 (Tue, 31 Aug 2010)
New Revision: 6077
Modified:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java
Log:
JBREM-1228: Added test for null attachment.
Modified: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java 2010-08-31 02:49:18 UTC (rev 6076)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java 2010-08-31 15:12:35 UTC (rev 6077)
@@ -110,8 +110,12 @@
assertFalse(attachments.removeAttachment(key3, value3));
assertEquals(value4, attachments.getAttachment(key3));
assertTrue(attachments.removeAttachment(key3, new ComparableObject(7)));
- assertNull(attachments.getAttachment(key3));
+ assertNull(attachments.getAttachment(key3));
+ Attachments.Key<Object> key4 = new Attachments.Key<Object>(Object.class);
+ attachments.attach(key4, null);
+ assertNull(attachments.getAttachment(key4));
+
log.info(getName() + " PASSES");
} finally {
exit();
14 years, 3 months
JBoss Remoting SVN: r6076 - remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-30 22:49:18 -0400 (Mon, 30 Aug 2010)
New Revision: 6076
Added:
remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java
Log:
JBREM-1228: New unit test for org.jboss.remoting3.AttachmentsImpl.
Added: remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/test/java/org/jboss/remoting3/test/AttachmentsTestCase.java 2010-08-31 02:49:18 UTC (rev 6076)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.remoting3.test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import org.jboss.remoting3.Attachments;
+import org.jboss.remoting3.Endpoint;
+import org.jboss.remoting3.Remoting;
+import org.jboss.xnio.OptionMap;
+import org.jboss.xnio.log.Logger;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * Tests org.jboss.remoting3.AttachmentsImpl.
+ *
+ * @author <a href="ron.sigal(a)jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright August 27, 2010
+ */
+@Test(suiteName = "Attachments")
+public class AttachmentsTestCase extends RemotingTestBase {
+
+ private static final Logger log = Logger.getLogger(AttachmentsTestCase.class);
+
+ @BeforeMethod
+ public void setUp() {
+ }
+
+ @AfterMethod
+ public void tearDown() throws IOException {
+ }
+
+ @Test
+ public void testAttachments() throws Exception {
+ enter();
+
+ try {
+ Executor executor = new ThreadPoolExecutor(8, 64, 30, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(64));
+ Endpoint endpoint = Remoting.createEndpoint("attachments", executor, OptionMap.EMPTY);
+ Attachments attachments = endpoint.getAttachments();
+ Attachments.Key<Object> key1 = new Attachments.Key<Object>(Object.class);
+ Object value1 = new Object();
+ attachments.attach(key1, value1);
+ assertEquals(value1, attachments.getAttachment(key1));
+
+ Object value2 = new Object();
+ attachments.attachIfAbsent(key1, value2);
+ assertEquals(value1, attachments.getAttachment(key1));
+ Attachments.Key<Object> key2 = new Attachments.Key<Object>(Object.class);
+ attachments.attachIfAbsent(key2, value2);
+ assertEquals(value2, attachments.getAttachment(key2));
+
+ assertFalse(attachments.replaceAttachment(key1, value2, value2));
+ assertEquals(value1, attachments.getAttachment(key1));
+
+ assertTrue(attachments.replaceAttachment(key1, value1, value2));
+ assertEquals(value2, attachments.getAttachment(key1));
+
+ Attachments.Key<Object> key3 = new Attachments.Key<Object>(Object.class);
+ Object value3 = new ComparableObject(3);
+ attachments.attach(key3, value3);
+ Object value4 = new ComparableObject(7);
+ assertFalse(attachments.replaceAttachment(key3, value4, value3));
+ assertEquals(value3, attachments.getAttachment(key3));
+ assertTrue(attachments.replaceAttachment(key3, new ComparableObject(3), value4));
+ assertEquals(value4, attachments.getAttachment(key3));
+
+ assertEquals(value2, attachments.removeAttachment(key1));
+ assertNull(attachments.getAttachment(key1));
+
+ attachments.attach(key1, value1);
+ assertFalse(attachments.removeAttachment(key1, value2));
+ assertEquals(value1, attachments.getAttachment(key1));
+ assertTrue(attachments.removeAttachment(key1, value1));
+ assertNull(attachments.getAttachment(key1));
+
+ assertFalse(attachments.removeAttachment(key3, value3));
+ assertEquals(value4, attachments.getAttachment(key3));
+ assertTrue(attachments.removeAttachment(key3, new ComparableObject(7)));
+ assertNull(attachments.getAttachment(key3));
+
+ log.info(getName() + " PASSES");
+ } finally {
+ exit();
+ }
+ }
+
+ static class ComparableObject {
+ private final int secret;
+
+ public ComparableObject(int secret) {
+ this.secret = secret;
+ }
+
+ public boolean equals(Object other) {
+ if (! (other instanceof ComparableObject)) {
+ return false;
+ }
+ return secret == ((ComparableObject) other).secret;
+ }
+ }
+}
14 years, 3 months
JBoss Remoting SVN: r6075 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-30 22:46:16 -0400 (Mon, 30 Aug 2010)
New Revision: 6075
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/AttachmentsImpl.java
Log:
JBREM-1243: Switched return of true and false in removeAttachment().
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/AttachmentsImpl.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/AttachmentsImpl.java 2010-08-11 16:17:23 UTC (rev 6074)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/AttachmentsImpl.java 2010-08-31 02:46:16 UTC (rev 6075)
@@ -75,9 +75,9 @@
final Object old = map.get(key);
if (value == old || value != null && value.equals(old)) {
map.remove(key);
- return false;
+ return true;
}
- return true;
+ return false;
}
}
14 years, 3 months
JBoss Remoting SVN: r6074 - remoting2/tags.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-11 12:17:23 -0400 (Wed, 11 Aug 2010)
New Revision: 6074
Added:
remoting2/tags/2.2.3-SP3/
Log:
Copied: remoting2/tags/2.2.3-SP3 (from rev 6073, remoting2/branches/2.2)
14 years, 4 months
JBoss Remoting SVN: r6073 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-05 16:24:09 -0400 (Thu, 05 Aug 2010)
New Revision: 6073
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml
Log:
JBREM-1241: Reverting to correct contents.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml 2010-08-05 20:23:55 UTC (rev 6072)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/WEB-INF/web.xml 2010-08-05 20:24:09 UTC (rev 6073)
@@ -4,7 +4,7 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml 4837 2009-01-18 05:40:05Z ron.sigal(a)jboss.com $
+$Id: web.xml 3291 2008-01-15 05:03:53Z ron.sigal(a)jboss.com $
-->
<web-app>
<servlet>
@@ -15,9 +15,9 @@
</description>
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
- <param-name>locatorUrl</param-name>
- <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking</param-value>
- <description>The servlet server invoker locator url</description>
+ <param-name>invokerName</param-name>
+ <param-value>jboss.remoting:service=invoker,transport=servlet</param-value>
+ <description>The servlet server invoker</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
@@ -25,5 +25,4 @@
<servlet-name>ServerInvokerServlet</servlet-name>
<url-pattern>/ServerInvokerServlet/*</url-pattern>
</servlet-mapping>
-</web-app>
-
+</web-app>
\ No newline at end of file
14 years, 4 months
JBoss Remoting SVN: r6072 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-05 16:23:55 -0400 (Thu, 05 Aug 2010)
New Revision: 6072
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF/web.xml
Log:
JBREM-1241: Reverting to correct contents.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF/web.xml 2010-08-05 20:14:51 UTC (rev 6071)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/nopreservelines/WEB-INF/web.xml 2010-08-05 20:23:55 UTC (rev 6072)
@@ -4,7 +4,7 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml 4837 2009-01-18 05:40:05Z ron.sigal(a)jboss.com $
+$Id: web.xml 3291 2008-01-15 05:03:53Z ron.sigal(a)jboss.com $
-->
<web-app>
<servlet>
@@ -15,9 +15,9 @@
</description>
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
- <param-name>locatorUrl</param-name>
- <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking</param-value>
- <description>The servlet server invoker locator url</description>
+ <param-name>invokerName</param-name>
+ <param-value>jboss.remoting:service=invoker,transport=servlet</param-value>
+ <description>The servlet server invoker</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
@@ -25,5 +25,4 @@
<servlet-name>ServerInvokerServlet</servlet-name>
<url-pattern>/ServerInvokerServlet/*</url-pattern>
</servlet-mapping>
-</web-app>
-
+</web-app>
\ No newline at end of file
14 years, 4 months
JBoss Remoting SVN: r6071 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/WEB-INF.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2010-08-05 16:14:51 -0400 (Thu, 05 Aug 2010)
New Revision: 6071
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/WEB-INF/web.xml
Log:
JBREM-1241: Reverting to correct contents.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/WEB-INF/web.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/WEB-INF/web.xml 2010-08-05 20:12:12 UTC (rev 6070)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/marshal/noconfig/WEB-INF/web.xml 2010-08-05 20:14:51 UTC (rev 6071)
@@ -4,7 +4,7 @@
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- The the JBossRemoting server invoker servlet web.xml descriptor
-$Id: web.xml 4837 2009-01-18 05:40:05Z ron.sigal(a)jboss.com $
+$Id: web.xml 4903 2009-03-24 07:33:10Z ron.sigal(a)jboss.com $
-->
<web-app>
<servlet>
@@ -16,7 +16,7 @@
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
<param-name>locatorUrl</param-name>
- <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet/?createUniqueObjectName=true&useAllParams=true&blockingMode=blocking</param-value>
+ <param-value>servlet://localhost:8080/servlet-invoker/ServerInvokerServlet</param-value>
<description>The servlet server invoker locator url</description>
</init-param>
<load-on-startup>1</load-on-startup>
14 years, 4 months