Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 270 invoked from network); 19 Jun 2007 09:38:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 09:38:00 -0000 Received: (qmail 21649 invoked by uid 500); 19 Jun 2007 09:37:58 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 21620 invoked by uid 500); 19 Jun 2007 09:37:58 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 21611 invoked by uid 99); 19 Jun 2007 09:37:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 02:37:58 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of wuyuehao@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 02:37:54 -0700 Received: by ug-out-1314.google.com with SMTP id s2so63152uge for ; Tue, 19 Jun 2007 02:37:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QMTGoK9rEocaCcu42msTLioOdAYf5olGIlMwuRDSAQg2DuqVUaWSacb5sJEvpMuapeTIOwf740AyI/k23zRamZyR1ubBUGv+bJzDWhGIg+CRPxkV4sM3tuw19R/LnMoxZv2fnCFJMzX/RO3ztxQaP2bywSdqY0XVZxJL0lr6mXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p8D2JnP1b6qwtAdbS8VTqmVoBUg10ceG/IjdDhARWKiQ2oXfXGUljyFfupNIwWkkeaqeXvEgKZykIweLTnymEBSVk3t/UujvgHraUclRUFG9HmK9hJIJR5lAd0OjuTc234uoceimQ0yxihkMY+3GcvB1VKPbyiurdRM2MEDwBPs= Received: by 10.82.112.16 with SMTP id k16mr13236254buc.1182245852214; Tue, 19 Jun 2007 02:37:32 -0700 (PDT) Received: by 10.82.141.19 with HTTP; Tue, 19 Jun 2007 02:37:32 -0700 (PDT) Message-ID: <211709bc0706190237l19a54265uc0c94a2b7955181b@mail.gmail.com> Date: Tue, 19 Jun 2007 17:37:32 +0800 From: "Tony Wu" To: dev@harmony.apache.org Subject: Re: [jira] Commented: (HARMONY-4226) [classlib][jndi] Class SortResponseControl has some failures In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6e47b64f0706190120kfb1e8c6v4f9493374949f37f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi Stepan and Alexei, I'm sorry I should post here to discuss before I commit. The reason is Jndi has different requirement against other modules on ASN1. For example, following code throws exception on harmony while passes on RI. String Id="test"; boolean crit=false; byte[] ber1={48,1,10,1,0}; SortResponseControl src=null; src = new SortResponseControl(Id, crit, ber1); The stack trace is[1] If I fix it in security directly, some regression[2] will be caused. I'm not an expert on security, so I believe it is a temp workaround for jndi. I'd like to roll back this commit and wait for discussion here. [1] org.apache.harmony.security.asn1.ASN1Exception: Wrong content length at org.apache.harmony.security.asn1.BerInputStream.(BerInputStream.java:12) at org.apache.harmony.security.asn1.DerInputStream.(DerInputStream.java:39) at org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:98) at javax.naming.ldap.SortResponseControl.(SortResponseControl.java:114) at org.apache.harmony.jndi.tests.javax.naming.ldap.TestSortResponseControl.testSortResponseControl019(TestSortResponseControl.java:440) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) at java.lang.reflect.Method.invoke(Method.java:258) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:16) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:19) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:28) at junit.framework.TestSuite.run(TestSuite.java:23) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) [2] test_Ctor$LbyteLintLint Failure No expected ASN1Exception junit.framework.AssertionFailedError: No expected ASN1Exception at org.apache.harmony.security.tests.asn1.der.BerInputStreamTest.test_Ctor$LbyteLintLint(BerInputStreamTest.java:136) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) On 6/19/07, Alexei Fedotov wrote: > +1 to Stepan's question > > On 6/19/07, Stepan Mishura wrote: > > Hi Tony,Kelvin, > > > > I'm confused with the issue resolution. The ASN.1 encoders/decoders > > from 'security' module used by other modules (auth, crypto). But I can > > not understand why 'jndi' module need the separate/own set of > > encoders/decoders copied from 'security' module (r548598). What's > > wrong with importing it from 'security' module? Could you comment? > > > > Thanks, > > Stepan. > > > > -----Original Message----- > > From: Tony Wu (JIRA) [mailto:jira@apache.org] > > Sent: Tuesday, June 19, 2007 12:10 PM > > To: commits@harmony.apache.org > > Subject: [jira] Commented: (HARMONY-4226) [classlib][jndi] Class > > SortResponseControl has some failures > > > > > > [ https://issues.apache.org/jira/browse/HARMONY-4226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506046 > > ] > > > > Tony Wu commented on HARMONY-4226: > > ---------------------------------- > > > > Hi Kelvin, > > This patch brings extra dependency from security to jndi. I suggest > > that we use the Messages.java in jndi rather than that in security. > > > > > [classlib][jndi] Class SortResponseControl has some failures > > > ------------------------------------------------------------ > > > > > > Key: HARMONY-4226 > > > URL: https://issues.apache.org/jira/browse/HARMONY-4226 > > > Project: Harmony > > > Issue Type: Bug > > > Components: Classlib > > > Environment: linux and windows > > > Reporter: Kelvin Ye > > > Assignee: Tony Wu > > > Attachments: harmony-4226.zip > > > > > > > > > Class SortResponseControl will fail in the following test cases, but RI will pass. > > > 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()); > > > > -- > > This message is automatically generated by JIRA. > > - > > You can reply to this email to add a comment to the issue online > > > > > > Thanks, > > Stepan Mishura > > Intel Enterprise Solutions Software Division > > > > > -- > With best regards, > Alexei, > ESSD, Intel > -- Tony Wu China Software Development Lab, IBM