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

Fix LOOKAHEAD for ReferenceType; fixes #2879 #2904

Merged
merged 3 commits into from
Nov 12, 2020

Conversation

mernst
Copy link
Contributor

@mernst mernst commented Nov 11, 2020

Fixes #2879.

@MysterAitch
Copy link
Member

Good shout, thanks @mernst ! :)

How do you feel about using LOOKAHEAD(ReferenceType(annotations)) instead, to reduce the duplicated logic of "array of primitives or a class/interface name"?

Depending on the generated parser code, I imagine yours may be a little more performant though?

@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #2904 (7552860) into master (e3240fc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2904   +/-   ##
=======================================
  Coverage   52.19%   52.19%           
=======================================
  Files         438      438           
  Lines       23436    23436           
  Branches     3535     3535           
=======================================
  Hits        12232    12232           
  Misses      10291    10291           
  Partials      913      913           
Flag Coverage Δ
AlsoSlowTests 52.19% <ø> (ø)
jdk-10 52.19% <ø> (ø)
jdk-11 52.18% <ø> (ø)
jdk-12 52.18% <ø> (ø)
jdk-13 52.18% <ø> (ø)
jdk-14 52.18% <ø> (ø)
jdk-15 52.18% <ø> (ø)
jdk-8 52.19% <ø> (ø)
jdk-9 52.19% <ø> (ø)
macos-latest 52.18% <ø> (ø)
ubuntu-latest 52.18% <ø> (-0.01%) ⬇️
windows-latest 52.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3240fc...e931cdd. Read the comment docs.

@mernst
Copy link
Contributor Author

mernst commented Nov 12, 2020

How do you feel about using LOOKAHEAD(ReferenceType(annotations)) instead, to reduce the duplicated logic of "array of primitives or a class/interface name"?

I think that would work. It does seem less efficient since it requires lookahead through the entire reference type rather than only looking ahead far enough to distinguish the shift conflict.

@MysterAitch MysterAitch added this to the next release milestone Nov 12, 2020
@MysterAitch
Copy link
Member

Travis is being a pain with queues/delays, so merging without waiting for it :)

@MysterAitch MysterAitch merged commit 5c2646a into javaparser:master Nov 12, 2020
@mernst
Copy link
Contributor Author

mernst commented Nov 12, 2020

@MysterAitch Thanks for merging.

@mernst mernst deleted the parameter-varargs-fix branch November 12, 2020 20:19
@MysterAitch
Copy link
Member

@mernst Thank you for giving me something to merge!! It really is appreciated 👍

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.

Crash on annotated varargs parameter
2 participants