Change target Java version to 7#2043
Merged
eamonnmcmanus merged 3 commits intogoogle:masterfrom Dec 31, 2021
Merged
Conversation
Marcono1234
commented
Dec 30, 2021
| @@ -1,4 +1,4 @@ | |||
| # gson-codegen | |||
Contributor
Author
There was a problem hiding this comment.
Was an oversight by me; all other modules are using the folder name (instead of the artifact ID).
Comment on lines
-7
to
+8
| sourceCompatibility = 1.6 | ||
| targetCompatibility = 1.6 | ||
| sourceCompatibility = 1.7 | ||
| targetCompatibility = 1.7 |
Contributor
Author
There was a problem hiding this comment.
Probably does not matter because the Gradle build is outdated anyway, see #1896.
|
|
||
| @SafeVarargs | ||
| private <T> void assertIterationOrder(Iterable<T> actual, T... expected) { | ||
| private final <T> void assertIterationOrder(Iterable<T> actual, T... expected) { |
Contributor
Author
There was a problem hiding this comment.
Interestingly when changing the version to Java 7 this caused a build failure (due to private methods not supporting @SafeVarargs in Java 7), but when the version was Java 6 this compiled fine. Most likely because @SafeVarargs was added in Java 7, but (unlike --release) the -source and -target compiler flags do not prevent using newer API.
dcd9854 to
1fb719d
Compare
Member
|
Thanks! Alea jacta est. |
This was referenced Jan 1, 2022
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2018
Also tries to add some documentation to the README regarding Java version and JPMS module requirements. I am not sure if the formatting and wording is ideal; feedback is appreciated.
Follow-up task:
Remove the Java version overwrite (and comment) in https://github.com/google/oss-fuzz/blob/master/projects/gson/build.shDone, see google/oss-fuzz#7086