directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r944572 - in /directory/shared/trunk: ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ ldap/src/main/java/org/apache/directory/shared/ldap/aci/ ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ ldap/src/main/ja...
Date Sat, 15 May 2010 05:29:00 GMT
Author: felixk
Date: Sat May 15 05:29:00 2010
New Revision: 944572

URL: http://svn.apache.org/viewvc?rev=944572&view=rev
Log:
>From PMD report "Avoid empty catch blocks"

SuppressWarnings where intended to avoid false positives

Modified:
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
(original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
Sat May 15 05:29:00 2010
@@ -380,6 +380,8 @@ public class LdifAttributesReader extend
      * @return A list of Attributes, or an empty List
      * @throws LdapLdifException If something went wrong
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public Attributes parseAttributes( String ldif ) throws LdapLdifException
     {
         lines = new ArrayList<String>();
@@ -434,6 +436,8 @@ public class LdifAttributesReader extend
      * @return A list of Entry, or an empty List
      * @throws LdapLdifException If something went wrong
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public Entry parseEntry( String ldif ) throws LdapLdifException
     {
         lines = new ArrayList<String>();

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
(original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
Sat May 15 05:29:00 2010
@@ -1586,6 +1586,8 @@ public class LdifReader implements Itera
      * @throws LdapLdifException
      *             If the parsing fails
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public List<LdifEntry> parseLdifFile( String fileName, String encoding ) throws
LdapLdifException
     {
         if ( StringTools.isEmpty( fileName ) )
@@ -1650,6 +1652,8 @@ public class LdifReader implements Itera
      * @throws LdapLdifException
      *             If something went wrong
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public List<LdifEntry> parseLdif( String ldif ) throws LdapLdifException
     {
         LOG.debug( "Starts parsing ldif buffer" );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/aci/ProtectedItem.java
Sat May 15 05:29:00 2010
@@ -409,6 +409,8 @@ public abstract class ProtectedItem impl
         }
 
 
+        // This will suppress PMD.EmptyCatchBlock warnings in this method
+        @SuppressWarnings("PMD.EmptyCatchBlock")
         public String toString()
         {
             StringBuilder buf = new StringBuilder();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
Sat May 15 05:29:00 2010
@@ -177,6 +177,8 @@ public class SearchResultEntryCodec exte
      * 
      * @param type The attribute's name
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public void addAttributeValues( String type )
     {
         currentAttributeValue = new DefaultEntryAttribute( type );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntry.java
Sat May 15 05:29:00 2010
@@ -449,6 +449,8 @@ public class DefaultEntry implements Ent
      * We can't do it once as a static part in the body of this class, because
      * the access to the registries is mandatory to get back the AttributeType.
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     private void initObjectClassAT( SchemaManager schemaManager )
     {
         try

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/DefaultEntryAttribute.java
Sat May 15 05:29:00 2010
@@ -2466,6 +2466,8 @@ public class DefaultEntryAttribute imple
     /**
      * @see Externalizable#readExternal(ObjectInput)
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public void deserialize( ObjectInput in ) throws IOException, ClassNotFoundException
     {
         // Read the ID and the UPId

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/DefaultSchemaObjectRegistry.java
Sat May 15 05:29:00 2010
@@ -352,6 +352,8 @@ public abstract class DefaultSchemaObjec
     /**
      * {@inheritDoc}
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public SchemaObjectRegistry<T> copy( SchemaObjectRegistry<T> original )
     {
         // Fill the byName and OidRegistry maps, the type has already be copied

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/registries/Registries.java
Sat May 15 05:29:00 2010
@@ -281,6 +281,8 @@ public class Registries implements Schem
      * @param name The name we are looking at
      * @return The associated OID
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public String getOid( String name )
     {
         // we have many possible Registries to look at.
@@ -1244,6 +1246,8 @@ public class Registries implements Schem
     }
 
 
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     private void resolveRecursive( ObjectClass objectClass, Set<String> processed,
List<Throwable> errors )
     {
         // Process the Superiors, if any

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/ExceptionUtils.java
Sat May 15 05:29:00 2010
@@ -324,6 +324,8 @@ public class ExceptionUtils
      *            the name of the method to find and invoke
      * @return the wrapped exception, or <code>null</code> if not found
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     private static Throwable getCauseUsingMethodName( Throwable throwable, String methodName
)
     {
         Method method = null;
@@ -369,6 +371,8 @@ public class ExceptionUtils
      *            the name of the attribute to examine
      * @return the wrapped exception, or <code>null</code> if not found
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     private static Throwable getCauseUsingFieldName( Throwable throwable, String fieldName
)
     {
         Field field = null;
@@ -435,6 +439,8 @@ public class ExceptionUtils
      *         <code>false</code>
      * @since 2.0
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public static boolean isNestedThrowable( Throwable throwable )
     {
         if ( throwable == null )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java?rev=944572&r1=944571&r2=944572&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/SpringClassUtils.java
Sat May 15 05:29:00 2010
@@ -290,6 +290,8 @@ public abstract class SpringClassUtils
      * @return the static method, or <code>null</code> if no static method was
found
      * @throws IllegalArgumentException if the method name is blank or the clazz is null
      */
+    // This will suppress PMD.EmptyCatchBlock warnings in this method
+    @SuppressWarnings("PMD.EmptyCatchBlock")
     public static Method getStaticMethod( Class clazz, String methodName, Class[] args )
     {
         try



Mime
View raw message