You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Grant Ingersoll <gs...@apache.org> on 2009/06/02 02:01:04 UTC

Tests fail to compile on JDK 1.4?

Anyone else seeing:
common.compile-test:
   [mkdir] Created dir: .../build/classes/test
   [javac] Compiling 190 source files to .../build/classes/test
   [javac] .../src/test/org/apache/lucene/search/ 
TestTopScoreDocCollector.java:70: cannot resolve symbol
   [javac] symbol  : method getSimpleName ()
   [javac] location: class java.lang.Class
   [javac]         assertEquals(actualTSDCClass[i],  
tdc.getClass().getSimpleName());
   [javac]                                                      ^
   [javac] Note: Some input files use or override a deprecated API.
   [javac] Note: Recompile with -deprecation for details.
   [javac] 1 error

Looks like we've got some 1.5 stuff in core test.

-Grant

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Re: Tests fail to compile on JDK 1.4?

Posted by Shai Erera <se...@gmail.com>.
Thanks for the explanation.

On Tue, Jun 2, 2009 at 9:49 AM, Uwe Schindler <uw...@thetaphi.de> wrote:

>  Hi Shai,
>
>
>
> it is set to 1.4. The problem, during compilation, the class library
> (rt.jar) of the installed JDK contains new methods from 1.5, so even when
> you set the compiler level to 1.4, it still checks all methods/classes
> against the current rt.jar.
>
> We had some discussions about it, the easiest is, to set the bootclasspath
> in the <javac/> task to an older rt.jar during compilation. Because this
> needs updates for e.g. Hudson (rt.jar missing) we said, that the one, who
> releases the final version should simply check this before on the
> compilation computer in the release process.
>
>
>
> Uwe
>
> -----
> 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:* Tuesday, June 02, 2009 8:38 AM
> *To:* java-dev@lucene.apache.org
> *Subject:* Re: Tests fail to compile on JDK 1.4?
>
>
>
> My fault. I didn't notice Class.getSimpleName() exists since Java 1.5.
> I wonder if it's possible to set the compiler level to 1.4 in the
> build.xml. This is needed for core, but for contrib it should be 1.5. I'll
> check if that's possible and post a patch if it is.
>
> On Tue, Jun 2, 2009 at 3:53 AM, Michael McCandless <
> lucene@mikemccandless.com> wrote:
>
> Yes I'm seeing this too.  I thought I had fixed it, with LUCENE-1655,
> but somehow I didn't...
>
> I'll fix.
>
> Mike
>
>
> On Mon, Jun 1, 2009 at 8:01 PM, Grant Ingersoll <gs...@apache.org>
> wrote:
> > Anyone else seeing:
> > common.compile-test:
> >  [mkdir] Created dir: .../build/classes/test
> >  [javac] Compiling 190 source files to .../build/classes/test
> >  [javac]
> > .../src/test/org/apache/lucene/search/TestTopScoreDocCollector.java:70:
> > cannot resolve symbol
> >  [javac] symbol  : method getSimpleName ()
> >  [javac] location: class java.lang.Class
> >  [javac]         assertEquals(actualTSDCClass[i],
> > tdc.getClass().getSimpleName());
> >  [javac]                                                      ^
> >  [javac] Note: Some input files use or override a deprecated API.
> >  [javac] Note: Recompile with -deprecation for details.
> >  [javac] 1 error
> >
> > Looks like we've got some 1.5 stuff in core test.
> >
> > -Grant
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-dev-help@lucene.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>
>

RE: Tests fail to compile on JDK 1.4?

Posted by Chris Hostetter <ho...@fucit.org>.
: We had some discussions about it, the easiest is, to set the bootclasspath
: in the <javac/> task to an older rt.jar during compilation. Because this
: needs updates for e.g. Hudson (rt.jar missing) we said, that the one, who
: releases the final version should simply check this before on the
: compilation computer in the release process.

there are ways to automate this sanity check in ant, i took a stab at 
this a while back...
  https://issues.apache.org/jira/browse/LUCENE-718

...but i never moved forward with it becuase most people didn't seemed 
that concerned.



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


RE: Tests fail to compile on JDK 1.4?

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi Shai,

 

it is set to 1.4. The problem, during compilation, the class library
(rt.jar) of the installed JDK contains new methods from 1.5, so even when
you set the compiler level to 1.4, it still checks all methods/classes
against the current rt.jar.

We had some discussions about it, the easiest is, to set the bootclasspath
in the <javac/> task to an older rt.jar during compilation. Because this
needs updates for e.g. Hudson (rt.jar missing) we said, that the one, who
releases the final version should simply check this before on the
compilation computer in the release process.

 

Uwe

-----
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: Tuesday, June 02, 2009 8:38 AM
To: java-dev@lucene.apache.org
Subject: Re: Tests fail to compile on JDK 1.4?

 

My fault. I didn't notice Class.getSimpleName() exists since Java 1.5.
I wonder if it's possible to set the compiler level to 1.4 in the build.xml.
This is needed for core, but for contrib it should be 1.5. I'll check if
that's possible and post a patch if it is.

On Tue, Jun 2, 2009 at 3:53 AM, Michael McCandless
<lu...@mikemccandless.com> wrote:

Yes I'm seeing this too.  I thought I had fixed it, with LUCENE-1655,
but somehow I didn't...

I'll fix.

Mike


On Mon, Jun 1, 2009 at 8:01 PM, Grant Ingersoll <gs...@apache.org> wrote:
> Anyone else seeing:
> common.compile-test:
>  [mkdir] Created dir: .../build/classes/test
>  [javac] Compiling 190 source files to .../build/classes/test
>  [javac]
> .../src/test/org/apache/lucene/search/TestTopScoreDocCollector.java:70:
> cannot resolve symbol
>  [javac] symbol  : method getSimpleName ()
>  [javac] location: class java.lang.Class
>  [javac]         assertEquals(actualTSDCClass[i],
> tdc.getClass().getSimpleName());
>  [javac]                                                      ^
>  [javac] Note: Some input files use or override a deprecated API.
>  [javac] Note: Recompile with -deprecation for details.
>  [javac] 1 error
>
> Looks like we've got some 1.5 stuff in core test.
>
> -Grant
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org

 


Re: Tests fail to compile on JDK 1.4?

Posted by Shai Erera <se...@gmail.com>.
My fault. I didn't notice Class.getSimpleName() exists since Java 1.5.
I wonder if it's possible to set the compiler level to 1.4 in the build.xml.
This is needed for core, but for contrib it should be 1.5. I'll check if
that's possible and post a patch if it is.

On Tue, Jun 2, 2009 at 3:53 AM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Yes I'm seeing this too.  I thought I had fixed it, with LUCENE-1655,
> but somehow I didn't...
>
> I'll fix.
>
> Mike
>
> On Mon, Jun 1, 2009 at 8:01 PM, Grant Ingersoll <gs...@apache.org>
> wrote:
> > Anyone else seeing:
> > common.compile-test:
> >  [mkdir] Created dir: .../build/classes/test
> >  [javac] Compiling 190 source files to .../build/classes/test
> >  [javac]
> > .../src/test/org/apache/lucene/search/TestTopScoreDocCollector.java:70:
> > cannot resolve symbol
> >  [javac] symbol  : method getSimpleName ()
> >  [javac] location: class java.lang.Class
> >  [javac]         assertEquals(actualTSDCClass[i],
> > tdc.getClass().getSimpleName());
> >  [javac]                                                      ^
> >  [javac] Note: Some input files use or override a deprecated API.
> >  [javac] Note: Recompile with -deprecation for details.
> >  [javac] 1 error
> >
> > Looks like we've got some 1.5 stuff in core test.
> >
> > -Grant
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-dev-help@lucene.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

Re: Tests fail to compile on JDK 1.4?

Posted by Michael McCandless <lu...@mikemccandless.com>.
Yes I'm seeing this too.  I thought I had fixed it, with LUCENE-1655,
but somehow I didn't...

I'll fix.

Mike

On Mon, Jun 1, 2009 at 8:01 PM, Grant Ingersoll <gs...@apache.org> wrote:
> Anyone else seeing:
> common.compile-test:
>  [mkdir] Created dir: .../build/classes/test
>  [javac] Compiling 190 source files to .../build/classes/test
>  [javac]
> .../src/test/org/apache/lucene/search/TestTopScoreDocCollector.java:70:
> cannot resolve symbol
>  [javac] symbol  : method getSimpleName ()
>  [javac] location: class java.lang.Class
>  [javac]         assertEquals(actualTSDCClass[i],
> tdc.getClass().getSimpleName());
>  [javac]                                                      ^
>  [javac] Note: Some input files use or override a deprecated API.
>  [javac] Note: Recompile with -deprecation for details.
>  [javac] 1 error
>
> Looks like we've got some 1.5 stuff in core test.
>
> -Grant
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org