Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 528350 - [10] update in JLS 7.5.3 re duplicate static imports
Summary: [10] update in JLS 7.5.3 re duplicate static imports
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.1a   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.7.3a   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 532818 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-12-08 18:02 EST by Stephan Herrmann CLA
Modified: 2018-03-24 21:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2017-12-08 18:02:02 EST
https://bugs.openjdk.java.net/browse/JDK-8133619 is marked as resolved for 10.

Let's check if we need to change anything in ecj.
Comment 1 Stephan Herrmann CLA 2018-03-22 10:57:45 EDT
Pushed new tests to R4_7_maintenance asserting that ecj already accepts all that also javac accepts in this area: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=R4_7_maintenance&id=4e2d7c2efe32b6527253cfa4f99ccfb23310c744

Interestingly, on master one of these tests currently fails - we report one more error, which is OK by JLS but differs from javac. Most puzzling: why would both branches behave differently in this regard?

Will look into that soonish.
Comment 2 Eclipse Genie CLA 2018-03-24 19:16:40 EDT
New Gerrit change created: https://git.eclipse.org/r/120139
Comment 3 Stephan Herrmann CLA 2018-03-24 19:22:17 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/120139

Correction:

I failed to see this comment in CUScope.checkAndRecordImportBinding():
// 7.5.3 says nothing about collision of single static imports and JDK8 tolerates them, though use is flagged.

This code paragraph from bug 426544 suppresses the over-eager error report only for compliance >= 1.8 - hence the test needs to expect differently per compliance.

The above change is for 4.7.3a to begin with, the same holds for master, too - patch following soon.
Comment 4 Stephan Herrmann CLA 2018-03-24 19:23:15 EDT
*** Bug 532818 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Genie CLA 2018-03-24 19:53:55 EDT
New Gerrit change created: https://git.eclipse.org/r/120140
Comment 6 Eclipse Genie CLA 2018-03-24 20:34:26 EDT
Gerrit change https://git.eclipse.org/r/120139 was merged to [R4_7_maintenance].
Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=3924a8dd4f40a3320b9bb042e655ae34b855a805
Comment 7 Stephan Herrmann CLA 2018-03-24 20:35:29 EDT
(In reply to Eclipse Genie from comment #6)
> Gerrit change https://git.eclipse.org/r/120139 was merged to
> [R4_7_maintenance].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=3924a8dd4f40a3320b9bb042e655ae34b855a805

Test correction released for 4.7.3a
Comment 9 Stephan Herrmann CLA 2018-03-24 21:27:14 EDT
(In reply to Eclipse Genie from comment #8)
> Gerrit change https://git.eclipse.org/r/120140 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=70ce711b1f491faf01351b6b627f465e902921d5

Released to master for 4.8 M7, also.