directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r993259 - in /directory/shared/trunk: asn1/src/main/java/org/apache/directory/shared/asn1/util/ cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ i18n/src/main/java/org/apache/directory/shared/i18n/ ldap-constants/src/main/java/...
Date Tue, 07 Sep 2010 07:36:55 GMT
Author: elecharny
Date: Tue Sep  7 07:36:55 2010
New Revision: 993259

URL: http://svn.apache.org/viewvc?rev=993259&view=rev
Log:
Fixed some checkstyle issues

Modified:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/Asn1StringUtils.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
    directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
    directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
    directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/Loggers.java

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/Asn1StringUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/Asn1StringUtils.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/Asn1StringUtils.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/Asn1StringUtils.java
Tue Sep  7 07:36:55 2010
@@ -28,7 +28,7 @@ import java.io.UnsupportedEncodingExcept
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class Asn1StringUtils
+public final class Asn1StringUtils
 {
     /** Hex chars */
     private static final byte[] HEX_CHAR = new byte[]

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/BooleanDecoder.java
Tue Sep  7 07:36:55 2010
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class BooleanDecoder
+public final class BooleanDecoder
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( BooleanDecoder.class );

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/IntegerDecoder.java
Tue Sep  7 07:36:55 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.i18n.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class IntegerDecoder
+public final class IntegerDecoder
 {
     /** A mask used to get only the necessary bytes */
     private static final int[] MASK = new int[]

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/util/LongDecoder.java
Tue Sep  7 07:36:55 2010
@@ -29,7 +29,7 @@ import org.apache.directory.shared.i18n.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class LongDecoder
+public final class LongDecoder
 {
     /** A mask used to get only the necessary bytes */
     private static final long[] MASK = new long[]

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractCursor.java
Tue Sep  7 07:36:55 2010
@@ -28,7 +28,7 @@ import org.apache.directory.shared.i18n.
  * Simple class that contains often used Cursor code.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param E The type of element on which this cursor will iterate
+ * @param <E> The type of element on which this cursor will iterate
  */
 public abstract class AbstractCursor<E> implements Cursor<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/AbstractTupleCursor.java
Tue Sep  7 07:36:55 2010
@@ -29,8 +29,8 @@ import org.apache.directory.shared.i18n.
  * An abstract TupleCursor.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param K The key type for the Tuple
- * @param V The associated Value type
+ * @param <K> The key type for the Tuple
+ * @param <V> The associated Value type
  */
 public abstract class AbstractTupleCursor<K, V> implements TupleCursor<K, V>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Cursor.java
Tue Sep  7 07:36:55 2010
@@ -35,7 +35,7 @@ package org.apache.directory.shared.ldap
  * UnsupportedOperationExceptions.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param E The type of element on which this cursor will iterate
+ * @param <E> The type of element on which this cursor will iterate
  */
 public interface Cursor<E> extends Iterable<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/CursorIterator.java
Tue Sep  7 07:36:55 2010
@@ -30,6 +30,7 @@ import org.apache.directory.shared.i18n.
  * constructs.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @param <E> The type of element on which this cursor will iterate
  */
 public class CursorIterator<E> implements Iterator<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/EmptyCursor.java
Tue Sep  7 07:36:55 2010
@@ -26,7 +26,7 @@ import org.apache.directory.shared.i18n.
  * An empty Cursor implementation.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param E The type of element on which this cursor will iterate
+ * @param <E> The type of element on which this cursor will iterate
  */
 public class EmptyCursor<E> extends AbstractCursor<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/ListCursor.java
Tue Sep  7 07:36:55 2010
@@ -32,7 +32,7 @@ import org.apache.directory.shared.i18n.
  * Cursor may be limited to a specific range within the list.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param E The element on which this cursor will iterate
+ * @param <E> The element on which this cursor will iterate
  */
 public class ListCursor<E> extends AbstractCursor<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/SingletonCursor.java
Tue Sep  7 07:36:55 2010
@@ -28,7 +28,7 @@ import org.apache.directory.shared.i18n.
  * A Cursor over a single element.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param E The type of element on which this cursor will iterate
+ * @param <E> The type of element on which this cursor will iterate
  */
 public class SingletonCursor<E> extends AbstractCursor<E>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/Tuple.java
Tue Sep  7 07:36:55 2010
@@ -24,8 +24,8 @@ package org.apache.directory.shared.ldap
  * A key/value tuple for simple two column persistent Tables with sorted keys.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param K The key type for the Tuple
- * @param V The associated Value type
+ * @param <K> The key type for the Tuple
+ * @param <V> The associated Value type
  */
 public class Tuple<K, V>
 {

Modified: directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
(original)
+++ directory/shared/trunk/cursor/src/main/java/org/apache/directory/shared/ldap/cursor/TupleCursor.java
Tue Sep  7 07:36:55 2010
@@ -25,8 +25,8 @@ package org.apache.directory.shared.ldap
  * inefficiencies encountered when scanning over Tuples.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- * @param K The Tupe key type
- * @param V The Value type stored in the Tuple
+ * @param <K> The Tupe key type
+ * @param <V> The Value type stored in the Tuple
  */
 public interface TupleCursor<K, V> extends Cursor<Tuple<K, V>>
 {

Modified: directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java (original)
+++ directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java Tue
Sep  7 07:36:55 2010
@@ -786,6 +786,8 @@ public enum I18n
 
     /**
      * Creates a new instance of I18n.
+     * 
+     * @param errorCode the error code
      */
     private I18n( String errorCode )
     {
@@ -803,10 +805,12 @@ public enum I18n
         return errorCode;
     }
 
-    private final static ResourceBundle errBundle = ResourceBundle
+    /** The file containing the errors */
+    private final static ResourceBundle ERR_BUNDLE = ResourceBundle
     .getBundle( "org/apache/directory/shared/i18n/errors" );
 
-    private final static ResourceBundle msgBundle = ResourceBundle
+    /** The file containing the messages */
+    private final static ResourceBundle MSG_BUNDLE = ResourceBundle
     .getBundle( "org/apache/directory/shared/i18n/messages" );
 
     /**
@@ -821,12 +825,13 @@ public enum I18n
     {
         try
         {
-            return err + " " + MessageFormat.format( errBundle.getString( err.getErrorCode()
), args );
+            return err + " " + MessageFormat.format( ERR_BUNDLE.getString( err.getErrorCode()
), args );
         }
         catch ( Exception e )
         {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             boolean comma = false;
+            
             for ( Object obj : args )
             {
                 if ( comma )
@@ -837,6 +842,7 @@ public enum I18n
                 {
                     comma = true;
                 }
+                
                 sb.append( obj );
             }
             return err + " (" + sb.toString() + ")";
@@ -856,7 +862,7 @@ public enum I18n
     {
         try
         {
-            return MessageFormat.format( msgBundle.getString( msg ), args );
+            return MessageFormat.format( MSG_BUNDLE.getString( msg ), args );
         }
         catch ( MissingResourceException mre )
         {
@@ -866,8 +872,9 @@ public enum I18n
             }
             catch ( Exception e )
             {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 boolean comma = false;
+                
                 for ( Object obj : args )
                 {
                     if ( comma )
@@ -878,11 +885,12 @@ public enum I18n
                     {
                         comma = true;
                     }
+                    
                     sb.append( obj );
                 }
+                
                 return msg + " (" + sb.toString() + ")";
             }
         }
     }
-
 }

Modified: directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/Loggers.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/Loggers.java?rev=993259&r1=993258&r2=993259&view=diff
==============================================================================
--- directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/Loggers.java
(original)
+++ directory/shared/trunk/ldap-constants/src/main/java/org/apache/directory/shared/ldap/constants/Loggers.java
Tue Sep  7 07:36:55 2010
@@ -48,7 +48,7 @@ public enum Loggers
 
 
     /**
-     * eturn the name associated with the constant.
+     * @return the name associated with the constant.
      */
     public String getName()
     {



Mime
View raw message