[jboss-cvs] JBoss Profiler SVN: r525 - in branches/JBossProfiler2: doc/developerguide/en/modules and 15 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Apr 26 13:07:20 EDT 2009


Author: jesper.pedersen
Date: 2009-04-26 13:07:18 -0400 (Sun, 26 Apr 2009)
New Revision: 525

Added:
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/jobs/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/as/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/connectors/package.html
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/package.html
   branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/package.html
   branches/JBossProfiler2/tools/checkstyle/
   branches/JBossProfiler2/tools/checkstyle/HEADER
   branches/JBossProfiler2/tools/checkstyle/checkstyle.xml
   branches/JBossProfiler2/tools/checkstyle/lib/
   branches/JBossProfiler2/tools/checkstyle/lib/antlr.jar
   branches/JBossProfiler2/tools/checkstyle/lib/checkstyle.jar
   branches/JBossProfiler2/tools/checkstyle/lib/commons-beanutils-core.jar
   branches/JBossProfiler2/tools/checkstyle/lib/commons-cli.jar
   branches/JBossProfiler2/tools/checkstyle/lib/commons-logging.jar
   branches/JBossProfiler2/tools/checkstyle/lib/google-collect-snapshot.jar
Modified:
   branches/JBossProfiler2/
   branches/JBossProfiler2/build.xml
   branches/JBossProfiler2/doc/developerguide/en/modules/coding.xml
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/AbstractTransformer.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Agent.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ClassUtil.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/JavassistTransformer.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/NopProfilerThreadImpl.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ProfilerThreadImpl.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/SizeComparator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Transformer.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/ant/AddClassesTask.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RegressionTask.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RemoveClassesTask.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/ant/SaveTask.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/as/Communicator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/CombinedFrameComparator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/HTMLUtil.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/Client.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/plugins/Hibernate.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassComparator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassInfo.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameComparator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameHelper.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameInfo.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/Math.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/MethodInfo.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/SnapshotHelper.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadComparator.java
   branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadHelper.java
   branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Entity.java
   branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Message.java
   branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Test.java
   branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/TestServlet.java
Log:
[JBPROFILER-73] Integrate checkstyle


Property changes on: branches/JBossProfiler2
___________________________________________________________________
Name: svn:ignore
   - build
dist
*.zip
*.tar.gz
*.tar.bz2
CMakeCache.txt
cmake_install.cmake
CMakeFiles
Makefile
*.patch


   + build
dist
reports
*.zip
*.tar.gz
*.tar.bz2
CMakeCache.txt
cmake_install.cmake
CMakeFiles
Makefile
*.patch



Modified: branches/JBossProfiler2/build.xml
===================================================================
--- branches/JBossProfiler2/build.xml	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/build.xml	2009-04-26 17:07:18 UTC (rev 525)
@@ -10,6 +10,8 @@
     <property name="src.test.dir" value="${src.dir}/test"/>
     <property name="etc.dir" value="${src.dir}/etc"/>
     <property name="dist.dir" value="${basedir}/dist"/>
+    <property name="tools.dir" value="${basedir}/tools"/>
+    <property name="reports.dir" value="${basedir}/reports"/>
 
     <property name="name" value="jboss-profiler"/>
     <property name="major" value="2"/>
@@ -44,6 +46,13 @@
         </fileset>
     </path>
 
+    <path id="checkstyle.lib.path.id">
+      <fileset dir="${tools.dir}/checkstyle/lib"/>
+      <fileset dir="${dist.dir}">
+        <include name="**/*.jar"/>
+      </fileset>
+    </path>
+
     <!-- =================================================================== -->
     <!-- Initialize                                                          -->
     <!-- =================================================================== -->
@@ -340,6 +349,27 @@
         <ant dir="doc/developerguide" target="pdf"/>
     </target>
 
+    <!-- ================================= 
+         Target: checkstyle
+         ================================= -->
+    <target name="checkstyle" depends="dist">
+      <taskdef name="checkstyle"
+               classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
+               classpathref="checkstyle.lib.path.id"/>
+      
+      <mkdir dir="${reports.dir}"/>
+      <mkdir dir="${reports.dir}/checkstyle" />
+      
+      <checkstyle config="${tools.dir}/checkstyle/checkstyle.xml"
+                  failOnViolation="false"
+                  classpathref="checkstyle.lib.path.id">
+        <fileset dir="${basedir}"
+                 includes="**/*.java"/>
+        <formatter type="plain"/>
+        <formatter type="xml" toFile="${reports.dir}/checkstyle/checkstyle-result.xml"/>
+      </checkstyle>
+    </target>
+
     <!-- =================================================================== -->
     <!-- Dist                                                                -->
     <!-- =================================================================== -->

Modified: branches/JBossProfiler2/doc/developerguide/en/modules/coding.xml
===================================================================
--- branches/JBossProfiler2/doc/developerguide/en/modules/coding.xml	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/doc/developerguide/en/modules/coding.xml	2009-04-26 17:07:18 UTC (rev 525)
@@ -28,8 +28,14 @@
 }
     </programlisting>
 
-    <para>Remember to add JavaDoc for all classes and methods.</para>
+    <para>Remember to add JavaDoc for all classes and methods and remember to run</para>
 
+    <programlisting>
+ant checkstyle
+    </programlisting>
+
+    <para>before any patch submission.</para>
+
     <para>The same rules applies to the web front-end files such as .xhtml and .xml.</para>
 
     <para>See the source code for more examples of the source code formatting rules.</para>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/AbstractTransformer.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/AbstractTransformer.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/AbstractTransformer.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -21,10 +21,10 @@
  */
 package org.jboss.profiler.agent;
 
-import java.lang.instrument.IllegalClassFormatException;
 import java.io.BufferedInputStream;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
+import java.lang.instrument.IllegalClassFormatException;
 import java.security.ProtectionDomain;
 
 /**

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Agent.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Agent.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Agent.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -154,7 +154,7 @@
         loaded = true;
       } catch (IOException e) {
         System.err.println("Unable to open " + propertiesFile);
-      }	finally {
+      } finally {
         if (fis != null) {
           try {
             fis.close();
@@ -284,7 +284,7 @@
       Collections.sort(l, new SizeComparator());
       Collections.reverse(l);
 
-      for (String s: l) {
+      for (String s : l) {
         String c = s;
         String v = null;
         if (s.indexOf("|") != -1) {
@@ -341,7 +341,7 @@
       }
       Collections.sort(l, new SizeComparator());
 
-      for (String c: l) {
+      for (String c : l) {
         if (c.endsWith(".*")) {
           c = c.substring(0, c.indexOf(".*")) + "/";
         }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ClassUtil.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ClassUtil.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ClassUtil.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -83,7 +83,7 @@
       Set<String> processed = new HashSet<String>();
       
       for (Class c : loaded) {
-        if (!c.isInterface()&& 
+        if (!c.isInterface() && 
             !c.isArray() && 
             !c.isAnnotation() && 
             !c.isSynthetic()) {

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/JavassistTransformer.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/JavassistTransformer.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/JavassistTransformer.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -42,6 +42,12 @@
  */
 public class JavassistTransformer extends AbstractTransformer {
 
+  /** Prefix */
+  private static final String PREFIX = "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread())";
+
+  /** */
+  private static final String CODE = "{" + PREFIX + ".beginWait(); $_ = $proceed($$); " + PREFIX + ".endWait();}";
+
   /** The class pool */
   private ClassPool pool;
 
@@ -105,7 +111,11 @@
    * @param v The visibility
    * @exception CannotCompileException If the constructor cant be modified
    */
-  private void instrumentConstructor(CtConstructor constructor, String className, Visibility v) throws CannotCompileException {
+  private void instrumentConstructor(CtConstructor constructor, 
+                                     String className, 
+                                     Visibility v) 
+    throws CannotCompileException {
+
     if (!constructor.isClassInitializer()) {
       boolean include = true;
       
@@ -129,14 +139,14 @@
       
       if (include) {
         constructor.insertBeforeBody("{ " +
-                                     "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).allocation(\"" + className +"\");" +
-                                     "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).start(\"" + className + "\", \"" + constructor.getLongName() + "\");" +
+                                     PREFIX + ".allocation(\"" + className + "\");" +
+                                     PREFIX + ".start(\"" + className + "\", \"" + constructor.getLongName() + "\");" +
                                      " }");
 
         constructor.insertAfter("{ " +
-                                "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).end(\"" + className + "\", \"" + constructor.getLongName() + "\");" +
+                                PREFIX + ".end(\"" + className + "\", \"" + constructor.getLongName() + "\");" +
                                 " }", true);
-
+        
         setup(constructor);
       }
     }
@@ -172,11 +182,11 @@
     
     if (include) {
       method.insertBefore("{ " +
-                          "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).start(\"" + className + "\", \"" + method.getLongName() + "\");" +
+                          PREFIX + ".start(\"" + className + "\", \"" + method.getLongName() + "\");" +
                           " }");
       
       method.insertAfter("{ " +
-                         "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).end(\"" + className + "\", \"" + method.getLongName() + "\");" +
+                         PREFIX + ".end(\"" + className + "\", \"" + method.getLongName() + "\");" +
                          " }", true);
 
       setup(method);
@@ -189,27 +199,23 @@
    */
   private void setup(CtBehavior ctb) {
     try {
-      final String code = "{org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).beginWait(); " +
-        "$_ = $proceed($$); " +
-        "org.jboss.profiler.agent.Profiler.getProfilerThread(Thread.currentThread()).endWait();}";
-
       ctb.instrument(new ExprEditor() {
           public void edit(MethodCall m) throws CannotCompileException {
             if ("java.lang.Object".equals(m.getClassName())) {
               if ("wait".equals(m.getMethodName())) {
-                m.replace(code);
+                m.replace(CODE);
               }
             } else if ("java.lang.Thread".equals(m.getClassName())) {
               if ("join".equals(m.getMethodName()) ||
                   "sleep".equals(m.getMethodName()) ||
                   "yield".equals(m.getMethodName())) {
-                m.replace(code);
+                m.replace(CODE);
               }
             }
           }
         });
 
-    } catch(Exception e) {
+    } catch (Exception e) {
       e.printStackTrace(System.err);
     }
   }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/NopProfilerThreadImpl.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/NopProfilerThreadImpl.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/NopProfilerThreadImpl.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -29,7 +29,6 @@
 
   /**
    * Constructor
-   * @param thread The thread
    */
   NopProfilerThreadImpl() {
   }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ProfilerThreadImpl.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ProfilerThreadImpl.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/ProfilerThreadImpl.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -258,6 +258,10 @@
     return ti;
   }
 
+  /**
+   * Get the allocation map
+   * @return The map
+   */
   Map<String, AllocationInfo> getAllocationMap() {
     return allocationMap;
   }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/SizeComparator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/SizeComparator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/SizeComparator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -29,7 +29,7 @@
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>
  */
 public class SizeComparator implements Comparator<String>, Serializable {
-	
+
   /**
    * Compare two objects
    * @param sa String

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Transformer.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Transformer.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/Transformer.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -21,11 +21,11 @@
  */
 package org.jboss.profiler.agent;
 
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.lang.instrument.ClassFileTransformer;
 import java.lang.instrument.IllegalClassFormatException;
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.IOException;
 import java.security.ProtectionDomain;
 
 /**

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/jobs/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/jobs/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/jobs/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains all the job definitions.
+</body>

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/agent/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/agent/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/agent/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains the Java 5+ agent.
+</body>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/ant/AddClassesTask.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ant/AddClassesTask.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/ant/AddClassesTask.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -98,7 +98,7 @@
           } else if (vs.equalsIgnoreCase("package")) {
             v = Visibility.PACKAGE;
           }
-          Command cmd = new Command(CommandType.ADD_CLASSES, new Object[] { clz, v } );
+          Command cmd = new Command(CommandType.ADD_CLASSES, new Object[] {clz, v});
           String response = (String)remotingClient.invoke(cmd);
         }
       }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RegressionTask.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RegressionTask.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RegressionTask.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -112,12 +112,12 @@
         Snapshot ns = SnapshotHelper.load(newSnapshot);
 
         double ott = 0;
-        for (ThreadInfo ti: os.getThreads()) {
+        for (ThreadInfo ti : os.getThreads()) {
           ott += ti.getTotalTime();
         }
       
         double ntt = 0;
-        for (ThreadInfo ti: ns.getThreads()) {
+        for (ThreadInfo ti : ns.getThreads()) {
           ntt += ti.getTotalTime();
         }
 

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RemoveClassesTask.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RemoveClassesTask.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/ant/RemoveClassesTask.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -78,7 +78,7 @@
         StringTokenizer st = new StringTokenizer(classes, ", ");
         while (st.hasMoreTokens()) {
           String token = st.nextToken();
-          Command cmd = new Command(CommandType.REMOVE_CLASSES, new Object[] { token } );
+          Command cmd = new Command(CommandType.REMOVE_CLASSES, new Object[] {token});
           String response = (String)remotingClient.invoke(cmd);
         }
       

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/ant/SaveTask.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/ant/SaveTask.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/ant/SaveTask.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -90,7 +90,7 @@
   public void execute() throws BuildException {
     org.jboss.remoting.Client remotingClient = null;
     try {
-      Command cmd = new Command(CommandType.SAVE, new Object[] { Integer.valueOf(snapshot) } );
+      Command cmd = new Command(CommandType.SAVE, new Object[] {Integer.valueOf(snapshot)});
 
       InvokerLocator locator = new InvokerLocator(getProtocol() + "://" + getHost() + ":" + getPort());
       

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/as/Communicator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/as/Communicator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/as/Communicator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -28,11 +28,10 @@
 
 import java.net.InetAddress;
 
+import org.jboss.logging.Logger;
 import org.jboss.remoting.InvokerLocator;
 import org.jboss.remoting.transport.Connector;
 
-import org.jboss.logging.Logger;
-
 /**
  * The communicator class
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/as/Profiler.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -178,7 +178,7 @@
       vi = Visibility.PUBLIC;
     }
 
-    lh.handleCommand(new Command(CommandType.ADD_CLASSES, new Object[] { classes, vi }));
+    lh.handleCommand(new Command(CommandType.ADD_CLASSES, new Object[] {classes, vi}));
   }
 
   /**
@@ -187,7 +187,7 @@
    */
   public void removeClasses(String classes) {
     LocalHandler lh = new LocalHandler();
-    lh.handleCommand(new Command(CommandType.REMOVE_CLASSES, new Object[] { classes }));
+    lh.handleCommand(new Command(CommandType.REMOVE_CLASSES, new Object[] {classes}));
   }
 
   /**

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/as/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/as/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/as/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains classes for application server integration.
+</body>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/CombinedFrameComparator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/CombinedFrameComparator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/CombinedFrameComparator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -46,7 +46,7 @@
   public CombinedFrameComparator(int method) {
     this.method = method;
   }
-	
+
   /**
    * Compare two objects
    * @param fa Combined frame info

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/HTMLUtil.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/HTMLUtil.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/HTMLUtil.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -52,7 +52,8 @@
    * @exception Exception Thrown if an error occurs
    */
   public static void header(BufferedWriter bw, String title, boolean toplevel) throws Exception {
-    bw.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" + NEW_LINE);
+    bw.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" " + 
+             "\"http://www.w3.org/TR/html4/loose.dtd\">" + NEW_LINE);
     bw.write("<html>" + NEW_LINE);
     bw.write("<head>" + NEW_LINE);
     bw.write("  <title>" + Version.FULL_VERSION + ": " + title + "</title>" + NEW_LINE);
@@ -76,7 +77,8 @@
     bw.write(NEW_LINE);
     bw.write("<p>" + NEW_LINE);
     bw.write("<hr>" + NEW_LINE);
-    bw.write("Generated by: <a href=\"http://www.jboss.org/jbossprofiler\">" + Version.FULL_VERSION + "</a>" + NEW_LINE);
+    bw.write("Generated by: <a href=\"http://www.jboss.org/jbossprofiler\">" + Version.FULL_VERSION + "</a>" +
+             NEW_LINE);
     bw.write(NEW_LINE);
     bw.write("</body>" + NEW_LINE);
     bw.write("</html>" + NEW_LINE);

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/SnapshotUtil.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -98,7 +98,7 @@
       new HashMap<String, Map<String, CombinedFrameInfo>>();
 
     long tt = 0;
-    for (ThreadInfo ti: snapshot.getThreads()) {
+    for (ThreadInfo ti : snapshot.getThreads()) {
       tt += ti.getTotalTime();
 
       if (ti instanceof ThreadInfoProxy) {
@@ -107,8 +107,8 @@
       }
     }
 
-    for (ThreadInfo ti: snapshot.getThreads()) {
-      for (FrameInfo fi: ti.getFrames()) {
+    for (ThreadInfo ti : snapshot.getThreads()) {
+      for (FrameInfo fi : ti.getFrames()) {
         frameInformation(snapshot.getMethodRepository(), fi, tt, data);
       }
 
@@ -139,7 +139,11 @@
    * @param tt The total time (ns)
    * @param data The data
    */
-  private void frameInformation(MethodRepository mr, FrameInfo fi, long tt, Map<String, Map<String, CombinedFrameInfo>> data) {
+  private void frameInformation(MethodRepository mr, 
+                                FrameInfo fi, 
+                                long tt, 
+                                Map<String, Map<String, CombinedFrameInfo>> data) {
+
     MethodInfo mi = mr.getInfo(fi.getMethod());
     Map<String, CombinedFrameInfo> classData = data.get(mi.getClassName());
       
@@ -167,7 +171,7 @@
 
     List<FrameInfo> l = fi.getChildren();
     if (l != null) {
-      for (FrameInfo child: l) {
+      for (FrameInfo child : l) {
         frameInformation(mr, child, tt, data);
       }
     }
@@ -190,7 +194,7 @@
       double wait = 0.0;
       
       if (l != null) {
-        for (CombinedFrameInfo cfi: l) {
+        for (CombinedFrameInfo cfi : l) {
           time += cfi.getTotalTime();
           wait += cfi.getWaitTime();
         }
@@ -267,7 +271,9 @@
     bw.write("    <td>To</td><td>" + dateFormat.format(snapshot.getTo()) + "</td>" + NEW_LINE);
     bw.write("  </tr>" + NEW_LINE);
     bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
-    bw.write("    <td>Total</td><td>" + df.format(new Date(snapshot.getTo().getTime() - snapshot.getFrom().getTime()).getTime()) + " ms</td>" + NEW_LINE);
+    bw.write("    <td>Total</td><td>" + 
+             df.format(new Date(snapshot.getTo().getTime() - snapshot.getFrom().getTime()).getTime()) + 
+             " ms</td>" + NEW_LINE);
     bw.write("  </tr>" + NEW_LINE);
     bw.write("</table>" + NEW_LINE);
 
@@ -281,13 +287,14 @@
     bw.write("     <th>Time</th>" + NEW_LINE);
     bw.write("  </tr>" + NEW_LINE);
     odd = true;
-    for (ThreadInfo ti: snapshot.getThreads()) {
+    for (ThreadInfo ti : snapshot.getThreads()) {
       if (odd) {
         bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
       } else {
         bw.write("  <tr class=\"roweven\">" + NEW_LINE);
       }
-      bw.write("    <td><a href=\"threads/thread-" + ti.getId() + ".html\">Thread-" + ti.getId() + "</a></td>" + NEW_LINE);
+      bw.write("    <td><a href=\"threads/thread-" + ti.getId() + ".html\">Thread-" + ti.getId() + "</a></td>" + 
+               NEW_LINE);
       bw.write("    <td>" + df.format(Math.nanoToMilli(ti.getTotalTime())) + " ms</td>" + NEW_LINE);
       bw.write("  </tr>" + NEW_LINE);
 
@@ -317,13 +324,14 @@
     bw.write("     <th>Time</th>" + NEW_LINE);
     bw.write("  </tr>" + NEW_LINE);
     odd = true;
-    for (TimedClassInfo tci: classes) {
+    for (TimedClassInfo tci : classes) {
       if (odd) {
         bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
       } else {
         bw.write("  <tr class=\"roweven\">" + NEW_LINE);
       }
-      bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
+      bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + 
+               Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
       bw.write("    <td>" + Util.getDescription(tci) + "</td>" + NEW_LINE);
       bw.write("    <td>" + df.format(tci.getTotalTime()) + " ms</td>" + NEW_LINE);
       bw.write("  </tr>" + NEW_LINE);
@@ -338,7 +346,8 @@
 
   /**
    * Dump the threads to a file writer
-   * @param snapshot The snapshot
+   * @param mr The method repository
+   * @param threads The threads
    * @param directory The directory
    * @exception Exception If an error occurs
    */
@@ -346,7 +355,7 @@
     File f = new File(directory + "threads");
     f.mkdirs();
 
-    for (ThreadInfo ti: threads) {
+    for (ThreadInfo ti : threads) {
       FileWriter ftw = new FileWriter(directory + "threads" + File.separator + 
                                       "thread-" + ti.getId() + ".html");
       BufferedWriter bw = new BufferedWriter(ftw, 8192);
@@ -392,7 +401,7 @@
 
       int frameNumber = 1;
 
-      for (FrameInfo fi: ti.getFrames()) {
+      for (FrameInfo fi : ti.getFrames()) {
         dumpFrame(mr, fi, frameNumber, bw);
         frameNumber++;
         bw.write(NEW_LINE);
@@ -412,7 +421,7 @@
 
   /**
    * Dump the frame to a file writer
-   * @param snapshot The snapshot
+   * @param mr The method repository
    * @param fi The frame
    * @param fn The frame number
    * @param w The writer
@@ -439,7 +448,7 @@
 
   /**
    * Dump the frame to a file writer
-   * @param snapshot The snapshot
+   * @param mr The method repository
    * @param fi The frame
    * @param level The level
    * @param tt The total time
@@ -474,7 +483,7 @@
 
     List<FrameInfo> l = fi.getChildren();
     if (l != null) {
-      for (FrameInfo child: l) {      
+      for (FrameInfo child : l) {      
         dumpFrame(mr, child, level + 1, tt, w);
       }
     }
@@ -524,7 +533,8 @@
       w.write("    <td>" + df.format(cfi.getTotalTime()) + "</td>" + NEW_LINE);
       w.write("    <td>" + df.format(cfi.getTotalTime() / cfi.getCount()) + "</td>" + NEW_LINE);
       w.write("    <td>" + df.format(cfi.getPercent()) + "</td>" + NEW_LINE);
-      w.write("    <td><a href=\"classes/" + cfi.getClassName().replace('/', '.') + ".html\">" + cfi.getPrettyName() + "</a></td>" + NEW_LINE);
+      w.write("    <td><a href=\"classes/" + cfi.getClassName().replace('/', '.') + ".html\">" + 
+              cfi.getPrettyName() + "</a></td>" + NEW_LINE);
       w.write("  </tr>" + NEW_LINE);
       odd = !odd;
     }
@@ -590,7 +600,8 @@
         bw.write("    <td>" + df.format(h.getTotalTime()) + "</td>" + NEW_LINE);
         bw.write("    <td>" + df.format(avg) + "</td>" + NEW_LINE);
         bw.write("    <td>" + df.format(h.getPercent()) + "</td>" + NEW_LINE);
-        bw.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + h.getPrettyName() + "</a></td>" + NEW_LINE);
+        bw.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + 
+                 h.getPrettyName() + "</a></td>" + NEW_LINE);
         bw.write("  </tr>" + NEW_LINE);
         odd = !odd;
       } else {
@@ -666,7 +677,8 @@
         bw.write("    <td>" + df.format(h.getTotalTime()) + "</td>" + NEW_LINE);
         bw.write("    <td>" + df.format(avg) + "</td>" + NEW_LINE);
         bw.write("    <td>" + df.format(h.getPercent()) + "</td>" + NEW_LINE);
-        bw.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + h.getPrettyName() + "</a></td>" + NEW_LINE);
+        bw.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + 
+                 h.getPrettyName() + "</a></td>" + NEW_LINE);
         bw.write("  </tr>" + NEW_LINE);
         odd = !odd;
       } else {
@@ -731,7 +743,8 @@
           w.write("    <td>" + df.format(avg) + "</td>" + NEW_LINE);
           w.write("    <td>" + df.format(h.getPercent()) + "</td>" + NEW_LINE);
           if (include) {
-            w.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + h.getPrettyName() + "</a></td>" + NEW_LINE);
+            w.write("    <td><a href=\"classes/" + h.getClassName().replace('/', '.') + ".html\">" + 
+                    h.getPrettyName() + "</a></td>" + NEW_LINE);
           } else {
             w.write("    <td>" + h.getPrettyName() + "</td>" + NEW_LINE);
           }
@@ -770,13 +783,14 @@
       w.write("  </tr>" + NEW_LINE);
       
       boolean odd = true;
-      for (AllocationInfo ai: snapshot.getAllocations()) {
+      for (AllocationInfo ai : snapshot.getAllocations()) {
         if (odd) {
           w.write("  <tr class=\"rowodd\">" + NEW_LINE);
         } else {
           w.write("  <tr class=\"roweven\">" + NEW_LINE);
         }
-        w.write("    <td><a href=\"classes/" + ai.getClassName().replace('/', '.') + ".html\">" + ai.getClassName() + "</a></td>" + NEW_LINE);
+        w.write("    <td><a href=\"classes/" + ai.getClassName().replace('/', '.') + ".html\">" + 
+                ai.getClassName() + "</a></td>" + NEW_LINE);
         w.write("    <td>" + ai.getCount() + "</td>" + NEW_LINE);
         w.write("  </tr>" + NEW_LINE);
         odd = !odd;
@@ -789,6 +803,7 @@
   /**
    * Dump the classes to a file writer
    * @param classes The classes
+   * @param info The combined frame info map
    * @param allocs The allocations
    * @param directory The directory
    * @exception Exception If an error occurs
@@ -819,14 +834,15 @@
     bw.write("  </tr>" + NEW_LINE);
 
     boolean odd = true;
-    for (TimedClassInfo tci: classes) {
+    for (TimedClassInfo tci : classes) {
       if (odd) {
         bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
       } else {
         bw.write("  <tr class=\"roweven\">" + NEW_LINE);
       }
 
-      bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
+      bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + 
+               Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
       bw.write("    <td>" + Util.getDescription(tci) + "</td>" + NEW_LINE);
       bw.write("    <td>" + df.format(tci.getTotalTime()) + " ms</td>" + NEW_LINE);
 
@@ -1004,7 +1020,7 @@
 
     int count = 0;
 
-    for (CombinedFrameInfo cfi: result) { 
+    for (CombinedFrameInfo cfi : result) { 
       if (cfi.getTotalTime() > threshold) {
         if (odd) {
           bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
@@ -1041,14 +1057,17 @@
    * @param directory The directory
    * @exception Exception If an error occurs
    */
-  protected void dumpCaller(MethodRepository methodRepository, List<ThreadInfo> threads, String directory) throws Exception {
+  protected void dumpCaller(MethodRepository methodRepository, 
+                            List<ThreadInfo> threads, 
+                            String directory) throws Exception {
+
     File f = new File(directory + "caller");
     f.mkdirs();
 
     Map<String, Map<String, CombinedFrameInfo>> data = new HashMap<String, Map<String, CombinedFrameInfo>>();
 
-    for (ThreadInfo ti: threads) {
-      for (FrameInfo fi: ti.getFrames()) {
+    for (ThreadInfo ti : threads) {
+      for (FrameInfo fi : ti.getFrames()) {
         getCallerInformation(methodRepository, fi, data);
       }
 
@@ -1168,14 +1187,15 @@
     boolean odd = true;
     int count = 0;
 
-    for (TimedClassInfo tci: classes) {
+    for (TimedClassInfo tci : classes) {
       if (tci.getWaitTime() >= threshold) {
         if (odd) {
           bw.write("  <tr class=\"rowodd\">" + NEW_LINE);
         } else {
           bw.write("  <tr class=\"roweven\">" + NEW_LINE);
         }
-        bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
+        bw.write("    <td><a href=\"classes/" + tci.getClassName().replace('/', '.') + ".html\">" + 
+                 Util.getPrettyName(tci) + "</a></td>" + NEW_LINE);
         bw.write("    <td>" + Util.getDescription(tci) + "</td>" + NEW_LINE);
         bw.write("    <td>" + df.format(tci.getWaitTime()) + " ms</td>" + NEW_LINE);
         bw.write("   </tr>" + NEW_LINE);
@@ -1204,7 +1224,10 @@
    * @param fi The frame
    * @param data The data
    */
-  protected void getCallerInformation(MethodRepository mr, FrameInfo fi, Map<String, Map<String, CombinedFrameInfo>> data) {
+  protected void getCallerInformation(MethodRepository mr, 
+                                      FrameInfo fi, 
+                                      Map<String, Map<String, CombinedFrameInfo>> data) {
+
     MethodInfo mi = mr.getInfo(fi.getMethod());
     Map<String, CombinedFrameInfo> entry = data.get(mi.getClassName());
     if (entry == null) {
@@ -1291,6 +1314,7 @@
           is.close();
         }
       } catch (IOException ioe) {
+        // Ignore
       }
 
       try {
@@ -1298,6 +1322,7 @@
           os.close();
         }
       } catch (IOException ioe) {
+        // Ignore
       }
     }
   }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/Client.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/Client.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/Client.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -34,18 +34,17 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.InputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.text.DecimalFormat;
-import java.util.Map;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Properties;
 
+import org.jboss.logging.Logger;
 import org.jboss.remoting.InvokerLocator;
 
-import org.jboss.logging.Logger;
-
 /**
  * The client
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>
@@ -182,7 +181,7 @@
           cmd = new Command(CommandType.DISABLE);
         } else if (cmdStr.equalsIgnoreCase("load")) {
           if (i < args.length) {
-            cmd = new Command(CommandType.LOAD, new Object[] { args[i] } );
+            cmd = new Command(CommandType.LOAD, new Object[] {args[i]});
             i++;
           }
         } else if (cmdStr.equalsIgnoreCase("save")) {
@@ -190,14 +189,14 @@
           String filename = null;
 
           if (i < args.length) {
-            number= Integer.valueOf(args[i]);
+            number = Integer.valueOf(args[i]);
             i++;
           }
           if (i < args.length) {
             filename = args[i];
             i++;
           }
-          cmd = new Command(CommandType.SAVE, new Object[] { number, filename } );
+          cmd = new Command(CommandType.SAVE, new Object[] {number, filename});
 
         } else if (cmdStr.equalsIgnoreCase("diff")) {
           String filename1 = null;
@@ -211,7 +210,7 @@
             filename2 = args[i];
             i++;
           }
-          cmd = new Command(CommandType.DIFFERENCE, new Object[] { filename1, filename2 } );
+          cmd = new Command(CommandType.DIFFERENCE, new Object[] {filename1, filename2});
         } else if (cmdStr.equalsIgnoreCase("add")) {
           if (i + 1 < args.length) {
             String clz = args[i];
@@ -223,13 +222,13 @@
             } else if (args[i + 1].equalsIgnoreCase("package")) {
               v = Visibility.PACKAGE;
             }
-            cmd = new Command(CommandType.ADD_CLASSES, new Object[] { clz, v } );
+            cmd = new Command(CommandType.ADD_CLASSES, new Object[] {clz, v});
             i++;
             i++;
           }
         } else if (cmdStr.equalsIgnoreCase("remove")) {
           if (i < args.length) {
-            cmd = new Command(CommandType.REMOVE_CLASSES, new Object[] { args[i] } );
+            cmd = new Command(CommandType.REMOVE_CLASSES, new Object[] {args[i]});
             i++;
           }
         } else if (cmdStr.equalsIgnoreCase("list")) {

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/cmd/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains the command line client.
+</body>

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/client/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains interfaces and classes that are shared between all client implementations.
+</body>

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains the interfaces and classes for the web client.
+</body>

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/client/web/util/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains web client utility classes.
+</body>

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/connectors/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/connectors/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/connectors/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains the remote connectors.
+</body>

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/plugins/Hibernate.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/plugins/Hibernate.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/plugins/Hibernate.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -23,15 +23,15 @@
 
 import org.jboss.profiler.shared.Plugin;
 
-import java.lang.annotation.Annotation;
 import java.io.IOException;
 import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ArrayList;
-import java.util.List;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassComparator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassComparator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassComparator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -29,7 +29,7 @@
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>
  */
 public class ClassComparator implements Comparator<ClassInfo>, Serializable {
-	
+
   /**
    * Compare two objects
    * @param ca Class info

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassInfo.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassInfo.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ClassInfo.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -55,7 +55,7 @@
   public String getClassName() {
     return className;
   }
-	
+
   /**
    * Get the class type
    * @return The type

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameComparator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameComparator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameComparator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -29,7 +29,7 @@
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>
  */
 public class FrameComparator implements Comparator<FrameInfo>, Serializable {
-	
+
   /**
    * Compare two objects
    * @param fa Frame info

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameHelper.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameHelper.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameHelper.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -45,6 +45,7 @@
   /**
    * Load a frame
    * @param file The file
+   * @return The frame
    * @exception IOException If an error occurs
    */
   public static FrameInfo load(File file) throws IOException {
@@ -66,6 +67,7 @@
           try {
             fis.close();
           } catch (Exception ne) {
+            // Ignore
           }
         }
       }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameInfo.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameInfo.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/FrameInfo.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -137,7 +137,7 @@
   public long getCount() {
     return count;
   }
-	
+
   /**
    * Get the time
    * @return The time
@@ -245,7 +245,7 @@
 
     if (getChildren() != null) {
       synchronized (children) {
-        for (FrameInfo child: children) {
+        for (FrameInfo child : children) {
           child.close();
         }
 
@@ -262,7 +262,7 @@
     
     List<FrameInfo> l = getChildren();
     if (l != null) {
-      for (FrameInfo child: l) {
+      for (FrameInfo child : l) {
         childTime += child.getTime();
       }
     }
@@ -282,7 +282,7 @@
 
     List<FrameInfo> l = getChildren();
     if (l != null) {
-      for (FrameInfo child: l) {
+      for (FrameInfo child : l) {
         totalTime += child.getTotalTime();
       }
     }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/Math.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/Math.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/Math.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -53,6 +53,6 @@
    * @return The percent
    */
   public static double toPercent(double nom, double denom) {
-    return (nom / denom) * 100.0;		
+    return (nom / denom) * 100.0;
   }
 }

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/MethodInfo.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/MethodInfo.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/MethodInfo.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -34,7 +34,7 @@
 
   /** The method name */
   private String methodName;
-	
+
   /** The class name */
   private String className;
   
@@ -55,7 +55,7 @@
   public String getMethodName() {
     return methodName;
   }
-	
+
   /**
    * Get the class name
    * @return The name
@@ -63,7 +63,7 @@
   public String getClassName() {
     return className;
   }
-	
+
   /**
    * Equals
    * @param other The other object

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/SnapshotHelper.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/SnapshotHelper.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/SnapshotHelper.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -84,6 +84,7 @@
   /**
    * Load a snapshot
    * @param file The file
+   * @return The snapshot
    * @exception IOException If an error occurs
    */
   public static Snapshot load(File file) throws IOException {
@@ -105,6 +106,7 @@
           try {
             fis.close();
           } catch (Exception ne) {
+            // Ignore
           }
         }
       }
@@ -150,6 +152,7 @@
   /**
    * Generate a snapshot from a directory
    * @param directory The directory
+   * @return The snapshot
    * @exception IOException If an error occurs
    */
   public static Snapshot generate(File directory) throws IOException {
@@ -163,7 +166,7 @@
     List<ThreadInfo> threads = new ArrayList<ThreadInfo>();
 
     File[] entries = directory.listFiles();
-    for (File entry: entries) {
+    for (File entry : entries) {
       if (entry.isDirectory()) {
         File tf = new File(directory, entry.getName());
         ThreadInfo ti = ThreadHelper.load(tf);

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadComparator.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadComparator.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadComparator.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -29,7 +29,7 @@
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>
  */
 public class ThreadComparator implements Comparator<ThreadInfo>, Serializable {
-	
+
   /**
    * Compare two objects
    * @param ta Thread info

Modified: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadHelper.java
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadHelper.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/ThreadHelper.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -46,6 +46,7 @@
   /**
    * Load a thread
    * @param directory The directory
+   * @return The thread
    * @exception IOException If an error occurs
    */
   public static ThreadInfo load(File directory) throws IOException {
@@ -75,6 +76,7 @@
           try {
             fis.close();
           } catch (Exception ne) {
+            // Ignore
           }
         }
       }

Added: branches/JBossProfiler2/src/main/org/jboss/profiler/shared/package.html
===================================================================
--- branches/JBossProfiler2/src/main/org/jboss/profiler/shared/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/main/org/jboss/profiler/shared/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains interfaces and classes that are shared between the agent and the clients.
+</body>

Modified: branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Entity.java
===================================================================
--- branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Entity.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Entity.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -124,7 +124,7 @@
    * Post create method
    * @exception CreateException Thrown if a create error occurs
    */
-  public void ejbPostCreate(String name, String logo, Integer pc, Integer sc)
+  public void ejbPostCreate()
     throws CreateException {
   }
 }

Modified: branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Message.java
===================================================================
--- branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Message.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Message.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -22,11 +22,10 @@
 package org.jboss.profiler.test;
 
 import javax.ejb.EJBException;
-import javax.ejb.MessageDrivenContext;
 import javax.ejb.MessageDrivenBean;
+import javax.ejb.MessageDrivenContext;
 import javax.jms.MessageListener;
 
-
 /**
  * Message
  * @author Jesper Pedersen <jesper.pedersen at jboss.org>

Modified: branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Test.java
===================================================================
--- branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Test.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/Test.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -97,6 +97,7 @@
       Message3 message3 = new Message3();
 
     } catch (Exception e) {
+      // Ignore
     }
   }
  

Modified: branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/TestServlet.java
===================================================================
--- branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/TestServlet.java	2009-04-26 15:55:43 UTC (rev 524)
+++ branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/TestServlet.java	2009-04-26 17:07:18 UTC (rev 525)
@@ -22,6 +22,7 @@
 package org.jboss.profiler.test;
 
 import java.io.IOException;
+
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;

Added: branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/package.html
===================================================================
--- branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/package.html	                        (rev 0)
+++ branches/JBossProfiler2/src/test/java/org/jboss/profiler/test/package.html	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,3 @@
+<body>
+This package contains simple test applications.
+</body>

Added: branches/JBossProfiler2/tools/checkstyle/HEADER
===================================================================
--- branches/JBossProfiler2/tools/checkstyle/HEADER	                        (rev 0)
+++ branches/JBossProfiler2/tools/checkstyle/HEADER	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,21 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright \d\d\d\d(-\d\d\d\d)?, 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.
+ */

Added: branches/JBossProfiler2/tools/checkstyle/checkstyle.xml
===================================================================
--- branches/JBossProfiler2/tools/checkstyle/checkstyle.xml	                        (rev 0)
+++ branches/JBossProfiler2/tools/checkstyle/checkstyle.xml	2009-04-26 17:07:18 UTC (rev 525)
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC
+  "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+  "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+  <property name="basedir" value="${basedir}"/>
+
+  <module name="TreeWalker">
+
+    <!-- Naming conventions -->
+    <module name="ConstantName">
+      <property name="format" value="^[A-Z](_?[A-Z0-9]+)*$"/>
+      <property name="applyToPublic" value="true"/>
+      <property name="applyToProtected" value="true"/>
+      <property name="applyToPackage" value="true"/>
+      <property name="applyToPrivate" value="false"/>
+    </module>
+    <module name="MethodName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9]+)*$"/>
+    </module>
+    <module name="LocalFinalVariableName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9]+)*$"/>
+    </module>
+    <module name="LocalVariableName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9]+)*$"/>
+    </module>
+    <module name="MemberName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9])*$"/>
+    </module>
+    <module name="ParameterName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9]+)*$"/>
+    </module>
+    <module name="TypeName">
+      <property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
+    </module>
+    <module name="StaticVariableName">
+      <property name="format" value="^[a-z]([a-zA-Z0-9])*$"/>
+    </module>
+    <module name="PackageName">
+      <property name="format" value="^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9]*)*$"/>
+    </module>
+
+    <!-- Code layout -->
+    <module name="LeftCurly">
+      <property name="option" value="eol"/>
+    </module>
+    <module name="RightCurly">
+      <property name="option" value="same"/>
+    </module>
+    <module name="ParenPad"/>
+
+    <!-- Whitespace settings -->
+    <module name="NoWhitespaceAfter"/>
+    <module name="NoWhitespaceBefore"/>
+    <module name="WhitespaceAfter">
+      <property name="tokens" value="COMMA, SEMI"/>
+    </module>
+    <module name="WhitespaceAround"/>
+
+    <!-- JavaDoc guidelines -->
+    <module name="JavadocMethod">
+      <property name="allowUndeclaredRTE" value="true"/>
+      <property name="allowThrowsTagsForSubclasses" value="true"/>
+      <property name="scope" value="package"/>
+    </module>
+    <module name="JavadocVariable">
+      <property name="scope" value="package"/>
+    </module>
+    <module name="JavadocType">
+      <property name="scope" value="package"/>
+    </module>
+
+    <!-- JLS -->
+    <module name="ModifierOrder"/>
+    <module name="UpperEll"/>
+
+    <!-- Override hashCode whenever you override equals() -->
+    <module name="EqualsHashCode"/>
+
+    <!-- Illegal instantiations -->
+    <module name="IllegalInstantiation">
+      <property name="classes" value="java.lang.Boolean"/>
+    </module>
+
+    <!-- Don't allow empty blocks -->
+    <module name="EmptyBlock">
+      <property name="option" value="text"/>
+    </module>
+
+    <!-- Avoid inner assignments -->
+    <module name="InnerAssignment"/>
+
+    <!-- Don't allow imports from the sun.* package hierarchy -->
+    <module name="IllegalImport"/>
+
+    <!-- Visibility modifiers -->
+    <module name="VisibilityModifier">
+      <property name="packageAllowed" value ="true"/>
+      <property name="protectedAllowed" value ="true"/>
+    </module>
+
+    <!-- Simplify your code -->
+    <module name="AvoidStarImport"/>
+    <module name="RedundantImport"/>
+    <!-- <module name="UnusedImports"/> -->
+    <module name="SimplifyBooleanExpression"/>
+    <module name="SimplifyBooleanReturn"/>
+
+    <module name="ImportOrder">
+      <property name="groups" value="org.jboss.profiler,java,javax,org.jboss"/>
+      <property name="ordered" value="true"/>
+      <property name="separated" value="true"/>
+    </module>
+
+    <!-- Flag reminder comments -->
+    <module name="TodoComment"/>
+
+    <!-- Enforce length limits -->
+    <module name="LineLength">
+      <property name="max" value="120"/>
+    </module>
+    <module name="MethodLength">
+      <property name="tokens" value="METHOD_DEF"/>
+      <property name="max" value="1000"/>
+    </module>
+    <module name="MethodLength">
+      <property name="tokens" value="CTOR_DEF"/>
+      <property name="max" value="150"/>
+    </module>
+    <module name="ParameterNumber">
+      <property name="max" value="20"/>
+    </module>
+
+    <!-- Indentation -->
+    <module name="Indentation">
+      <property name="basicOffset" value="2"/>
+      <property name="caseIndent" value="2"/>
+    </module>
+
+    <!-- StringLiteralEquality -->
+    <module name="StringLiteralEquality"/>
+
+  </module>
+
+  <!-- Enforce License Header -->
+  <module name="RegexpHeader">
+    <property name="headerFile" value="${basedir}/tools/checkstyle/HEADER"/>
+  </module>
+
+  <!-- Enforce file length -->
+  <module name="FileLength">
+    <property name="max" value="10000"/>
+  </module>
+
+  <!-- Don't allow tabs -->
+  <module name="FileTabCharacter">
+    <property name="eachLine" value="true"/>
+  </module>
+
+  <!-- Enforce package documentation -->
+  <module name="JavadocPackage">
+    <property name="allowLegacy" value="true"/>
+  </module>
+
+  <!-- NewlineAtEndOfFile -->
+  <module name="NewlineAtEndOfFile">
+    <property name="lineSeparator" value="lf"/>
+  </module>
+
+</module>

Added: branches/JBossProfiler2/tools/checkstyle/lib/antlr.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/antlr.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/JBossProfiler2/tools/checkstyle/lib/checkstyle.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/checkstyle.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/JBossProfiler2/tools/checkstyle/lib/commons-beanutils-core.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/commons-beanutils-core.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/JBossProfiler2/tools/checkstyle/lib/commons-cli.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/commons-cli.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/JBossProfiler2/tools/checkstyle/lib/commons-logging.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/JBossProfiler2/tools/checkstyle/lib/google-collect-snapshot.jar
===================================================================
(Binary files differ)


Property changes on: branches/JBossProfiler2/tools/checkstyle/lib/google-collect-snapshot.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream




More information about the jboss-cvs-commits mailing list