You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by to...@apache.org on 2007/06/19 11:49:34 UTC

svn commit: r548671 - in /harmony/enhanced/classlib/trunk/modules/jndi/src: main/java/javax/naming/ldap/ main/java/org/apache/harmony/jndi/asn1/ main/java/org/apache/harmony/jndi/internal/nls/ test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/

Author: tonywu
Date: Tue Jun 19 02:49:33 2007
New Revision: 548671

URL: http://svn.apache.org/viewvc?view=rev&rev=548671
Log:
revert revision 548598

Removed:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/asn1/
Modified:
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/SortResponseControl.java
    harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/nls/messages.properties
    harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/TestSortResponseControl.java

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/SortResponseControl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/SortResponseControl.java?view=diff&rev=548671&r1=548670&r2=548671
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/SortResponseControl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/javax/naming/ldap/SortResponseControl.java Tue Jun 19 02:49:33 2007
@@ -22,14 +22,13 @@
 
 import javax.naming.NamingException;
 
-import org.apache.harmony.jndi.asn1.ASN1Enumerated;
-import org.apache.harmony.jndi.asn1.ASN1Implicit;
-import org.apache.harmony.jndi.asn1.ASN1OctetString;
-import org.apache.harmony.jndi.asn1.ASN1Sequence;
-import org.apache.harmony.jndi.asn1.ASN1Type;
-import org.apache.harmony.jndi.asn1.BerInputStream;
 import org.apache.harmony.jndi.internal.SortResult;
 import org.apache.harmony.jndi.internal.Util;
+import org.apache.harmony.security.asn1.ASN1Enumerated;
+import org.apache.harmony.security.asn1.ASN1OctetString;
+import org.apache.harmony.security.asn1.ASN1Sequence;
+import org.apache.harmony.security.asn1.ASN1Type;
+import org.apache.harmony.security.asn1.BerInputStream;
 
 
 /**
@@ -72,7 +71,7 @@
      */
     static ASN1Type ASN1_SORTRESPONSE = new ASN1Sequence(new ASN1Type[] {
             ASN1Enumerated.getInstance(),   // sortResult
-            new ASN1Implicit(0, ASN1OctetString.getInstance()),   // attributeType
+            ASN1OctetString.getInstance(),  // attributeType
     }) {
         
         {
@@ -109,7 +108,7 @@
      * @ar.org.fitc.spec_ref
      */
     public SortResponseControl(String id, boolean criticality, byte[] value) throws IOException {
-        super(id,criticality,value);
+        super(OID,criticality,value);
         SortResult sr;
         sr = (SortResult) ASN1_SORTRESPONSE.decode(value);
         resultCode = sr.getSortresult();

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/nls/messages.properties?view=diff&rev=548671&r1=548670&r2=548671
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/nls/messages.properties (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/main/java/org/apache/harmony/jndi/internal/nls/messages.properties Tue Jun 19 02:49:33 2007
@@ -195,60 +195,3 @@
 ldap.21=was not found
 ldap.22=foundObjects is null
 ldap.23= not found in jar file 
-security.97=ASN.1 Named Bitstring: size contstrains
-security.10E=ASN.1 choice type: {0} MUST have at least one alternative
-security.10F=ASN.1 choice type: {0} MUST have alternatives with distinct tags
-security.110=Failed to decode ASN.1 choice type.  No alternatives were found for {0}
-security.13F=ASN.1 explicitly tagged type is expected at [{0}]. Expected tag: {1}, but encountered tag {2}
-security.9F=Implicit tagging can not be used for ASN.1 ANY or CHOICE type
-security.100=ASN.1 implicitly tagged type is expected at [{0}]. Expected tag: {1}, but encountered tag {2}
-security.101=ASN.1 type:{0} is not designed to be encoded
-security.102=Negative tag number
-security.103=Wrong tag class
-security.104=Tag long form is not implemented
-security.111=Wrong content length
-security.112=Decoding indefined length encoding is not provided
-security.113=Too long encoding at [{0}]
-security.114=ASN.1 Bitstring: wrong length. Tag at [{0}]
-security.115=ASN.1 Bitstring: wrong content at [{0}]. A number of unused bits MUST be in range 0 to 7
-security.116=ASN.1 Bitstring: wrong content at [{0}]. For empty string unused bits MUST be 0
-security.117=Decoding constructed ASN.1 bitstring  type is not provided
-security.118=ASN.1 bitstring identifier is expected at [{0}], but encountered: {1}
-security.119=ASN.1 enumerated identifier is expected at [{0}], but encountered: {1}
-security.11A=ASN.1 enumerated: wrong length for identifier at [{0}]
-security.11B=ASN.1 enumerated: wrong content at [{0}]. An integer MUST be encoded in minimum number of octets
-security.11C=ASN.1 boolean identifier is expected at [{0}], but encountered:{1} 
-security.11D=Wrong length for ASN.1 boolean at [{0}]
-security.11E=ASN.1 GeneralizedTime: encoded format is not implemented
-security.11F=ASN.1 GeneralizedTime wrongly encoded at [{0}]
-security.120=Decoding constructed ASN.1 GeneralizedTime type is not provided
-security.121=ASN.1 GeneralizedTime identifier is expected at [{0}], but encountered: {1}
-security.122=ASN.1 UTCTime: local time format is not supported.
-security.123=ASN.1 UTCTime: wrong length, identifier at [{0}]
-security.124=Decoding constructed ASN.1 UTCTime type is not provided
-security.125=ASN.1 UTCTime identifier is expected at [{0}], but encountered: {1}
-security.126=Time encoding has invalid char
-security.127=ASN.1 integer identifier is expected at [{0}], but encountered: {1}
-security.128=Wrong length for ASN.1 integer at [{0}]
-security.129=Wrong content for ASN.1 integer at [{0}]. An integer MUST be encoded in minimum number of octets
-security.12A=Decoding constructed ASN.1 octet string  type is not provided
-security.12B=ASN.1 octetstring identifier is expected at [{0}], but encountered: {1}
-security.12C=ASN.1 OID identifier is expected at [{0}], but encountered: {1}
-security.12D=Wrong length for ASN.1 object identifier at [{0}]
-security.12E=Wrong encoding at [{0}]
-security.12F=ASN.1 sequence identifier is expected at [{0}], but encountered: {1}
-security.130=ASN.1 Sequence: mandatory value is missing at [{0}]
-security.131=Mandatory value is missing at [{0}]
-security.132=ASN.1 Sequence: mandatory value is missing at [{0}]
-security.133=Mandatory value is missing at [{0}]
-security.134=Wrong encoding at [{0}]. Content's length and encoded length are not the same
-security.135=ASN.1 sequenceOf identifier is expected at [{0}], but encountered: {1}
-security.136=ASN.1 set identifier is expected at [{0}], but encountered: {1}
-security.137=Decoding ASN.1 Set type is not provided
-security.138=ASN.1 setOf identifier is expected at [{0}], but encountered: {1}
-security.139=Decoding constructed ASN.1 string type is not provided
-security.13A=ASN.1 string type identifier is expected at [{0}], but encountered: {1}
-security.13B=Unexpected end of encoding
-security.13C=Failed to read encoded content
-security.13D=Number of unused bits MUST be in range 0-7
-security.13E=For empty bit string unused bits MUST be 0

Modified: harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/TestSortResponseControl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/TestSortResponseControl.java?view=diff&rev=548671&r1=548670&r2=548671
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/TestSortResponseControl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/TestSortResponseControl.java Tue Jun 19 02:49:33 2007
@@ -424,33 +424,7 @@
 		}
 	}
 
-    /**
-     * <p>Test method for 'javax.naming.ldap.SortResponseControl.SortResponseControl(String, boolean, byte[])'</p>
-     */
-    public void testSortResponseControl019() throws IOException{
 
-        String Id="test";
-        boolean crit=false;
-        byte[] ber1={48,1,10,1,0};
-        byte[] ber2={48,5,10,1,3};
-        byte[] ber3={48,3,10,2,3,3};
-        byte[] ber4={48,4,10,1,3,3,3};
-        byte[] ber5={48,8,10,1,3,(byte)128,3,'T','e','s','t'};
-        SortResponseControl src=null;
-        src = new SortResponseControl(Id, crit, ber1);
-        assertEquals(Id, src.getID());
-        assertEquals(src.getResultCode(), 0);
-        src = new SortResponseControl(Id, crit, ber2);
-        assertEquals(src.getResultCode(), 3);
-        src = new SortResponseControl(Id, crit, ber3);
-        assertEquals(src.getResultCode(), 771);
-        src = new SortResponseControl(Id, crit, ber4);
-        assertEquals(src.getResultCode(), 3);
-        src = new SortResponseControl(Id, crit, ber5);
-        assertEquals(src.getResultCode(), 3);
-        assertEquals("Tes", src.getAttributeID());
-    }    
-    
 	/**
 	 * <p>Test method for 'javax.naming.ldap.SortResponseControl.isSorted()'</p>
 	 * <p>Here we are testing if this method determines if the search results have been successfully sorted.</p>