[infinispan-commits] Infinispan SVN: r952 - trunk/core/src/main/java/org/infinispan/marshall/jboss.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Thu Oct 15 09:30:41 EDT 2009
Author: manik.surtani at jboss.com
Date: 2009-10-15 09:30:41 -0400 (Thu, 15 Oct 2009)
New Revision: 952
Modified:
trunk/core/src/main/java/org/infinispan/marshall/jboss/JBossMarshaller.java
Log:
Compilation warnings
Modified: trunk/core/src/main/java/org/infinispan/marshall/jboss/JBossMarshaller.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/marshall/jboss/JBossMarshaller.java 2009-10-15 13:10:03 UTC (rev 951)
+++ trunk/core/src/main/java/org/infinispan/marshall/jboss/JBossMarshaller.java 2009-10-15 13:30:41 UTC (rev 952)
@@ -60,12 +60,11 @@
private MarshallingConfiguration configuration;
private MarshallerFactory factory;
private ConstantObjectTable objectTable;
-
+
/**
- * Marshaller thread local. JBossMarshaller is a singleton shared by all caches (global component),
- * so no urgent need for static here.
- * JBMAR clears pretty much any state during finish(), so no urgent need to clear the thread local
- * since it shouldn't be leaking.
+ * Marshaller thread local. JBossMarshaller is a singleton shared by all caches (global component), so no urgent need
+ * for static here. JBMAR clears pretty much any state during finish(), so no urgent need to clear the thread local
+ * since it shouldn't be leaking.
*/
private ThreadLocal<org.jboss.marshalling.Marshaller> marshallerTL = new ThreadLocal<org.jboss.marshalling.Marshaller>() {
@Override
@@ -77,12 +76,11 @@
}
}
};
-
+
/**
- * Unmarshaller thread local. JBossMarshaller is a singleton shared by all caches (global component),
- * so no urgent need for static here.
- * JBMAR clears pretty much any state during finish(), so no urgent need to clear the thread local
- * since it shouldn't be leaking.
+ * Unmarshaller thread local. JBossMarshaller is a singleton shared by all caches (global component), so no urgent
+ * need for static here. JBMAR clears pretty much any state during finish(), so no urgent need to clear the thread
+ * local since it shouldn't be leaking.
*/
private ThreadLocal<Unmarshaller> unmarshallerTL = new ThreadLocal<Unmarshaller>() {
@Override
@@ -193,7 +191,7 @@
unmarshaller = factory.createUnmarshaller(configuration);
} else {
unmarshaller = unmarshallerTL.get();
- }
+ }
unmarshaller.start(Marshalling.createByteInput(is));
return unmarshaller;
}
@@ -229,18 +227,19 @@
ClassLoader cl = subjectClass.getClassLoader();
builder.append("classloader hierarchy:");
ClassLoader parent = cl;
- while( parent != null ) {
+ while (parent != null) {
if (parent.equals(cl)) {
- builder.append("\n\t\t-> type classloader = " + parent);
+ builder.append("\n\t\t-> type classloader = ").append(parent);
} else {
- builder.append("\n\t\t-> parent classloader = " + parent);
+ builder.append("\n\t\t-> parent classloader = ").append(parent);
}
URL[] urls = getClassLoaderURLs(parent);
- int length = urls != null ? urls.length : 0;
- for(int u = 0; u < length; u ++) {
- builder.append("\n\t\t->..."+urls[u]);
+
+ if (urls != null) {
+ for (URL u : urls) builder.append("\n\t\t->...").append(u);
}
- if( parent != null ) parent = parent.getParent();
+
+ parent = parent.getParent();
}
TraceInformation.addUserInformation(problem, builder.toString());
}
@@ -249,18 +248,18 @@
public void handleUnmarshallingException(Throwable problem) {
// no-op
}
-
+
private static URL[] getClassLoaderURLs(ClassLoader cl) {
URL[] urls = {};
try {
Class returnType = urls.getClass();
Class[] parameterTypes = {};
Method getURLs = cl.getClass().getMethod("getURLs", parameterTypes);
- if( returnType.isAssignableFrom(getURLs.getReturnType()) ) {
+ if (returnType.isAssignableFrom(getURLs.getReturnType())) {
Object[] args = {};
urls = (URL[]) getURLs.invoke(cl, args);
}
- } catch(Exception ignore) {}
+ } catch (Exception ignore) {}
return urls;
}
More information about the infinispan-commits
mailing list