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

Support Java 8 #416

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Support Java 8 #416

wants to merge 5 commits into from

Conversation

zhelenskiy
Copy link
Member

No description provided.

Copy link
Collaborator

@ndkoval ndkoval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zhelenskiy, thanks for the change! I've left several comments, could you please take a look?

@@ -20,7 +20,7 @@ import java.lang.reflect.Field
/**
* Helper object to provide the field name and the owner of the VarHandle method call.
*/
@Suppress("SameParameterValue")
@Suppress("SameParameterValue", "Since15")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is Since15 necessary here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To suppress Idea warnings about usage of since JDK 9 API.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can since JDK 9 API usages be in the code with the source level being Java 8?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there are several conflicting sources of JVM versions and IDEA takes the wrong one here to highlight. When compiled with JDK > 8, it works well; otherwise, this part is not compiled. Btw, the rule is applicable to the JDK9+ tests, not the LinCheck source (this file). There are no such suppressions in the source part anymore.

@@ -8,6 +8,8 @@
* with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

@file:Suppress("Since15")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this suppression necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -243,6 +243,7 @@ class UnsafeLocalObjectsTest {
* If we hadn't such check, this test would hang due to infinite spin-loop on a local object operations with
* no chances to detect a cycle and switch.
*/
@Suppress("Since15")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this suppression necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndkoval ndkoval removed the request for review from eupp October 17, 2024 07:02
@ndkoval
Copy link
Collaborator

ndkoval commented Oct 23, 2024

@zhelenskiy Please also run the tests on the following build configurations:
Build on Java 8
Build on Java 9

@zhelenskiy
Copy link
Member Author

Rebased on master

@zhelenskiy
Copy link
Member Author

Manually run build for 8 passes the tests.
The one for Java 9 does not. But the only failed test is a representation test where the difference is in line numbers in the exception message. Unfortunately, I am not able to fix it because I cannot test it locally. The reason for that is that JDK is not supported for almost 7 years, and I cannot install it on my machine. Furthermore, I don't even see the reason to support it.

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

Successfully merging this pull request may close these issues.

3 participants