From depot-cvs-return-106-apmail-incubator-depot-cvs-archive=incubator.apache.org@incubator.apache.org Mon Mar 01 02:31:31 2004 Return-Path: Delivered-To: apmail-incubator-depot-cvs-archive@www.apache.org Received: (qmail 2775 invoked from network); 1 Mar 2004 02:31:31 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Mar 2004 02:31:31 -0000 Received: (qmail 44470 invoked by uid 500); 1 Mar 2004 02:31:14 -0000 Delivered-To: apmail-incubator-depot-cvs-archive@incubator.apache.org Received: (qmail 44456 invoked by uid 500); 1 Mar 2004 02:31:14 -0000 Mailing-List: contact depot-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: depot-dev@incubator.apache.org Delivered-To: mailing list depot-cvs@incubator.apache.org Received: (qmail 44439 invoked from network); 1 Mar 2004 02:31:14 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 1 Mar 2004 02:31:14 -0000 Received: (qmail 2768 invoked by uid 65534); 1 Mar 2004 02:31:30 -0000 Date: 1 Mar 2004 02:31:30 -0000 Message-ID: <20040301023130.2766.qmail@minotaur.apache.org> From: nickchalko@apache.org To: depot-cvs@incubator.apache.org Subject: svn commit: rev 6939 - incubator/depot/trunk/ruper/src/java/core/org/apache/ruper/resource X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: nickchalko Date: Sun Feb 29 18:31:30 2004 New Revision: 6939 Modified: incubator/depot/trunk/ruper/src/java/core/org/apache/ruper/resource/ResourceGroup.java Log: Throw NPE in constructor. Fixed author tag. Modified: incubator/depot/trunk/ruper/src/java/core/org/apache/ruper/resource/ResourceGroup.java ============================================================================== --- incubator/depot/trunk/ruper/src/java/core/org/apache/ruper/resource/ResourceGroup.java (original) +++ incubator/depot/trunk/ruper/src/java/core/org/apache/ruper/resource/ResourceGroup.java Sun Feb 29 18:31:30 2004 @@ -13,34 +13,36 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.apache.ruper.resource; - /** - * @author arb_jack + * @author The Apache Incubator Depot Project */ public class ResourceGroup { public String m_group = null; - - public ResourceGroup(String group) { +public ResourceGroup(String group) { + if(group == null){throw new NullPointerException("group must be set");} m_group = group; - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ public boolean equals(Object otherGroup) { return m_group.equals(((ResourceGroup) otherGroup).m_group); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#hashCode() */ public int hashCode() { return m_group.hashCode(); } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ public String toString() { @@ -52,11 +54,9 @@ public String getGroup() { return m_group; } - public static ResourceGroup getTestGroup() { return getTestGroup("test"); } - public static ResourceGroup getTestGroup(String name) { return new ResourceGroup(name); }