directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1409029 - /directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
Date Tue, 13 Nov 2012 23:41:53 GMT
Author: elecharny
Date: Tue Nov 13 23:41:52 2012
New Revision: 1409029

URL: http://svn.apache.org/viewvc?rev=1409029&view=rev
Log:
Added a try/catch to print a stack trace if we get something wrong in debug mode

Modified:
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java?rev=1409029&r1=1409028&r2=1409029&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/registries/Registries.java
Tue Nov 13 23:41:52 2012
@@ -1898,27 +1898,34 @@ public class Registries implements Schem
 
         sb.append( "USED BY :\n" );
 
-        for ( SchemaObjectWrapper wrapper : usedBy.keySet() )
+        try
         {
-            sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "] : {" );
-
-            boolean isFirst = true;
-
-            for ( SchemaObjectWrapper uses : usedBy.get( wrapper ) )
+            for ( SchemaObjectWrapper wrapper : usedBy.keySet() )
             {
-                if ( isFirst )
+                sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "] : {" );
+    
+                boolean isFirst = true;
+    
+                for ( SchemaObjectWrapper uses : usedBy.get( wrapper ) )
                 {
-                    isFirst = false;
-                }
-                else
-                {
-                    sb.append( ", " );
+                    if ( isFirst )
+                    {
+                        isFirst = false;
+                    }
+                    else
+                    {
+                        sb.append( ", " );
+                    }
+    
+                    sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "]" );
                 }
-
-                sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "]" );
+    
+                sb.append( "}\n" );
             }
-
-            sb.append( "}\n" );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
         }
 
         return sb.toString();
@@ -1934,27 +1941,34 @@ public class Registries implements Schem
 
         sb.append( "USING :\n" );
 
-        for ( SchemaObjectWrapper wrapper : using.keySet() )
+        try
         {
-            sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "] : {" );
-
-            boolean isFirst = true;
-
-            for ( SchemaObjectWrapper uses : using.get( wrapper ) )
+            for ( SchemaObjectWrapper wrapper : using.keySet() )
             {
-                if ( isFirst )
+                sb.append( wrapper.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "] : {" );
+    
+                boolean isFirst = true;
+    
+                for ( SchemaObjectWrapper uses : using.get( wrapper ) )
                 {
-                    isFirst = false;
-                }
-                else
-                {
-                    sb.append( ", " );
+                    if ( isFirst )
+                    {
+                        isFirst = false;
+                    }
+                    else
+                    {
+                        sb.append( ", " );
+                    }
+    
+                    sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "]" );
                 }
-
-                sb.append( uses.get().getObjectType() ).append( '[' ).append( wrapper.get().getOid()
).append( "]" );
+    
+                sb.append( "}\n" );
             }
-
-            sb.append( "}\n" );
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
         }
 
         return sb.toString();



Mime
View raw message