-
Notifications
You must be signed in to change notification settings - Fork 34
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
base: develop
Are you sure you want to change the base?
Support Java 8 #416
Conversation
There was a problem hiding this 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?
src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt
Outdated
Show resolved
Hide resolved
@@ -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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
src/jvm/main/org/jetbrains/kotlinx/lincheck/util/AtomicMethods.kt
Outdated
Show resolved
Hide resolved
@@ -8,6 +8,8 @@ | |||
* with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | |||
*/ | |||
|
|||
@file:Suppress("Since15") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this suppression necessary?
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this suppression necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/jvm/main/org/jetbrains/kotlinx/lincheck/runner/FixedActiveThreadsExecutor.kt
Outdated
Show resolved
Hide resolved
@zhelenskiy Please also run the tests on the following build configurations: |
cdac723
to
0816809
Compare
Rebased on master |
Manually run build for 8 passes the tests. |
No description provided.