You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2003/08/24 07:31:40 UTC
cvs commit: incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting IPerson.java Person.java TransientValue.java
jdillon 2003/08/23 22:31:40
Modified: modules/core/src/test/org/apache/geronimo/lock
LockCounterTest.java
modules/core/src/test/org/apache/geronimo/management
NotificationTypeTest.java
modules/core/src/test/org/apache/geronimo/remoting
IPerson.java Person.java TransientValue.java
Log:
o Resolved issue GERONIMO-8 (CR/LF problem) by Sivasundaram Umapathy
Revision Changes Path
1.2 +93 -93 incubator-geronimo/modules/core/src/test/org/apache/geronimo/lock/LockCounterTest.java
Index: LockCounterTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/lock/LockCounterTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LockCounterTest.java 20 Aug 2003 14:56:31 -0000 1.1
+++ LockCounterTest.java 24 Aug 2003 05:31:40 -0000 1.2
@@ -1,93 +1,93 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2003 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Geronimo" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
- * written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * "Apache Geronimo", nor may "Apache" appear in their name, without
- * prior written permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * ====================================================================
- */
-
-package org.apache.geronimo.lock;
-
-import junit.framework.TestCase;
-
-/**
- * Unit test for {@link org.apache.geronimo.lock.LockCounter} class.
- *
- * @version $Revision$ $Date$
- */
-
-public class LockCounterTest extends TestCase {
-
- LockCounter lockCounter;
- protected void setUp() throws Exception {
- super.setUp();
- lockCounter = new LockCounter();
- }
-
- protected void tearDown() throws Exception {
- lockCounter = null;
- super.tearDown();
- }
-
- public void testAll() {
-
- assertEquals(0,lockCounter.get());
- assertEquals(1,lockCounter.inc());
- assertEquals(2,lockCounter.inc());
- assertEquals(2,lockCounter.get());
- assertEquals(1,lockCounter.dec());
- assertEquals(2,lockCounter.inc());
- assertEquals(1,lockCounter.dec());
- assertEquals(0,lockCounter.dec());
- assertEquals(0,lockCounter.get());
-
- }
-}
\ No newline at end of file
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Geronimo" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Geronimo", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ====================================================================
+ */
+
+package org.apache.geronimo.lock;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test for {@link org.apache.geronimo.lock.LockCounter} class.
+ *
+ * @version $Revision$ $Date$
+ */
+
+public class LockCounterTest extends TestCase {
+
+ LockCounter lockCounter;
+ protected void setUp() throws Exception {
+ super.setUp();
+ lockCounter = new LockCounter();
+ }
+
+ protected void tearDown() throws Exception {
+ lockCounter = null;
+ super.tearDown();
+ }
+
+ public void testAll() {
+
+ assertEquals(0,lockCounter.get());
+ assertEquals(1,lockCounter.inc());
+ assertEquals(2,lockCounter.inc());
+ assertEquals(2,lockCounter.get());
+ assertEquals(1,lockCounter.dec());
+ assertEquals(2,lockCounter.inc());
+ assertEquals(1,lockCounter.dec());
+ assertEquals(0,lockCounter.dec());
+ assertEquals(0,lockCounter.get());
+
+ }
+}
1.2 +112 -112 incubator-geronimo/modules/core/src/test/org/apache/geronimo/management/NotificationTypeTest.java
Index: NotificationTypeTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/management/NotificationTypeTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NotificationTypeTest.java 21 Aug 2003 00:44:45 -0000 1.1
+++ NotificationTypeTest.java 24 Aug 2003 05:31:40 -0000 1.2
@@ -1,112 +1,112 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2003 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" and
- * "Apache Geronimo" must not be used to endorse or promote products
- * derived from this software without prior written permission. For
- * written permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * "Apache Geronimo", nor may "Apache" appear in their name, without
- * prior written permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- * ====================================================================
- */
-
-package org.apache.geronimo.management;
-
-import javax.management.Notification;
-import javax.management.NotificationFilter;
-
-import junit.framework.TestCase;
-
-/**
- * Unit test for org.apache.geronimo.common.State class
- *
- * @version $Revision$ $Date$
- */
-
-public class NotificationTypeTest extends TestCase {
- private static final NotificationFilter filter = NotificationType.NOTIFICATION_FILTER;
-
- public void testName() {
-
- assertEquals("j2ee.object.created", NotificationType.OBJECT_CREATED);
- assertEquals("j2ee.object.deleted", NotificationType.OBJECT_DELETED);
- assertEquals("j2ee.state.starting", NotificationType.STATE_STARTING);
- assertEquals("j2ee.state.running", NotificationType.STATE_RUNNING);
- assertEquals("j2ee.state.stopping", NotificationType.STATE_STOPPING);
- assertEquals("j2ee.state.stopped", NotificationType.STATE_STOPPED);
- assertEquals("j2ee.state.failed", NotificationType.STATE_FAILED);
- assertEquals("j2ee.attribute.changed", NotificationType.ATTRIBUTE_CHANGED);
-
- }
-
- public void testNotificationFilter() {
-
- Object dummy = new Object();
- Notification notification = new Notification(NotificationType.OBJECT_CREATED,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
- notification = new Notification(NotificationType.OBJECT_DELETED,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
-
- notification = new Notification(NotificationType.STATE_STARTING,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
- notification = new Notification(NotificationType.STATE_RUNNING,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
- notification = new Notification(NotificationType.STATE_STOPPING,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
- notification = new Notification(NotificationType.STATE_STOPPED,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
- notification = new Notification(NotificationType.STATE_FAILED,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
-
- notification = new Notification(NotificationType.ATTRIBUTE_CHANGED,dummy,1);
- assertTrue(filter.isNotificationEnabled(notification));
-
- notification = new Notification("hopefully unknown type",dummy,1);
- assertFalse(filter.isNotificationEnabled(notification));
- }
-
-}
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Geronimo" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Geronimo", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ====================================================================
+ */
+
+package org.apache.geronimo.management;
+
+import javax.management.Notification;
+import javax.management.NotificationFilter;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit test for org.apache.geronimo.common.State class
+ *
+ * @version $Revision$ $Date$
+ */
+
+public class NotificationTypeTest extends TestCase {
+ private static final NotificationFilter filter = NotificationType.NOTIFICATION_FILTER;
+
+ public void testName() {
+
+ assertEquals("j2ee.object.created", NotificationType.OBJECT_CREATED);
+ assertEquals("j2ee.object.deleted", NotificationType.OBJECT_DELETED);
+ assertEquals("j2ee.state.starting", NotificationType.STATE_STARTING);
+ assertEquals("j2ee.state.running", NotificationType.STATE_RUNNING);
+ assertEquals("j2ee.state.stopping", NotificationType.STATE_STOPPING);
+ assertEquals("j2ee.state.stopped", NotificationType.STATE_STOPPED);
+ assertEquals("j2ee.state.failed", NotificationType.STATE_FAILED);
+ assertEquals("j2ee.attribute.changed", NotificationType.ATTRIBUTE_CHANGED);
+
+ }
+
+ public void testNotificationFilter() {
+
+ Object dummy = new Object();
+ Notification notification = new Notification(NotificationType.OBJECT_CREATED,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+ notification = new Notification(NotificationType.OBJECT_DELETED,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+
+ notification = new Notification(NotificationType.STATE_STARTING,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+ notification = new Notification(NotificationType.STATE_RUNNING,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+ notification = new Notification(NotificationType.STATE_STOPPING,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+ notification = new Notification(NotificationType.STATE_STOPPED,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+ notification = new Notification(NotificationType.STATE_FAILED,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+
+ notification = new Notification(NotificationType.ATTRIBUTE_CHANGED,dummy,1);
+ assertTrue(filter.isNotificationEnabled(notification));
+
+ notification = new Notification("hopefully unknown type",dummy,1);
+ assertFalse(filter.isNotificationEnabled(notification));
+ }
+
+}
1.2 +4 -4 incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/IPerson.java
Index: IPerson.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/IPerson.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- IPerson.java 22 Aug 2003 02:23:36 -0000 1.1
+++ IPerson.java 24 Aug 2003 05:31:40 -0000 1.2
@@ -59,8 +59,8 @@
* @version $Revision$ $Date$
*/
public interface IPerson {
- public TransientValue getValue();
- public void setValue(TransientValue value);
+ public TransientValue getValue();
+ public void setValue(TransientValue value);
/**
* @return
*/
@@ -85,4 +85,4 @@
* @param lastName
*/
public abstract void setLastName(String lastName);
-}
\ No newline at end of file
+}
1.2 +8 -8 incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/Person.java
Index: Person.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/Person.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Person.java 22 Aug 2003 02:23:36 -0000 1.1
+++ Person.java 24 Aug 2003 05:31:40 -0000 1.2
@@ -61,12 +61,12 @@
* @version $Revision$ $Date$
*/
public class Person implements Serializable, IPerson {
-
- private String firstName;
- private String lastName;
- private IPerson spouse;
- private TransientValue value;
-
+
+ private String firstName;
+ private String lastName;
+ private IPerson spouse;
+ private TransientValue value;
+
/**
* @return
*/
@@ -123,7 +123,7 @@
this.lastName = lastName;
}
- public static void main(String[] args) {
+ public static void main(String[] args) {
Person p = new Person();
p.setSpouse(p);
}
1.2 +3 -3 incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/TransientValue.java
Index: TransientValue.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/remoting/TransientValue.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TransientValue.java 22 Aug 2003 02:23:36 -0000 1.1
+++ TransientValue.java 24 Aug 2003 05:31:40 -0000 1.2
@@ -61,8 +61,8 @@
* @version $Revision$ $Date$
*/
public class TransientValue implements Serializable {
- transient public Object value;
-
+ transient public Object value;
+
/**
* @return
*/