directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r992826 - in /directory/shared/trunk: asn1/src/main/java/org/apache/directory/shared/asn1/der/ i18n/src/main/java/org/apache/directory/shared/i18n/ i18n/src/main/resources/org/apache/directory/shared/i18n/
Date Sun, 05 Sep 2010 17:12:15 GMT
Author: elecharny
Date: Sun Sep  5 17:12:14 2010
New Revision: 992826

URL: http://svn.apache.org/viewvc?rev=992826&view=rev
Log:
Fixed the error messages

Modified:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
    directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1InputStream.java
Sun Sep  5 17:12:14 2010
@@ -46,7 +46,7 @@ public class ASN1InputStream extends Fil
     {
         public void encode( ASN1OutputStream out ) throws IOException
         {
-            throw new IOException( I18n.err( I18n.ERR_00016 ) );
+            throw new IOException( I18n.err( I18n.ERR_END_OF_STREAM_00016 ) );
         }
 
 
@@ -67,13 +67,13 @@ public class ASN1InputStream extends Fil
     };
 
 
-    public ASN1InputStream(ByteBuffer in)
+    public ASN1InputStream( ByteBuffer in )
     {
         super( newInputStream( in ) );
     }
 
 
-    public ASN1InputStream(byte[] input)
+    public ASN1InputStream( byte[] input )
     {
         super( new ByteArrayInputStream( input ) );
     }
@@ -112,7 +112,7 @@ public class ASN1InputStream extends Fil
         int length = read();
         if ( length < 0 )
         {
-            throw new IOException( I18n.err( I18n.ERR_00017 ) );
+            throw new IOException( I18n.err( I18n.ERR_EOF_FOUND_LENGTH_EXPECTED_00017 ) );
         }
 
         // Indefinite-length encoding.
@@ -127,7 +127,7 @@ public class ASN1InputStream extends Fil
 
             if ( size > 4 )
             {
-                throw new IOException( I18n.err( I18n.ERR_00018 ) );
+                throw new IOException( I18n.err( I18n.ERR_DER_LENGTH_ABOVE_4_BYTES_00018
) );
             }
 
             length = 0;
@@ -137,7 +137,7 @@ public class ASN1InputStream extends Fil
 
                 if ( next < 0 )
                 {
-                    throw new IOException( I18n.err( I18n.ERR_00019 ) );
+                    throw new IOException( I18n.err( I18n.ERR_EOF_FOUND_IN_LENGTH_00019 )
);
                 }
 
                 length = ( length << 8 ) + next;
@@ -145,7 +145,7 @@ public class ASN1InputStream extends Fil
 
             if ( length < 0 )
             {
-                throw new IOException( I18n.err( I18n.ERR_00020 ) );
+                throw new IOException( I18n.err( I18n.ERR_CORRUPTED_STREAM_00020 ) );
             }
         }
 
@@ -173,7 +173,7 @@ public class ASN1InputStream extends Fil
 
         if ( left != 0 )
         {
-            throw new EOFException( I18n.err( I18n.ERR_00021 ) );
+            throw new EOFException( I18n.err( I18n.ERR_EOF_FOUND_IN_OBJECT_00021 ) );
         }
     }
 
@@ -200,7 +200,7 @@ public class ASN1InputStream extends Fil
                 try
                 {
                     obj = ais.readObject();
-    
+
                     while ( obj != null )
                     {
                         sequence.add( obj );
@@ -220,7 +220,7 @@ public class ASN1InputStream extends Fil
                 try
                 {
                     obj = ais.readObject();
-    
+
                     while ( obj != null )
                     {
                         set.add( obj );
@@ -315,17 +315,17 @@ public class ASN1InputStream extends Fil
                     try
                     {
                         DEREncodable encodable = ais.readObject();
-    
+
                         // Explicitly tagged - if it isn't we'd have to tell from
                         // the context.
                         if ( ais.available() == 0 )
                         {
                             return new DERTaggedObject( true, tagNo, encodable, bytes );
                         }
-    
+
                         // Another implicit object, create a sequence.
                         DERSequence derSequence = new DERSequence();
-    
+
                         while ( encodable != null )
                         {
                             derSequence.add( encodable );
@@ -397,7 +397,7 @@ public class ASN1InputStream extends Fil
         {
             if ( EOF_FOUND )
             {
-                throw new EOFException( I18n.err( I18n.ERR_00022 ) );
+                throw new EOFException( I18n.err( I18n.ERR_READ_PAST_END_OF_FILE_00022 )
);
             }
 
             EOF_FOUND = true;
@@ -508,7 +508,7 @@ public class ASN1InputStream extends Fil
                         return new BERTaggedObject( false, tagNo, berSequence );
                     }
 
-                    throw new IOException( I18n.err( I18n.ERR_00023 ) );
+                    throw new IOException( I18n.err( I18n.ERR_UNKNOWN_BER_OBJECT_00023 )
);
             }
         }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/ASN1OutputStream.java
Sun Sep  5 17:12:14 2010
@@ -33,13 +33,13 @@ import org.apache.directory.shared.i18n.
 
 public class ASN1OutputStream extends FilterOutputStream
 {
-    public ASN1OutputStream(OutputStream os)
+    public ASN1OutputStream( OutputStream os )
     {
         super( os );
     }
 
 
-    public ASN1OutputStream(ByteBuffer out)
+    public ASN1OutputStream( ByteBuffer out )
     {
         super( newOutputStream( out ) );
     }
@@ -109,7 +109,7 @@ public class ASN1OutputStream extends Fi
         }
         else
         {
-            throw new IOException( I18n.err( I18n.ERR_00024 ) );
+            throw new IOException( I18n.err( I18n.ERR_OBJECT_NOT_DER_ENCODABLE_00024 ) );
         }
     }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERConstructedOctetString.java
Sun Sep  5 17:12:14 2010
@@ -40,13 +40,13 @@ public class BERConstructedOctetString e
      * @param string
      *            the octets making up the octet string.
      */
-    public BERConstructedOctetString(byte[] string)
+    public BERConstructedOctetString( byte[] string )
     {
         super( string );
     }
 
 
-    public BERConstructedOctetString(Vector<DEREncodable> octets)
+    public BERConstructedOctetString( Vector<DEREncodable> octets )
     {
         super( toBytes( octets ) );
 
@@ -71,11 +71,12 @@ public class BERConstructedOctetString e
             }
             catch ( ClassCastException e )
             {
-                throw new IllegalArgumentException( I18n.err( I18n.ERR_00025, octs.elementAt(
i ).getClass().getName() ) );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_DER_OCTET_STRING_EXPECTED_00025,
octs.elementAt(
+                    i ).getClass().getName() ) );
             }
             catch ( IOException e )
             {
-                throw new IllegalArgumentException( I18n.err( I18n.ERR_00026, e.toString()
) );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_CANNOT_CONVERT_OCTETS_00026,
e.toString() ) );
             }
         }
 

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/BERTaggedObject.java
Sun Sep  5 17:12:14 2010
@@ -40,7 +40,7 @@ public class BERTaggedObject extends DER
      * @param obj
      *            the tagged object.
      */
-    public BERTaggedObject(int tag, DEREncodable obj)
+    public BERTaggedObject( int tag, DEREncodable obj )
     {
         super( tag, obj );
     }
@@ -54,7 +54,7 @@ public class BERTaggedObject extends DER
      * @param obj
      *            the tagged object.
      */
-    public BERTaggedObject(boolean explicit, int tag, DEREncodable obj)
+    public BERTaggedObject( boolean explicit, int tag, DEREncodable obj )
     {
         super( explicit, tag, obj );
     }
@@ -101,7 +101,7 @@ public class BERTaggedObject extends DER
                 }
                 else
                 {
-                    throw new RuntimeException( I18n.err( I18n.ERR_00027, obj.getClass().getName()
) );
+                    throw new RuntimeException( I18n.err( I18n.ERR_NOT_IMPLEMENTED_00027,
obj.getClass().getName() ) );
                 }
             }
             else

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/der/DERUniversalString.java
Sun Sep  5 17:12:14 2010
@@ -41,7 +41,7 @@ public class DERUniversalString extends 
     /**
      * Basic DERObject constructor.
      */
-    public DERUniversalString(byte[] value)
+    public DERUniversalString( byte[] value )
     {
         super( UNIVERSAL_STRING, value );
     }
@@ -60,7 +60,7 @@ public class DERUniversalString extends 
         }
         catch ( IOException e )
         {
-            throw new RuntimeException( I18n.err( I18n.ERR_00028 ) );
+            throw new RuntimeException( I18n.err( I18n.ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028
) );
         }
 
         byte[] string = baos.toByteArray();

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=992826&r1=992825&r2=992826&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 Sun
Sep  5 17:12:14 2010
@@ -46,23 +46,21 @@ public enum I18n
     ERR_MORE_TLV_EXPECTED_00009( "ERR_MORE_TLV_EXPECTED_00009" ),
     ERR_TRUNCATED_PDU_00010( "ERR_TRUNCATED_PDU_00010" ),
     ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011( "ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011"
),
-    ERR_00012( "ERR_00012" ),
     ERR_ODD_NUM_OF_CHARS_00013( "ERR_ODD_NUM_OF_CHARS_00013" ),
     ERR_ILLEGAL_HEX_CHAR_00014( "ERR_ILLEGAL_HEX_CHAR_00014" ),
-    ERR_00015( "ERR_00015" ),
-    ERR_00016( "ERR_00016" ),
-    ERR_00017( "ERR_00017" ),
-    ERR_00018( "ERR_00018" ),
-    ERR_00019( "ERR_00019" ),
-    ERR_00020( "ERR_00020" ),
-    ERR_00021( "ERR_00021" ),
-    ERR_00022( "ERR_00022" ),
-    ERR_00023( "ERR_00023" ),
-    ERR_00024( "ERR_00024" ),
-    ERR_00025( "ERR_00025" ),
-    ERR_00026( "ERR_00026" ),
-    ERR_00027( "ERR_00027" ),
-    ERR_00028( "ERR_00028" ),
+    ERR_END_OF_STREAM_00016( "ERR_END_OF_STREAM_00016" ),
+    ERR_EOF_FOUND_LENGTH_EXPECTED_00017( "ERR_EOF_FOUND_LENGTH_EXPECTED_00017" ),
+    ERR_DER_LENGTH_ABOVE_4_BYTES_00018( "ERR_DER_LENGTH_ABOVE_4_BYTES_00018" ),
+    ERR_EOF_FOUND_IN_LENGTH_00019( "ERR_EOF_FOUND_IN_LENGTH_00019" ),
+    ERR_CORRUPTED_STREAM_00020( "ERR_CORRUPTED_STREAM_00020" ),
+    ERR_EOF_FOUND_IN_OBJECT_00021( "ERR_EOF_FOUND_IN_OBJECT_00021" ),
+    ERR_READ_PAST_END_OF_FILE_00022( "ERR_READ_PAST_END_OF_FILE_00022" ),
+    ERR_UNKNOWN_BER_OBJECT_00023( "ERR_UNKNOWN_BER_OBJECT_00023" ),
+    ERR_OBJECT_NOT_DER_ENCODABLE_00024( "ERR_OBJECT_NOT_DER_ENCODABLE_00024" ),
+    ERR_DER_OCTET_STRING_EXPECTED_00025( "ERR_DER_OCTET_STRING_EXPECTED_00025" ),
+    ERR_CANNOT_CONVERT_OCTETS_00026( "ERR_CANNOT_CONVERT_OCTETS_00026" ),
+    ERR_NOT_IMPLEMENTED_00027( "ERR_NOT_IMPLEMENTED_00027" ),
+    ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028( "ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028"
),
     ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029( "ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029"
),
     ERR_BIT_NUMBER_OUT_OF_BOUND_00030( "ERR_BIT_NUMBER_OUT_OF_BOUND_00030" ),
     ERR_CANNOT_FIND_BIT_00031( "ERR_CANNOT_FIND_BIT_00031" ),

Modified: directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties?rev=992826&r1=992825&r2=992826&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
(original)
+++ directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
Sun Sep  5 17:12:14 2010
@@ -30,23 +30,21 @@ ERR_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH_0
 ERR_MORE_TLV_EXPECTED_00009=The PDU is decoded, but we should have had more TLVs
 ERR_TRUNCATED_PDU_00010=Truncated PDU. Some elements are lacking, accordingly to the grammar
 ERR_LENGTH_TOO_LONG_FOR_DEFINITE_FORM_00011=Length above 126 bytes are not allowed for a
definite form Length
-ERR_00012=argument not a byte array
 ERR_ODD_NUM_OF_CHARS_00013=Odd number of characters.
 ERR_ILLEGAL_HEX_CHAR_00014=Illegal hexadecimal character {0} at index {1}
-ERR_00015=non-hex character ''{0}'' encountered
-ERR_00016=End of stream.
-ERR_00017=EOF found when length expected.
-ERR_00018=DER length more than 4 bytes.
-ERR_00019=EOF found reading length.
-ERR_00020=Corrupted steam - negative length found.
-ERR_00021=EOF encountered in middle of object.
-ERR_00022=Attempt to read past end of file.
-ERR_00023=Unknown BER object encountered.
-ERR_00024=Object not DEREncodable.
-ERR_00025={0} found in input should only contain DEROctetString.
-ERR_00026=Exception converting octets {0}
-ERR_00027=Not implemented: {0}
-ERR_00028=Internal error encoding BitString.
+ERR_END_OF_STREAM_00016=End of stream.
+ERR_EOF_FOUND_LENGTH_EXPECTED_00017=EOF found when length expected.
+ERR_DER_LENGTH_ABOVE_4_BYTES_00018=DER length more than 4 bytes.
+ERR_EOF_FOUND_IN_LENGTH_00019=EOF found reading length.
+ERR_CORRUPTED_STREAM_00020=Corrupted steam - negative length found.
+ERR_EOF_FOUND_IN_OBJECT_00021=EOF encountered in middle of object.
+ERR_READ_PAST_END_OF_FILE_00022=Attempt to read past end of file.
+ERR_UNKNOWN_BER_OBJECT_00023=Unknown BER object encountered.
+ERR_OBJECT_NOT_DER_ENCODABLE_00024=Object not DEREncodable.
+ERR_DER_OCTET_STRING_EXPECTED_00025={0} found in input should only contain DEROctetString.
+ERR_CANNOT_CONVERT_OCTETS_00026=Exception converting octets {0}
+ERR_NOT_IMPLEMENTED_00027=Not implemented: {0}
+ERR_INTERNAL_ERROR_ENCODING_BITSTRING_00028=Internal error encoding BitString.
 ERR_NULL_OR_NEG_LENGTH_NOT_ALLOWED_00029=Null or negative length are not allowed
 ERR_BIT_NUMBER_OUT_OF_BOUND_00030=Bad bit number : out of bound
 ERR_CANNOT_FIND_BIT_00031=Cannot get a bit at position {0} when the BitString contains only
{1} ints



Mime
View raw message