Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 42248 invoked from network); 25 Sep 2010 20:58:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Sep 2010 20:58:02 -0000 Received: (qmail 20712 invoked by uid 500); 25 Sep 2010 20:58:00 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 20636 invoked by uid 500); 25 Sep 2010 20:58:00 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 20629 invoked by uid 99); 25 Sep 2010 20:58:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 20:58:00 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of serera@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Sep 2010 20:57:52 +0000 Received: by fxm5 with SMTP id 5so3435143fxm.35 for ; Sat, 25 Sep 2010 13:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=RqTLqI3RrHSkXHlVNH9UlAzfSlPToef6kbG48+r2W+o=; b=x1e5ofyYB5lN6h3Z84XCT1Se1z22XeCBrQzOTBxdRvJI/IwTH4zf1FHh22rCAq5BU4 MPrIPPT7mOuJ6DYYbrqzQ4fGdxce6R6g7aSkW73dd8bTOC0+nNYxUomM5xXC+pZoGhmt w/tkghJIYS+TV1STtduJZFxv2BYz3s+UHqKps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=dVoUAgnomO13G2KWsK0pKMMB/dc7hW/qEOpxT5tcctvNaH0TcvOwhQN+0UTO1PXgQJ qLyom6UCUjnBVuniP9EczSjPe0m/n6Gt5Jx58+ueeZBlXoUUvwxovbX42IKEWOJTF4cR u6bZPWWNXNdJEoRYbyNHgVwmjeiznVb97FVxM= MIME-Version: 1.0 Received: by 10.103.176.7 with SMTP id d7mr479407mup.52.1285448252366; Sat, 25 Sep 2010 13:57:32 -0700 (PDT) Received: by 10.103.243.7 with HTTP; Sat, 25 Sep 2010 13:57:32 -0700 (PDT) Date: Sat, 25 Sep 2010 22:57:32 +0200 Message-ID: Subject: Strange error with IBM Java 5 From: Shai Erera To: dev@lucene.apache.org Content-Type: multipart/alternative; boundary=0016364c7923759ef904911bbee8 X-Virus-Checked: Checked by ClamAV on apache.org --0016364c7923759ef904911bbee8 Content-Type: text/plain; charset=ISO-8859-1 Hi I svn upped today (actually saw this few days ago too), and ran 'ant clean'. Then from lucene/contrib/benchmark I ran 'ant compile' and hit this: [javac] An exception has occurred in the compiler (1.5.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. [javac] java.lang.AssertionError: {unused} [javac] at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.visitArray(TreeMaker.java:655) [javac] at com.sun.tools.javac.code.Attribute$Array.accept(Attribute.java:151) [javac] at com.sun.tools.javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:658) BUILD FAILED This only happened w/ IBM Java 5, and didn't happen w/ Sun's 5 or IBM/Sun's 6. I've found this related; http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6297416. Searched the code for "unused" suppresses and found TestPositionIncrement had this pattern. So I've committed this to trunk (doesn't happen on 3x 'cause the Suppress isn't there): Index: lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java =================================================================== --- lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java (revision 1001313) +++ lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java (working copy) @@ -287,12 +287,10 @@ } Collection payloads = pspans.getPayload(); sawZero |= pspans.start() == 0; - for (@SuppressWarnings("unused") byte[] bytes : payloads) { + for (byte[] bytes : payloads) { count++; - if (!VERBOSE) { - // do nothing - } else { - System.out.println(" payload: " + new String((byte[]) bytes)); + if (VERBOSE) { + System.out.println(" payload: " + new String(bytes)); } } } BTW, the Suppress was not necessary because the byte[] is used in the print. FYI in case you run into it one day :). Shai --0016364c7923759ef904911bbee8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi

I svn upped today (actually saw this few days ag= o too), and ran 'ant clean'. Then from lucene/contrib/benchmark I r= an 'ant compile' and hit this:

=A0=A0=A0 [javac] An exceptio= n has occurred in the compiler (1.5.0). Please file a bug at the Java Devel= oper Connection (http://j= ava.sun.com/webapps/bugreport)=A0 after
=A0checking the Bug Parade for duplicates. Include your program and the fol= lowing diagnostic in your report.=A0 Thank you.
=A0=A0=A0 [javac] java.l= ang.AssertionError: {unused}
=A0=A0=A0 [javac]=A0=A0=A0=A0 at com.sun.to= ols.javac.tree.TreeMaker$AnnotationBuilder.visitArray(TreeMaker.java:655) =A0=A0=A0 [javac]=A0=A0=A0=A0 at com.sun.tools.javac.code.Attribute$Array.a= ccept(Attribute.java:151)
=A0=A0=A0 [javac]=A0=A0=A0=A0 at com.sun.tools= .javac.tree.TreeMaker$AnnotationBuilder.translate(TreeMaker.java:658)
BUILD FAILED

This only happened w/ IBM Java 5, and didn't happ= en w/ Sun's 5 or IBM/Sun's 6. I've found this related; http://bu= gs.sun.com/bugdatabase/view_bug.do?bug_id=3D6297416. Searched the code = for "unused" suppresses and found TestPositionIncrement had this = pattern. So I've committed this to trunk (doesn't happen on 3x '= ;cause the Suppress isn't there):

Index: lucene/src/test/org/apache/lucene/search/TestPositionIncrement.j= ava
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- lucene/= src/test/org/apache/lucene/search/TestPositionIncrement.java (revision 1001= 313)
+++ lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java (wo= rking copy)
@@ -287,12 +287,10 @@
=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0= =A0=A0=A0 Collection<byte[]> payloads =3D pspans.getPayload();
=A0= =A0=A0=A0=A0=A0 sawZero |=3D pspans.start() =3D=3D 0;
-=A0=A0=A0=A0=A0 for (@SuppressWarnings("unused") byte[] bytes : = payloads) {
+=A0=A0=A0=A0=A0 for (byte[] bytes : payloads) {
=A0=A0= =A0=A0=A0=A0=A0=A0 count++;
-=A0=A0=A0=A0=A0=A0=A0 if (!VERBOSE) {
-= =A0=A0=A0=A0=A0=A0=A0=A0=A0 // do nothing
-=A0=A0=A0=A0=A0=A0=A0 } else = {
-=A0=A0=A0=A0=A0=A0=A0=A0=A0 System.out.println("=A0 payload: &qu= ot; + new String((byte[]) bytes));
+=A0=A0=A0=A0=A0=A0=A0 if (VERBOSE) {
+=A0=A0=A0=A0=A0=A0=A0=A0=A0 Syste= m.out.println("=A0 payload: " + new String(bytes));
=A0=A0=A0= =A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0 }

BTW, the= Suppress was not necessary because the byte[] is used in the print.

FYI in case you run into it one day :).

Shai
--0016364c7923759ef904911bbee8--