-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update TryWithResourcesJavacFilter for javac 11 #669
Conversation
8ebdb99
to
57a2714
Compare
ec67afd
to
9eab568
Compare
cc2217e
to
8c3e0dd
Compare
@marchof We need to continue work towards JDK 11 support - AFAIK initial release candidate is planned on 2018/08/16. So could you please have a look on this new filter? While it is similar to existing, I think that better to have them separate - existing one is already quite complex. |
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.
Looks good to me. Especially as it is properly backed by tests. For final merge the change log should be updated.
I would love to have a more fluent matcher API. Maybe some more isXXX would help to make it more readable. But this is a different story.
@Godin Would it be already possible to add an JDK 11 build to Travis? |
Done, please check.
Same from my side, but as usual - baby steps, baby steps 😉
Definitely! Was planning and will do so right after merge of this PR, so that javac 11 passes our tests 😆 and doesn't lead to build failure. |
javac 11 EA
starting fromb7
and up to latest (as of today)b24
contains http://hg.openjdk.java.net/jdk/jdk/rev/c2a3a2aa2475 ( JDK-8194978 ), which changes bytecode generation fortry-with-resource
. OurTryWithResourcesJavacFilter
does not detect this new bytecode.Based on analysis of change, description of desugaring in javadoc of method
makeTwrTy
in classcom/sun/tools/javac/comp/Lower
fromb24
, and practical observations:null
check ofprimaryExc
anymorejavac 9
when resource is initialized withnew
, thennull
check of resource is omitted$closeResource
(that was introduced injavac 9
) not generated anymoreTo execute our validation tests with
javac 11 EA
in absence of full support of JDK 11: