[jboss-cvs] JBossAS SVN: r97637 - in projects/jboss-jca/trunk: deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 9 15:38:07 EST 2009
Author: jesper.pedersen
Date: 2009-12-09 15:38:06 -0500 (Wed, 09 Dec 2009)
New Revision: 97637
Added:
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RA.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAEquals.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAHashCode.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RANull.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/package.html
Modified:
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/ValidateObject.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/Validator.java
projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
projects/jboss-jca/trunk/deployers/src/main/resources/validator.properties
projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/BaseResourceAdapter.java
projects/jboss-jca/trunk/embedded/src/test/java/org/jboss/jca/test/embedded/rars/simple/TestResourceAdapter.java
Log:
[JBJCA-201] A couple of ResourceAdapter rules
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/ValidateObject.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/ValidateObject.java 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/ValidateObject.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -22,6 +22,10 @@
package org.jboss.jca.deployers.common.validator;
+import java.util.List;
+
+import org.jboss.metadata.rar.spec.ConfigPropertyMetaData;
+
/**
* Object wrapper for objects that should be validated
*/
@@ -33,6 +37,9 @@
/** Onject */
private Object object;
+ /** config-property */
+ private List<ConfigPropertyMetaData> configProperties;
+
/**
* Constructor
* @param key The key
@@ -41,8 +48,22 @@
public ValidateObject(int key,
Object object)
{
+ this(key, object, null);
+ }
+
+ /**
+ * Constructor
+ * @param key The key
+ * @param object The key
+ * @param configProperties The list of config property metadata
+ */
+ public ValidateObject(int key,
+ Object object,
+ List<ConfigPropertyMetaData> configProperties)
+ {
this.key = key;
this.object = object;
+ this.configProperties = configProperties;
}
/**
@@ -62,4 +83,13 @@
{
return object;
}
+
+ /**
+ * Get the list of config properties
+ * @return The list
+ */
+ public List<ConfigPropertyMetaData> getConfigProperties()
+ {
+ return configProperties;
+ }
}
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/Validator.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/Validator.java 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/Validator.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -42,7 +42,11 @@
"org.jboss.jca.deployers.common.validator.rules.mcf.MCFHashCode",
"org.jboss.jca.deployers.common.validator.rules.mcf.MCFEquals",
"org.jboss.jca.deployers.common.validator.rules.mc.MC",
- "org.jboss.jca.deployers.common.validator.rules.mc.MCGetMetaData"
+ "org.jboss.jca.deployers.common.validator.rules.mc.MCGetMetaData",
+ "org.jboss.jca.deployers.common.validator.rules.ra.RANull",
+ "org.jboss.jca.deployers.common.validator.rules.ra.RA",
+ "org.jboss.jca.deployers.common.validator.rules.ra.RAHashCode",
+ "org.jboss.jca.deployers.common.validator.rules.ra.RAEquals"
};
/**
@@ -84,7 +88,7 @@
}
catch (Throwable t)
{
- t.printStackTrace();
+ throw new IllegalArgumentException(RULES[i], t);
}
}
Added: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RA.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RA.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RA.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, 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.jca.deployers.common.validator.rules.ra;
+
+import org.jboss.jca.deployers.common.validator.Failure;
+import org.jboss.jca.deployers.common.validator.Key;
+import org.jboss.jca.deployers.common.validator.Rule;
+import org.jboss.jca.deployers.common.validator.Severity;
+import org.jboss.jca.deployers.common.validator.ValidateObject;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import javax.resource.spi.ResourceAdapter;
+
+/**
+ * ResourceAdapter must be implemented if present
+ */
+public class RA implements Rule
+{
+ /** Section */
+ private static final String SECTION = "5.3.1";
+
+ /**
+ * Constructor
+ */
+ public RA()
+ {
+ }
+
+ /**
+ * Validate
+ * @param vo The validate object
+ * @param rb The resource bundle
+ * @return The list of failures found; <code>null</code> if none
+ */
+ @SuppressWarnings("unchecked")
+ public List<Failure> validate(ValidateObject vo, ResourceBundle rb)
+ {
+ if (vo != null && Key.RESOURCE_ADAPTER == vo.getKey())
+ {
+ if (vo.getObject() != null && !(vo.getObject() instanceof ResourceAdapter))
+ {
+ List<Failure> failures = new ArrayList<Failure>(1);
+
+ Failure failure = new Failure(Severity.ERROR,
+ SECTION,
+ rb.getString("ra.RA"),
+ vo.getObject().getClass().getName());
+ failures.add(failure);
+
+ return failures;
+ }
+ }
+
+ return null;
+ }
+}
Added: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAEquals.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAEquals.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAEquals.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, 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.jca.deployers.common.validator.rules.ra;
+
+import org.jboss.jca.deployers.common.validator.Failure;
+import org.jboss.jca.deployers.common.validator.Key;
+import org.jboss.jca.deployers.common.validator.Rule;
+import org.jboss.jca.deployers.common.validator.Severity;
+import org.jboss.jca.deployers.common.validator.ValidateObject;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import javax.resource.spi.ResourceAdapter;
+
+/**
+ * ResourceAdapter must have an equals implementation
+ */
+public class RAEquals implements Rule
+{
+ /** Section */
+ private static final String SECTION = "5.3.1";
+
+ /**
+ * Constructor
+ */
+ public RAEquals()
+ {
+ }
+
+ /**
+ * Validate
+ * @param vo The validate object
+ * @param rb The resource bundle
+ * @return The list of failures found; <code>null</code> if none
+ */
+ @SuppressWarnings("unchecked")
+ public List<Failure> validate(ValidateObject vo, ResourceBundle rb)
+ {
+ if (vo != null &&
+ Key.RESOURCE_ADAPTER == vo.getKey() &&
+ vo.getObject() != null &&
+ vo.getObject() instanceof ResourceAdapter)
+ {
+ boolean error = true;
+ Class clz = vo.getObject().getClass();
+
+ System.out.println("Hello World");
+
+ while (error && !clz.equals(Object.class))
+ {
+ try
+ {
+ Method equals = clz.getDeclaredMethod("equals", new Class[] {Object.class});
+ if (equals != null)
+ error = false;
+ }
+ catch (Throwable t)
+ {
+ clz = clz.getSuperclass();
+ }
+ }
+
+ if (error)
+ {
+ List<Failure> failures = new ArrayList<Failure>(1);
+
+ Failure failure = new Failure(Severity.ERROR,
+ SECTION,
+ rb.getString("ra.RAEquals"),
+ vo.getObject().getClass().getName());
+ failures.add(failure);
+
+ return failures;
+ }
+ }
+
+ return null;
+ }
+}
Added: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAHashCode.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAHashCode.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RAHashCode.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -0,0 +1,100 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, 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.jca.deployers.common.validator.rules.ra;
+
+import org.jboss.jca.deployers.common.validator.Failure;
+import org.jboss.jca.deployers.common.validator.Key;
+import org.jboss.jca.deployers.common.validator.Rule;
+import org.jboss.jca.deployers.common.validator.Severity;
+import org.jboss.jca.deployers.common.validator.ValidateObject;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+import javax.resource.spi.ResourceAdapter;
+
+/**
+ * ResourceAdapter must have a hashCode implementation
+ */
+public class RAHashCode implements Rule
+{
+ /** Section */
+ private static final String SECTION = "5.3.1";
+
+ /**
+ * Constructor
+ */
+ public RAHashCode()
+ {
+ }
+
+ /**
+ * Validate
+ * @param vo The validate object
+ * @param rb The resource bundle
+ * @return The list of failures found; <code>null</code> if none
+ */
+ @SuppressWarnings("unchecked")
+ public List<Failure> validate(ValidateObject vo, ResourceBundle rb)
+ {
+ if (vo != null &&
+ Key.RESOURCE_ADAPTER == vo.getKey() &&
+ vo.getObject() != null &&
+ vo.getObject() instanceof ResourceAdapter)
+ {
+ boolean error = true;
+ Class clz = vo.getObject().getClass();
+
+ while (error && !clz.equals(Object.class))
+ {
+ try
+ {
+ Method hashCode = clz.getDeclaredMethod("hashCode", (Class[])null);
+ if (hashCode != null)
+ error = false;
+ }
+ catch (Throwable t)
+ {
+ clz = clz.getSuperclass();
+ }
+ }
+
+ if (error)
+ {
+ List<Failure> failures = new ArrayList<Failure>(1);
+
+ Failure failure = new Failure(Severity.ERROR,
+ SECTION,
+ rb.getString("ra.RAHashCode"),
+ vo.getObject().getClass().getName());
+ failures.add(failure);
+
+ return failures;
+ }
+ }
+
+ return null;
+ }
+}
Added: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RANull.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RANull.java (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/RANull.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008-2009, 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.jca.deployers.common.validator.rules.ra;
+
+import org.jboss.jca.deployers.common.validator.Failure;
+import org.jboss.jca.deployers.common.validator.Key;
+import org.jboss.jca.deployers.common.validator.Rule;
+import org.jboss.jca.deployers.common.validator.Severity;
+import org.jboss.jca.deployers.common.validator.ValidateObject;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ResourceBundle;
+
+/**
+ * ResourceAdapter must be implemented if present
+ */
+public class RANull implements Rule
+{
+ /** Section */
+ private static final String SECTION = "5.3.1";
+
+ /**
+ * Constructor
+ */
+ public RANull()
+ {
+ }
+
+ /**
+ * Validate
+ * @param vo The validate object
+ * @param rb The resource bundle
+ * @return The list of failures found; <code>null</code> if none
+ */
+ @SuppressWarnings("unchecked")
+ public List<Failure> validate(ValidateObject vo, ResourceBundle rb)
+ {
+ if (vo != null && Key.RESOURCE_ADAPTER == vo.getKey())
+ {
+ if (vo.getObject() == null)
+ {
+ List<Failure> failures = new ArrayList<Failure>(1);
+
+ Failure failure = new Failure(Severity.ERROR,
+ SECTION,
+ rb.getString("ra.RANull"));
+ failures.add(failure);
+
+ return failures;
+ }
+ }
+
+ return null;
+ }
+}
Added: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/package.html
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/package.html (rev 0)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/common/validator/rules/ra/package.html 2009-12-09 20:38:06 UTC (rev 97637)
@@ -0,0 +1,3 @@
+<body>
+Validation rules for the ResourceAdapter instance.
+</body>
Modified: projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/deployers/src/main/java/org/jboss/jca/deployers/fungal/RADeployer.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -294,7 +294,9 @@
{
resourceAdapter =
(ResourceAdapter)initAndInject(cmd.getRa().getRaClass(), cmd.getRa().getConfigProperty(), cl);
- archiveValidationObjects.add(new ValidateObject(Key.RESOURCE_ADAPTER, resourceAdapter));
+ archiveValidationObjects.add(new ValidateObject(Key.RESOURCE_ADAPTER,
+ resourceAdapter,
+ cmd.getRa().getConfigProperty()));
beanValidationObjects.add(resourceAdapter);
}
@@ -313,7 +315,9 @@
ManagedConnectionFactory mcf =
(ManagedConnectionFactory)initAndInject(cdMeta.getManagedConnectionFactoryClass(),
cdMeta.getConfigProps(), cl);
- archiveValidationObjects.add(new ValidateObject(Key.MANAGED_CONNECTION_FACTORY, mcf));
+ archiveValidationObjects.add(new ValidateObject(Key.MANAGED_CONNECTION_FACTORY,
+ mcf,
+ cdMeta.getConfigProps()));
beanValidationObjects.add(mcf);
associationObjects.add(mcf);
@@ -339,9 +343,11 @@
{
if (mlMeta.getActivationSpecType() != null && mlMeta.getActivationSpecType().getAsClass() != null)
{
- Object o = initAndInject(mlMeta.getActivationSpecType().getAsClass(),
- mlMeta.getActivationSpecType().getConfigProps(), cl);
- archiveValidationObjects.add(new ValidateObject(Key.ACTIVATION_SPEC, o));
+ List<ConfigPropertyMetaData> cpm = mlMeta.getActivationSpecType().getConfigProps();
+
+ Object o = initAndInject(mlMeta.getActivationSpecType().getAsClass(), cpm, cl);
+
+ archiveValidationObjects.add(new ValidateObject(Key.ACTIVATION_SPEC, o, cpm));
beanValidationObjects.add(o);
associationObjects.add(o);
}
@@ -362,7 +368,7 @@
{
Object o = initAndInject(aoMeta.getAdminObjectImplementationClass(),
aoMeta.getConfigProps(), cl);
- archiveValidationObjects.add(new ValidateObject(Key.ADMIN_OBJECT, o));
+ archiveValidationObjects.add(new ValidateObject(Key.ADMIN_OBJECT, o, aoMeta.getConfigProps()));
beanValidationObjects.add(o);
}
}
Modified: projects/jboss-jca/trunk/deployers/src/main/resources/validator.properties
===================================================================
--- projects/jboss-jca/trunk/deployers/src/main/resources/validator.properties 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/deployers/src/main/resources/validator.properties 2009-12-09 20:38:06 UTC (rev 97637)
@@ -9,3 +9,7 @@
mcf.MCFEquals=A ManagedConnectionFactory must implement a "public boolean equals(Object)" method.
mc.MC=The class must provide an implementation of the ManagedConnection interface.
mc.MCGetMetaData=ManagedConnection.getMetaData() must return a javax.resource.spi.ManagedConnectionMetaData instance
+ra.RA=A ResourceAdapter must implement the javax.resource.spi.ResourceAdapter interface.
+ra.RANull=A ResourceAdapter must be a non-null instance.
+ra.RAHashCode=A ResourceAdapter must implement a "public int hashCode()" method.
+ra.RAEquals=A ResourceAdapter must implement a "public boolean equals(Object)" method.
Modified: projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/BaseResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/BaseResourceAdapter.java 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/deployers/src/test/java/org/jboss/jca/test/deployers/spec/rars/BaseResourceAdapter.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -105,4 +105,26 @@
}
+ /**
+ * Hash code
+ * @return The hash
+ */
+ @Override
+ public int hashCode()
+ {
+ return 42;
+ }
+
+ /**
+ * Equals
+ * @param other The other object
+ * @return True if equal; otherwise false
+ */
+ public boolean equals(Object other)
+ {
+ if (other == null)
+ return false;
+
+ return getClass().equals(other.getClass());
+ }
}
Modified: projects/jboss-jca/trunk/embedded/src/test/java/org/jboss/jca/test/embedded/rars/simple/TestResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/embedded/src/test/java/org/jboss/jca/test/embedded/rars/simple/TestResourceAdapter.java 2009-12-09 19:31:11 UTC (rev 97636)
+++ projects/jboss-jca/trunk/embedded/src/test/java/org/jboss/jca/test/embedded/rars/simple/TestResourceAdapter.java 2009-12-09 20:38:06 UTC (rev 97637)
@@ -100,4 +100,27 @@
{
log.debug("call stop");
}
+
+ /**
+ * Hash code
+ * @return The hash
+ */
+ @Override
+ public int hashCode()
+ {
+ return 42;
+ }
+
+ /**
+ * Equals
+ * @param other The other object
+ * @return True if equal; otherwise false
+ */
+ public boolean equals(Object other)
+ {
+ if (other == null)
+ return false;
+
+ return getClass().equals(other.getClass());
+ }
}
More information about the jboss-cvs-commits
mailing list