-
Notifications
You must be signed in to change notification settings - Fork 275
Continue bootstrapmethods parsing after unsupported entry #1920
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
Merged
mgudemann
merged 19 commits into
develop
from
bugfix/continue_bootstrapmethods_parsing_after_unsupported_entry
Mar 13, 2018
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e11163c
Continue parsing after unsupported BootstrapMethods entry
d7a4e50
Add regression test compiled with ecj
067ccbf
Rename j to boostrap_method_index
6400294
Replace nested else ifs with a continue on error conditions
9749d5a
Refactored error reporting method into a seperate function
4bb98f0
Removed impossible condition
c1aa16c
Renamed parameter variables
1db68a5
Moved the first condition to after the explanation of our assumptions
12f049e
Added extra information to the warnings to differentaite the differen…
a604b26
!fixup Removed impossible condition (9fc5bfdc)
8615500
Added to readme that the file is compiled using the eclipse compiler
f494674
Use function that actually contains the lambdas
c0f054a
Removing redundant method from test
d8edf4f
Adjusted test to pass
dcd680f
Correcting formating on java file
42065ec
Adjust the interface of the bootstrap methods map
1974010
Adjusted the if check to aid readability
0b20a81
Added explanation to the test
ea6f00f
Fixing linter error
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import java.util.function.Function; | ||
import java.util.function.BiFunction; | ||
|
||
public class StaticMethodRef{ | ||
public Integer Smr(Integer ctr) { | ||
Function<Integer, Integer> func1 = Integer::valueOf; | ||
|
||
// Uses Integer.valueOf(String) | ||
Function<String, Integer> func2 = Integer::valueOf; | ||
|
||
BiFunction<String, Integer, Integer> func3 = Integer::valueOf; | ||
|
||
if (ctr.equals(func1.apply(9))) | ||
return func1.apply(9); | ||
|
||
if (ctr.equals(func2.apply("8"))) | ||
return func2.apply("8"); | ||
|
||
if (ctr.equals(func3.apply("0111", 2))) | ||
return func3.apply("0111", 2); | ||
|
||
return ctr; | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
from https://github.com/symphonyoss/symphony-java-client/ | ||
|
||
The StaticMethodRef.class is compiled using the Eclipse Compiler |
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,14 @@ | ||
CORE | ||
StaticMethodRef.class | ||
--function StaticMethodRef.Smr | ||
VERIFICATION FAILED | ||
EXIT=10 | ||
SIGNAL=0 | ||
^SIGNAL=0 | ||
-- | ||
-- | ||
Tests that it doesn't crash when failing to read a `BootstrapMethods` entry and | ||
there is another attribute after this. The EXIT=10/VERIFCATION FAILED comes from | ||
the fact that the invokedynamic currently returns a null object, causing our | ||
model of this to predict a null pointer exception. This test will need to be | ||
adjusted when lambdas work. |
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
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.
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.
Question for my understanding: Why do we want to keep these unknown handles instead of just skipping the?
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.
I think because the
invokedynamic
refers to an index in the bootstrap table which would be invalid if we didn't populate all the entries .