On 19/03/2015 14:30, Uwe Schindler wrote:
Hi,

this seems to be a bug (or feature?) in the most recent Java 9 build 54:

compile-core:
     [mkdir] Created dir: 
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/build/analysis/common/classes/java
     [javac] Compiling 461 source files to 
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/build/analysis/common/classes/java
     [javac] 
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/CharArrayMap.java:568:
 error: incompatible types: CharArrayMap<CAP#1> cannot be converted to 
CharArrayMap<V>
     [javac]     return new CharArrayMap<>(map, false);
     [javac]            ^
     [javac]   where V is a type-variable:
     [javac]     V extends Object declared in method <V>copy(Map<?,? extends V>)
     [javac]   where CAP#1 is a fresh type-variable:
     [javac]     CAP#1 extends V from capture of ? extends V

This is the code:

   @SuppressWarnings("unchecked")
   public static <V> CharArrayMap<V> copy(final Map<?,? extends V> map) {
     if(map == EMPTY_MAP)
       return emptyMap();
     if(map instanceof CharArrayMap) {
       CharArrayMap<V> m = (CharArrayMap<V>) map;
       // use fast path instead of iterating all values
       // this is even on very small sets ~10 times faster than iterating
       final char[][] keys = new char[m.keys.length][];
       System.arraycopy(m.keys, 0, keys, 0, keys.length);
       final V[] values = (V[]) new Object[m.values.length];
       System.arraycopy(m.values, 0, values, 0, values.length);
       m = new CharArrayMap<>(m);
       m.keys = keys;
       m.values = values;
       return m;
     }
     return new CharArrayMap<>(map, false);
   }

At least this breaks compiling existing code. Rory, should I open a bug report 
with an example code?
Hi Uwe,

Please do log a bug.

Rgds,Rory

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


-----Original Message-----
From: Policeman Jenkins Server [mailto:jenk...@thetaphi.de]
Sent: Thursday, March 19, 2015 1:15 PM
To: dev@lucene.apache.org
Subject: [JENKINS] Lucene-Solr-5.x-Linux (32bit/jdk1.9.0-ea-b54) - Build #
11848 - Failure!

Build: http://jenkins.thetaphi.de/job/Lucene-Solr-5.x-Linux/11848/
Java: 32bit/jdk1.9.0-ea-b54 -server -XX:+UseConcMarkSweepGC

All tests passed

Build Log:
[...truncated 1899 lines...]
     [javac] Compiling 461 source files to /home/jenkins/workspace/Lucene-
Solr-5.x-Linux/lucene/build/analysis/common/classes/java
     [javac] /home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/common/src/java/org/apache/lucene/analysis/util/Ch
arArrayMap.java:568: error: incompatible types: CharArrayMap<CAP#1>
cannot be converted to CharArrayMap<V>
     [javac]     return new CharArrayMap<>(map, false);
     [javac]            ^
     [javac]   where V is a type-variable:
     [javac]     V extends Object declared in method <V>copy(Map<?,? extends
V>)
     [javac]   where CAP#1 is a fresh type-variable:
     [javac]     CAP#1 extends V from capture of ? extends V
     [javac] /home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunsp
ell/Stemmer.java:270: warning: [rawtypes] found raw type: Arc
     [javac]   final FST.Arc<IntsRef> prefixArcs[] = new FST.Arc[3];
     [javac]                                                ^
     [javac]   missing type arguments for generic class Arc<T>
     [javac]   where T is a type-variable:
     [javac]     T extends Object declared in class Arc
     [javac] /home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunsp
ell/Stemmer.java:274: warning: [rawtypes] found raw type: Arc
     [javac]   final FST.Arc<IntsRef> suffixArcs[] = new FST.Arc[3];
     [javac]                                                ^
     [javac]   missing type arguments for generic class Arc<T>
     [javac]   where T is a type-variable:
     [javac]     T extends Object declared in class Arc
     [javac] /home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/common/src/java/org/tartarus/snowball/Among.java:
46: warning: [rawtypes] found raw type: Class
     [javac]   private static final Class<?>[] EMPTY_PARAMS = new Class[0];
     [javac]                                                      ^
     [javac]   missing type arguments for generic class Class<T>
     [javac]   where T is a type-variable:
     [javac]     T extends Object declared in class Class
     [javac] Note: Some input files use or override a deprecated API.
     [javac] Note: Recompile with -Xlint:deprecation for details.
     [javac] 1 error

[...truncated 1 lines...]
BUILD FAILED
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/build.xml:529: The
following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/build.xml:477: The
following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/build.xml:61: The
following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/extra-targets.xml:39: The
following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/build.xml:456: The
following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/common-
build.xml:2166: The following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/build.xml:106: The following error occurred while
executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-
Linux/lucene/analysis/build.xml:38: The following error occurred while
executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/module-
build.xml:58: The following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/module-
build.xml:55: The following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/common-
build.xml:520: The following error occurred while executing this line:
/home/jenkins/workspace/Lucene-Solr-5.x-Linux/lucene/common-
build.xml:1882: Compile failed; see the compiler error output for details.

Total time: 15 minutes 25 seconds
Build step 'Invoke Ant' marked build as failure [description-setter]
Description set: Java: 32bit/jdk1.9.0-ea-b54 -server -
XX:+UseConcMarkSweepGC Archiving artifacts Recording test results Email
was triggered for: Failure - Any Sending email for trigger: Failure - Any



--
Rgds,Rory O'Donnell
Quality Engineering Manager
Oracle EMEA , Dublin, Ireland


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

Reply via email to