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

Produce java8 bytecode #471

Merged
merged 3 commits into from
Nov 29, 2021
Merged

Produce java8 bytecode #471

merged 3 commits into from
Nov 29, 2021

Conversation

carterkozak
Copy link
Contributor

==COMMIT_MSG==
Produce java8 bytecode
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Nov 29, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Produce java8 bytecode

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from robert3005 November 29, 2021 10:42
@carterkozak carterkozak requested review from fawind and removed request for robert3005 November 29, 2021 10:43
@carterkozak
Copy link
Contributor Author

Requires palantir/gradle-baseline#1992

@robert3005
Copy link

Why do we care about java 8 bytecode here?

@bulldozer-bot bulldozer-bot bot merged commit 690d77d into develop Nov 29, 2021
@bulldozer-bot bulldozer-bot bot deleted the ckozak/java8 branch November 29, 2021 11:27
@svc-autorelease
Copy link
Collaborator

Released 1.4.0

@SerialVelocity
Copy link
Collaborator

@robert3005 I chatted with @carterkozak over Slack. We should release a final 1.x version that doesn't break Java 8 compat, then we should release a 2.0 release where we remove the Java 8 support from the library. There's some reflection logic inside the library:

private void setNameService(DockerNameService nameService) {
String version = System.getProperty("java.version");
if (version.startsWith("1.")) {
getJava8NameServices().add(0, wrapNameService("sun.net.spi.nameservice.NameService", nameService, null));
} else {
originalNameService = getJava9NameService();
setJava9NameService(wrapNameService("java.net.InetAddress$NameService", nameService, originalNameService));
}
}
private void unsetNameService() {
String version = System.getProperty("java.version");
if (version.startsWith("1.")) {
getJava8NameServices().remove(0);
} else {
setJava9NameService(originalNameService);
}
}

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

Successfully merging this pull request may close these issues.

5 participants