Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 59637 invoked from network); 26 Sep 2010 04:09:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Sep 2010 04:09:37 -0000 Received: (qmail 2321 invoked by uid 500); 26 Sep 2010 04:09:36 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 1889 invoked by uid 500); 26 Sep 2010 04:09:33 -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 1882 invoked by uid 99); 26 Sep 2010 04:09:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 04:09:32 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [85.25.71.29] (HELO mail.troja.net) (85.25.71.29) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 04:09:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 940D745EE8C for ; Sun, 26 Sep 2010 06:09:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.troja.net Received: from mail.troja.net ([127.0.0.1]) by localhost (megaira.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lkBndcq-gNml for ; Sun, 26 Sep 2010 06:08:50 +0200 (CEST) Received: from VEGA (70-35-37-2.static.wiline.com [70.35.37.2]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTPSA id C65D245EBE3 for ; Sun, 26 Sep 2010 06:08:49 +0200 (CEST) From: "Uwe Schindler" To: References: In-Reply-To: Subject: RE: Strange error with IBM Java 5 Date: Sat, 25 Sep 2010 21:09:13 -0700 Message-ID: <001001cb5d30$95c52610$c14f7230$@thetaphi.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0011_01CB5CF5.E968BF10" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKgZyHZF/JC599tvyw0gOrmUX9d4pF5kl4g Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0011_01CB5CF5.E968BF10 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit This error also happened with an older Sun javac. This crashed our Hudson build, too, until we upgraded to latest 1.5 version. But in my opinion, we should remove any annotation from the extended for-loop. And you are right the Suppress is no longer needed J ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: uwe@thetaphi.de From: Shai Erera [mailto:serera@gmail.com] Sent: Saturday, September 25, 2010 1:58 PM To: dev@lucene.apache.org Subject: Strange error with IBM Java 5 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.ja va: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.jav a: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 ------=_NextPart_000_0011_01CB5CF5.E968BF10 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

This error also happened with an older Sun javac. This crashed our = Hudson build, too, until we upgraded to latest 1.5 version. But in my = opinion, we should remove any annotation from the extended for-loop. And = you are right the Suppress is no longer needed J

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de<= /p>

eMail: uwe@thetaphi.de

 

From:= = Shai Erera [mailto:serera@gmail.com]
Sent: Saturday, = September 25, 2010 1:58 PM
To: = dev@lucene.apache.org
Subject: Strange error with IBM Java = 5

 

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/webapp= s/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)
&n= bsp;   [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; htt= p://bugs.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.java
=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 1001313)
+++ = lucene/src/test/org/apache/lucene/search/TestPositionIncrement.java = (working copy)
@@ -287,12 +287,10 = @@
       = }
       Collection<byte[]> = payloads =3D = pspans.getPayload();
       sawZero = |=3D pspans.start() =3D=3D 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

------=_NextPart_000_0011_01CB5CF5.E968BF10--