diff --git a/jpos/src/main/java/org/jpos/q2/QFactory.java b/jpos/src/main/java/org/jpos/q2/QFactory.java
index 19e7db701c..ace8a4a421 100644
--- a/jpos/src/main/java/org/jpos/q2/QFactory.java
+++ b/jpos/src/main/java/org/jpos/q2/QFactory.java
@@ -62,7 +62,7 @@ public QFactory (ObjectName loaderName, Q2 q2) {
}
@SuppressWarnings("PMD.EmptyCatchBlock")
- public Object instantiate (Q2 server, Element e)
+ public Object instantiate (Q2 server, Element e)
throws ReflectionException,
MBeanException,
InstanceNotFoundException
@@ -82,7 +82,7 @@ public Object instantiate (Q2 server, Element e)
return mserver.instantiate (clazz, loaderName);
}
- public ObjectInstance createQBean (Q2 server, Element e, Object obj)
+ public ObjectInstance createQBean (Q2 server, Element e, Object obj)
throws MalformedObjectNameException,
InstanceAlreadyExistsException,
InstanceNotFoundException,
@@ -102,7 +102,7 @@ public ObjectInstance createQBean (Q2 server, Element e, Object obj)
throw new InstanceAlreadyExistsException (name+" has already been deployed in another file.");
}
ObjectInstance instance = mserver.registerMBean (
- obj, objectName
+ obj, objectName
);
try {
setAttribute (mserver, objectName, "Name", name);
@@ -115,7 +115,7 @@ public ObjectInstance createQBean (Q2 server, Element e, Object obj)
setAttribute (mserver, objectName, "Server", server);
setAttribute (mserver, objectName, "Persist", e);
configureQBean(mserver,objectName,e);
- setConfiguration (obj, e); // handle legacy (QSP v1) Configurables
+ setConfiguration (obj, e); // handle legacy (QSP v1) Configurables
if (obj instanceof QBean)
mserver.invoke (objectName, "init", null, null);
@@ -140,8 +140,7 @@ private void getExtraPath (QClassLoader loader, Element e) {
} catch (Throwable t) {
getQ2().getLog().error(t);
}
- for (Object o : classpathElement.getChildren("url")) {
- Element u = (Element) o;
+ for (Element u : classpathElement.getChildren("url")) {
try {
loader.addURL(u.getTextTrim());
} catch (MalformedURLException ex) {
@@ -152,8 +151,8 @@ private void getExtraPath (QClassLoader loader, Element e) {
}
@SuppressWarnings("PMD.EmptyCatchBlock")
- public void setAttribute
- (MBeanServer server, ObjectName objectName,
+ public void setAttribute
+ (MBeanServer server, ObjectName objectName,
String attribute, Object value)
throws InstanceNotFoundException,
MBeanException,
@@ -170,7 +169,7 @@ objectName, new Attribute (attribute, value)
// okay to fail (produced by some application servers instead of AttributeNotFoundException)
}
}
-
+
public void startQBean (Q2 server, ObjectName objectName)
throws InstanceNotFoundException,
MBeanException,
@@ -231,7 +230,7 @@ public AttributeList getAttributeList(Element e)
* @throws ConfigurationException If an exception is found trying to create the object.
*/
@SuppressWarnings("unchecked")
- protected Object getObject(Element childElement)
+ protected Object getObject(Element childElement)
throws ConfigurationException
{
String type = childElement.getAttributeValue("type","java.lang.String");
@@ -245,7 +244,7 @@ else if ("boolean".equals (type))
String value = childElement.getText();
value = Environment.getEnvironment().getProperty(value, value);
try {
- Class attributeType = Class.forName(type);
+ Class> attributeType = Class.forName(type);
if(Collection.class.isAssignableFrom(attributeType))
return getCollection(attributeType, childElement);
else{
@@ -256,10 +255,10 @@ else if ("boolean".equals (type))
} catch (Exception e1) {
throw new ConfigurationException(e1);
}
-
+
}
-
-
+
+
/** Creats a collection from a definition element with the format.
*
* <{attr|item} type="...">
@@ -278,8 +277,8 @@ protected Collection getCollection(Class type, Element e)
{
try{
Collection