Update of 
/var/cvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/editwizard
In directory 
james.mmbase.org:/tmp/cvs-serv30736/cmsc/utilities/src/java/com/finalist/cmsc/editwizard

Modified Files:
        WizardMaker.java 
Log Message:
CMSC-907 Code Quality with PMD
Add final modifier to Util classes
Add final modifier to Logger instances
Change Boolean, Integer and Long instantiation to valueOf calls


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/editwizard
See also: http://www.mmbase.org/jira/browse/CMSC-907


Index: WizardMaker.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/utilities/src/java/com/finalist/cmsc/editwizard/WizardMaker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- WizardMaker.java    10 May 2008 16:31:23 -0000      1.3
+++ WizardMaker.java    16 May 2008 11:46:33 -0000      1.4
@@ -7,11 +7,7 @@
 import javax.servlet.http.HttpSession;
 
 import org.apache.commons.lang.StringUtils;
-
-import org.mmbase.bridge.Cloud;
-import org.mmbase.bridge.Node;
-import org.mmbase.bridge.NodeList;
-import org.mmbase.bridge.NodeManager;
+import org.mmbase.bridge.*;
 import org.mmbase.util.logging.Logger;
 import org.mmbase.util.logging.Logging;
 
@@ -20,10 +16,10 @@
  * 
  * @author Nico Klasens
  * @author Wouter Heijke
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
  */
 public class WizardMaker {
-   private static Logger log = 
Logging.getLoggerInstance(WizardMaker.class.getName());
+   private static final Logger log = 
Logging.getLoggerInstance(WizardMaker.class.getName());
 
    private static String DEFAULT_SESSION_KEY = "editwizard";
 
@@ -106,7 +102,7 @@
             contentType = node.getNodeManager().getName();
          }
          else {
-            throw new RuntimeException("No criteria available to find a 
wizard."
+            throw new IllegalStateException("No criteria available to find a 
wizard."
                   + " Provide a contenttype or objectnumber");
          }
       }
@@ -129,7 +125,7 @@
          NodeManager manager = cloud.getNodeManager("editwizards");
          list = manager.getList("nodepath = '" + contentType + "'", null, 
null);
          if (list.isEmpty()) {
-            throw new RuntimeException("Unable to find a wizard for 
contenttype " + contentType + " or objectnumber "
+            throw new IllegalStateException("Unable to find a wizard for 
contenttype " + contentType + " or objectnumber "
                   + objectNumber);
          }
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to