-
Notifications
You must be signed in to change notification settings - Fork 61
DynComp fixes #828
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
Open
markro49
wants to merge
36
commits into
codespecs:master
Choose a base branch
from
markro49:dcomp24-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DynComp fixes #828
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
c446a21
restore version from master
markro49 34c0e81
Merge remote-tracking branch 'upstream/master'
markro49 e10b77b
Merge remote-tracking branch 'upstream/master'
markro49 333118f
Restore null check in DCInstrument24.getDefiningInterface
markro49 56d54cf
Parse java.version robustly in Runtime
markro49 4555bb3
Remove ClassGen24.isStatic
markro49 b9aaa26
Explain why the JUnit state machine skips JDK classes
markro49 f0110ad
Record the correct method name when instrumentation fails
markro49 82cc298
Maintain the tag stack in an oversized method
markro49 98a6491
Fix javadoc reference into the Java 24 sibling
markro49 1b12d82
Use ASCII in a comment
markro49 c8bcda7
Respond to CodeRabbit review of PR 828
markro49 733bd57
Merge ../daikon-branch-master into dcomp24-fixes
mernst 11352d3
Check for interface
mernst cb76b29
Update comment
mernst 7fc6b2b
Code review
mernst e4c87dd
Code review
mernst 789f3b8
Address remaining PR review comments
mernst ac64fa4
Large methods
mernst a6431ae
Suppress warnings
mernst ff23447
Code review
mernst 657ad64
fix lock checker issue
markro49 8f69df8
Re-entrancy
mernst 24da4b4
Merge branch 'dcomp24-fixes' of github.com:markro49/daikon into dcomp…
mernst b6caf94
Fix CI failures
mernst 15c171c
Code review
mernst 26419dc
Code review
mernst 68191ee
Code review
mernst 68e7598
Better ignore
mernst de7f0ec
`checkbashisms`
mernst 58b72a9
Merge ../daikon-branch-master into dcomp24-fixes
mernst 7f7c7df
Remove a dead test for a JUnit test class
markro49 4893865
Select by descriptor in codeLength
markro49 79ae6d7
Test that a rerun code builder registers a tracked method once
markro49 e0433cb
Merge master into dcomp24-fixes
markro49 73b7d43
fix nullness check error
markro49 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package daikon.chicory; | ||
|
|
||
| import static org.junit.Assert.assertEquals; | ||
| import static org.junit.Assert.assertThrows; | ||
|
|
||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.junit.runners.JUnit4; | ||
|
|
||
| /** Tests for {@link daikon.chicory.Runtime}. */ | ||
| @RunWith(JUnit4.class) | ||
| public class RuntimeTest { | ||
|
|
||
| /** | ||
| * Tests {@link Runtime#javaMajorVersion}. The values are real {@code java.version} strings; the | ||
| * bare "9" is the one that matters most, because Java 9 GA reported its version with no separator | ||
| * after the major number. | ||
| */ | ||
| @Test | ||
| public void testJavaMajorVersion() { | ||
| // Java 8 and earlier: the major version is the second component. | ||
| assertEquals(8, Runtime.javaMajorVersion("1.8.0_432")); | ||
| assertEquals(7, Runtime.javaMajorVersion("1.7.0_80")); | ||
| // Java 9 and later, with minor components. | ||
| assertEquals(9, Runtime.javaMajorVersion("9.0.4")); | ||
| assertEquals(11, Runtime.javaMajorVersion("11.0.28")); | ||
| assertEquals(24, Runtime.javaMajorVersion("24.0.1")); | ||
| assertEquals(25, Runtime.javaMajorVersion("25.0.2")); | ||
| // Java 9 and later, major version alone. | ||
| assertEquals(9, Runtime.javaMajorVersion("9")); | ||
| assertEquals(24, Runtime.javaMajorVersion("24")); | ||
| // Pre-release and build identifiers. | ||
| assertEquals(9, Runtime.javaMajorVersion("9-ea")); | ||
| assertEquals(26, Runtime.javaMajorVersion("26-ea")); | ||
| assertEquals(26, Runtime.javaMajorVersion("26+11")); | ||
|
|
||
| // Trailing junk after the major version is ignored rather than rejected; this is deliberate, | ||
| // and javaMajorVersion's javadoc says why. A value with no leading digits still throws. | ||
| assertEquals(9, Runtime.javaMajorVersion("9foo")); | ||
| assertThrows(IllegalArgumentException.class, () -> Runtime.javaMajorVersion("bogus")); | ||
| } | ||
|
|
||
| /** Tests that {@link Runtime#isJava24orLater} agrees with the JVM running the test. */ | ||
| @Test | ||
| public void testIsJava24orLater() { | ||
| int major = Runtime.javaMajorVersion(System.getProperty("java.version")); | ||
| assertEquals(major >= 24, Runtime.isJava24orLater()); | ||
| assertEquals(major >= 9, Runtime.isJava9orLater()); | ||
| } | ||
| } |
Binary file not shown.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.