You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Carsten Ziegeler <cz...@apache.org> on 2015/07/25 17:29:38 UTC

Minimum Java version for resolver and framework?

Hi,

I'm wondering what the minimum version for the resolver and the
framework is / should be?

I'm unable to compile current trunk of the resolver with 1.7, 1.8 works.

Although the framework sets the compiler to 1.5, it uses methods of
newer Java versions.

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Minimum Java version for resolver and framework?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Carsten,

indeed, let me take a look.

Thanks,
Regards
JB

On 07/26/2015 09:53 AM, Carsten Ziegeler wrote:
> Am 25.07.15 um 17:51 schrieb Jean-Baptiste Onofré:
>> Hi Carsten,
>>
>> I just built resolver trunk (1.5.0-SNAPSHOT) with Java 1.8 and Maven 3.2.5.
>>
>> What's your issue ?
>>
> Right, it works with 1.8, but it doesnt with 1.7:
>
> I get two compilation failures like this:
> resolver/src/main/java/org/apache/felix/resolver/util/ArrayMap.java:[100,46]
> <anonymous org.apache.felix.resolver.util.ArrayMap$1$1> is not abstract
> and does not override abstract method remove() in java.util.Iterator
>
> so this code really requires Java 8 (default methods in interfaces).
> I guess this is not the intention?
>
> Carsten
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Minimum Java version for resolver and framework?

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 26.07.15 um 21:19 schrieb Guillaume Nodet:
> No, that's definitely not the intention.
> I have been working with JDK 8 and I missed this error.
> We can set up the animal-sniffer maven plugin to make sure we only use
> allowed signatures.
>


Unfortunately, this already fails right now before the animal sniffer
plugin runs as its a compilation error :)

Interestingly, when building with java 8, the animal sniffer plugin runs
and checks against 1.5, but does not find the problem as I guess the
resulting classes contain the missing methods.

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Minimum Java version for resolver and framework?

Posted by Guillaume Nodet <gn...@apache.org>.
No, that's definitely not the intention.
I have been working with JDK 8 and I missed this error.
We can set up the animal-sniffer maven plugin to make sure we only use
allowed signatures.

2015-07-26 9:53 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Am 25.07.15 um 17:51 schrieb Jean-Baptiste Onofré:
> > Hi Carsten,
> >
> > I just built resolver trunk (1.5.0-SNAPSHOT) with Java 1.8 and Maven
> 3.2.5.
> >
> > What's your issue ?
> >
> Right, it works with 1.8, but it doesnt with 1.7:
>
> I get two compilation failures like this:
>
> resolver/src/main/java/org/apache/felix/resolver/util/ArrayMap.java:[100,46]
> <anonymous org.apache.felix.resolver.util.ArrayMap$1$1> is not abstract
> and does not override abstract method remove() in java.util.Iterator
>
> so this code really requires Java 8 (default methods in interfaces).
> I guess this is not the intention?
>
> Carsten
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>

Re: Minimum Java version for resolver and framework?

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 25.07.15 um 17:51 schrieb Jean-Baptiste Onofré:
> Hi Carsten,
> 
> I just built resolver trunk (1.5.0-SNAPSHOT) with Java 1.8 and Maven 3.2.5.
> 
> What's your issue ?
> 
Right, it works with 1.8, but it doesnt with 1.7:

I get two compilation failures like this:
resolver/src/main/java/org/apache/felix/resolver/util/ArrayMap.java:[100,46]
<anonymous org.apache.felix.resolver.util.ArrayMap$1$1> is not abstract
and does not override abstract method remove() in java.util.Iterator

so this code really requires Java 8 (default methods in interfaces).
I guess this is not the intention?

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Minimum Java version for resolver and framework?

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Carsten,

I just built resolver trunk (1.5.0-SNAPSHOT) with Java 1.8 and Maven 3.2.5.

What's your issue ?

Regards
JB

On 07/25/2015 05:29 PM, Carsten Ziegeler wrote:
> Hi,
>
> I'm wondering what the minimum version for the resolver and the
> framework is / should be?
>
> I'm unable to compile current trunk of the resolver with 1.7, 1.8 works.
>
> Although the framework sets the compiler to 1.5, it uses methods of
> newer Java versions.
>
> Carsten
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Minimum Java version for resolver and framework?

Posted by Carsten Ziegeler <cz...@apache.org>.
I've now fixed the compilation problem in the resolver module, it builds
fine with Java 7 (and should also with Java 5 and 6). The animal sniffer
plugin verifies against Java 5.

I've also updated the framework to use the latest parent pom. The
framework is using Java 6 api and I've configured the animal sniffer
plugin accordingly.

Carsten

Am 25.07.15 um 17:29 schrieb Carsten Ziegeler:
> Hi,
> 
> I'm wondering what the minimum version for the resolver and the
> framework is / should be?
> 
> I'm unable to compile current trunk of the resolver with 1.7, 1.8 works.
> 
> Although the framework sets the compiler to 1.5, it uses methods of
> newer Java versions.
> 
> Carsten
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: Minimum Java version for resolver and framework?

Posted by Bob Paulin <bo...@bobpaulin.com>.
Hi,

I think just last year or 2 I started seeing Java 1.6 in Felix.  I think 
many organizations have moved past 1.6 to 1.7 but not many that are 
quickly moving to 1.8.  I guess the question is do we want to make Java 
8 a requirement for future versions of Felix?  Are there features we 
need from 1.8?   If not it might be better to compile at 1.7 for a bit.

- Bob Paulin

On 7/25/2015 10:29 AM, Carsten Ziegeler wrote:
> Hi,
>
> I'm wondering what the minimum version for the resolver and the
> framework is / should be?
>
> I'm unable to compile current trunk of the resolver with 1.7, 1.8 works.
>
> Although the framework sets the compiler to 1.5, it uses methods of
> newer Java versions.
>
> Carsten