[hornetq-commits] JBoss hornetq SVN: r10613 - in branches/Branch_2_2_EAP/src/main/org/hornetq: core/config/impl and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon May 9 12:14:08 EDT 2011


Author: clebert.suconic at jboss.com
Date: 2011-05-09 12:14:07 -0400 (Mon, 09 May 2011)
New Revision: 10613

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/management/ObjectNameBuilder.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/Identifier.java
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/RecordInfo.java
Log:
Cosmetic changes made on trunk

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/management/ObjectNameBuilder.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/management/ObjectNameBuilder.java	2011-05-09 15:31:48 UTC (rev 10612)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/api/core/management/ObjectNameBuilder.java	2011-05-09 16:14:07 UTC (rev 10613)
@@ -1,14 +1,14 @@
 /*
  * Copyright 2009 Red Hat, Inc.
- * Red Hat licenses this file to you under the Apache License, version
- * 2.0 (the "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *    http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.  See the License for the specific language governing
- * permissions and limitations under the License.
+ *  Red Hat licenses this file to you under the Apache License, version
+ *  2.0 (the "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ *  implied.  See the License for the specific language governing
+ *  permissions and limitations under the License.
  */
 
 package org.hornetq.api.core.management;
@@ -16,10 +16,6 @@
 import javax.management.ObjectName;
 
 import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.jms.management.ConnectionFactoryControl;
-import org.hornetq.api.jms.management.JMSQueueControl;
-import org.hornetq.api.jms.management.JMSServerControl;
-import org.hornetq.api.jms.management.TopicControl;
 import org.hornetq.core.config.impl.ConfigurationImpl;
 
 /**

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java	2011-05-09 15:31:48 UTC (rev 10612)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/config/impl/Validators.java	2011-05-09 16:14:07 UTC (rev 10613)
@@ -17,27 +17,18 @@
 import org.hornetq.core.settings.impl.AddressFullMessagePolicy;
 
 /**
- * A Validators
+ * A Validators.
  *
  * @author jmesnil
- *
- *
  */
-public class Validators
+public final class Validators
 {
-
-   // Constants -----------------------------------------------------
-
-   // Attributes ----------------------------------------------------
-
-   // Static --------------------------------------------------------
-
    public static interface Validator
    {
       void validate(String name, Object value);
    }
 
-   public static Validator NO_CHECK = new Validator()
+   public static final Validator NO_CHECK = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -45,7 +36,7 @@
       }
    };
 
-   public static Validator NOT_NULL_OR_EMPTY = new Validator()
+   public static final Validator NOT_NULL_OR_EMPTY = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -57,7 +48,7 @@
       }
    };
 
-   public static Validator GT_ZERO = new Validator()
+   public static final Validator GT_ZERO = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -73,7 +64,7 @@
       }
    };
 
-   public static Validator PERCENTAGE = new Validator()
+   public static final Validator PERCENTAGE = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -87,7 +78,7 @@
       }
    };
 
-   public static Validator GE_ZERO = new Validator()
+   public static final Validator GE_ZERO = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -105,7 +96,7 @@
       }
    };
 
-   public static Validator MINUS_ONE_OR_GT_ZERO = new Validator()
+   public static final Validator MINUS_ONE_OR_GT_ZERO = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -123,7 +114,7 @@
       }
    };
 
-   public static Validator MINUS_ONE_OR_GE_ZERO = new Validator()
+   public static final Validator MINUS_ONE_OR_GE_ZERO = new Validator()
    {
       public void validate(final String name, final Object value)
       {
@@ -186,17 +177,4 @@
          }
       }
    };
-
-   // Constructors --------------------------------------------------
-
-   // Public --------------------------------------------------------
-
-   // Package protected ---------------------------------------------
-
-   // Protected -----------------------------------------------------
-
-   // Private -------------------------------------------------------
-
-   // Inner classes -------------------------------------------------
-
 }

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/Identifier.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/Identifier.java	2011-05-09 15:31:48 UTC (rev 10612)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/filter/impl/Identifier.java	2011-05-09 16:14:07 UTC (rev 10613)
@@ -38,9 +38,10 @@
 {
    private final SimpleString name;
 
+   private final int hash;
+
    private Object value;
 
-   private final int hash;
 
    public Identifier(final SimpleString name)
    {
@@ -60,7 +61,7 @@
    @Override
    public boolean equals(final Object obj)
    {
-      if (obj.getClass() != Identifier.class)
+      if (!(obj instanceof Identifier))
       {
          return false;
       }

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/RecordInfo.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/RecordInfo.java	2011-05-09 15:31:48 UTC (rev 10612)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/journal/RecordInfo.java	2011-05-09 16:14:07 UTC (rev 10613)
@@ -63,6 +63,10 @@
    @Override
    public boolean equals(final Object other)
    {
+	  if (!(other instanceof RecordInfo))
+	  {
+		   return false;
+      }
       RecordInfo r = (RecordInfo)other;
 
       return r.id == id;



More information about the hornetq-commits mailing list