Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot subclass HttpHeaders and build with JDK 7 with maven build of 4.0.26.Final #3548

Closed
timboudreau opened this issue Mar 28, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@timboudreau
Copy link
Contributor

It seems the build of Netty 4.0.26.Final from Maven is built with JDK 8, which adds default methods to collections classes that reference classes that don't exist in JDK 7. That's binary compatible, but not source compatible, as follows:

I am stuck with JDK 7 for a while longer (thanks @schue ) for Actuer. As of Netty 4.0.26.Final my build is broken because javac sees spliterator methods and classes in HttpHeaders. To fix it I'm staying with Netty 4.0.25 for now for Acteur, but that's not a long-term solution.

Since AFAIK, Netty 4 is buildable on JDK 7, is it possible for JARs released to Maven Central also to be built with JDK 7?

I imagine I am not the only one in this situation.

@Scottmitch
Copy link
Member

@timboudreau - Thanks for reporting!

@normanmaurer - Building the releases from jdk7 sounds reasonable...WDYT?

@trustin
Copy link
Member

trustin commented Mar 29, 2015

Sounds good to me. See the restricted-release profile to enforce JDK version when a release is made.

trustin added a commit that referenced this issue Mar 29, 2015
Motivations:

JDK 1.8 adds default methods to collections classes that reference
classes that don't exist in JDK 7. That's binary compatible,
but not source compatible.

Modifications:

Enforce JDK version to be 1.7.* when releasing

Result:

Fixes #3548
@trustin trustin closed this as completed Mar 29, 2015
trustin added a commit that referenced this issue Mar 29, 2015
Motivations:

JDK 1.8 adds default methods to collections classes that reference
classes that don't exist in JDK 7. That's binary compatible,
but not source compatible.

Modifications:

Enforce JDK version to be 1.7.* when releasing

Result:

Fixes #3548
@trustin trustin assigned trustin and unassigned normanmaurer Mar 29, 2015
@trustin
Copy link
Member

trustin commented Mar 29, 2015

Should be fixed on 0222f41 (4.0) and bdf0bdd (4.1)

@normanmaurer
Copy link
Member

@timboudreau @trustin I will revert this one as it seems like it was fixed in java some time ago

normanmaurer added a commit that referenced this issue Dec 9, 2016
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Use again java8 and so remove all the reflection hacks.

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Dec 13, 2016
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Use again java8 and so remove all the reflection hacks.

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Dec 14, 2016
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Dec 20, 2016
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Feb 10, 2017
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Feb 14, 2017
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
normanmaurer added a commit that referenced this issue Feb 14, 2017
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
liuzhengyang pushed a commit to liuzhengyang/netty that referenced this issue Sep 10, 2017
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [netty#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
kiril-me pushed a commit to kiril-me/netty that referenced this issue Feb 28, 2018
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [netty#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
pulllock pushed a commit to pulllock/netty that referenced this issue Oct 19, 2023
Motivations:

JDK 1.8 adds default methods to collections classes that reference
classes that don't exist in JDK 7. That's binary compatible,
but not source compatible.

Modifications:

Enforce JDK version to be 1.7.* when releasing

Result:

Fixes netty#3548
pulllock pushed a commit to pulllock/netty that referenced this issue Oct 19, 2023
Motivation:

We previously changed netty to always compile with java7 as otherwise source compatibility was broken.

This was reported in [netty#3548] but was fixed in the meantime:
- https://bugs.openjdk.java.net/browse/JDK-8029240
- https://bugs.openjdk.java.net/browse/JDK-8030855

Modifications:

Change minimum JDK version for compilation to 1.8

Result:

Easier to maintain code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants