Hi,
I was playing with the issue related to searchable nested views [1] and it turned out that the implementation would be much easier with Java 8's default methods in interfaces. Unfortunately after switching compiler in Maven configuration to Java 8 the compilation fails with quite complex looking generics related error:
<code>
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ jenkins-core ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1046 source files to /home/foo/code/jenkins/core/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/foo/code/jenkins/core/src/main/java/hudson/model/User.java:[658,22] error: method fromJobs in class RunList<R#2> cannot be applied to given types;
[ERROR] required: Iterable<? extends J#1>
found: Iterable<Job>
reason: inferred type does not conform to lower bound(s)
inferred: J#2
lower bound(s): T,Job
where J#1,R#1,R#2,J#2,R#3,T are type-variables:
J#1 extends Job<J#1,R#1> declared in method <J#1,R#1>fromJobs(Iterable<? extends J#1>)
R#1 extends Run<J#1,R#1> declared in method <J#1,R#1>fromJobs(Iterable<? extends J#1>)
R#2 extends Run declared in class RunList
J#2 extends Job<J#2,R#3>
R#3 extends Run<J#2,R#3>
T extends J#2
/home/foo/code/jenkins/core/src/main/java/hudson/model/Computer.java:[781,22] error: method fromJobs in class RunList<R#2> cannot be applied to given types;
[INFO] 2 errors
</code>
I wonder if it is a known issue or maybe even anyone gave a look at it already?
Changes in the configuration triggering that error are available in my branch [2] (just in case :) ).
[1] -
https://groups.google.com/forum/#!topic/jenkinsci-dev/GTjiXQkN4Fs[2] -
https://github.com/szpak/jenkins/tree/feature/searchableNestedViewsMarcin
--
http://blog.solidsoft.info - Solid Soft - Working code is not enough