[hornetq-commits] JBoss hornetq SVN: r11999 - in trunk/hornetq-core/src/main/java/org/hornetq: utils/json and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Jan 9 06:17:18 EST 2012


Author: borges
Date: 2012-01-09 06:17:17 -0500 (Mon, 09 Jan 2012)
New Revision: 11999

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/filter/impl/Operator.java
   trunk/hornetq-core/src/main/java/org/hornetq/utils/json/JSONObject.java
Log:
Fix findbugs warnings

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/filter/impl/Operator.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/filter/impl/Operator.java	2012-01-09 11:16:50 UTC (rev 11998)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/filter/impl/Operator.java	2012-01-09 11:17:17 UTC (rev 11999)
@@ -25,7 +25,6 @@
 import java.util.HashSet;
 
 import org.hornetq.api.core.SimpleString;
-import org.hornetq.core.logging.Logger;
 
 /**
 * Implementations of the operators used in HornetQ filter expressions
@@ -39,8 +38,6 @@
 */
 public class Operator
 {
-   private static final Logger log = Logger.getLogger(Operator.class);
-
    int operation;
 
    Object oper1;
@@ -703,6 +700,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          case LONG:
             switch (class2)
             {
@@ -713,6 +711,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          default:
             throwBadObjectException(class1);
       }
@@ -741,6 +740,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          case LONG:
             switch (class2)
             {
@@ -751,6 +751,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          default:
             throwBadObjectException(class1);
       }
@@ -798,6 +799,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          case LONG:
             switch (class2)
             {
@@ -808,6 +810,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          default:
             throwBadObjectException(class1);
       }
@@ -836,6 +839,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          case LONG:
             switch (class2)
             {
@@ -846,6 +850,7 @@
                default:
                   throwBadObjectException(class2);
             }
+            break;
          default:
             throwBadObjectException(class1);
       }
@@ -949,7 +954,7 @@
             throw new Exception("LIKE ESCAPE: Bad escape character " + escapeString.toString());
          }
 
-         escapeChar = new Character(escapeString.charAt(0));
+         escapeChar = Character.valueOf(escapeString.charAt(0));
       }
 
       if (re == null)

Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/json/JSONObject.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/json/JSONObject.java	2012-01-09 11:16:50 UTC (rev 11998)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/json/JSONObject.java	2012-01-09 11:17:17 UTC (rev 11999)
@@ -1453,7 +1453,7 @@
          sb.append('}');
          return sb.toString();
       }
-      catch (Exception e)
+      catch (JSONException e)
       {
          return null;
       }



More information about the hornetq-commits mailing list