• Post Reply Bookmark Topic Watch Topic
  • New Topic

Report change request to JLS for Java 7  RSS feed

 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Does anyone know the process or mechanism for reporting a problem with the Java Language Specification? I have had a quick browse around the Oracle Technology Network and it wasn't obvious.

Cheers
 
Mike Simmons
Ranch Hand
Posts: 3090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, there's "contact us" for documentation issues, here. If you are confident it's a real problem that needs to be addressed, bug reporting starts here. Use type: bug, product/category: Java Platform Standard Edition (JRE/JDK), subcategory: Java Language Spec and Virtual Machine Spec. And go from there.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike, thanks for this. I'll start with an email and see where that leads.
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm curious, what problem have you found?
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob

Below is the email I sent to Oracle yesterday. They have since replied and a bug has been logged.


Hi

I would like to raise an issue with the Java Language Specification for Java SE 7.

URL: http://docs.oracle.com/javase/specs/jls/se7/html/index.html

Specifically, with the third paragraph of section 8.5 'Member Type Declarations' which states:

/A member interface in a class declaration is implicitly |public| (§6.6 <http://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#jls-6.6>) unless an access modifier is specified/

However, I have created an example snippet of code and tested it using Java JDK 1.7.0_05 which clearly shows that a /member interface/ is given package-level access unless an access modifier is explicitly specified. I have attached this snippet and package2.SomeClass2.java will only compile if line 5 of package1.SomeClass.java is changed to explicitly specify the public access modifier.

I look forward to your response regarding this issue. Thanks for your time.

Kind regards James
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your exact code example here, so that we can check if what you say is really correct?
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SomeClass.java



SomeClass2.java

 
Mike Simmons
Ranch Hand
Posts: 3090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting. I don't think that's a JLS issue; it's a compiler bug. There is nothing wrong with the JLS rule; it's quite clear, it's been there all along (since 2nd edition anyway), and it has worked in the past (I think). But there's something wrong with the current compiler it seems.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike

Assuming it is a compiler bug, does that mean that the 'default' access modifier for member interfaces was changed in Java 7 from package-level to public?
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not only Java 7 -- I put that into my Eclipse installation (which is actually IBM's RAD and is configured to use a Java 6 compiler with target level 1.5) and it fails to compile there for the same reason. "The type SomeClass.SomeInterface is not visible".
 
Mike Simmons
Ranch Hand
Posts: 3090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, I was thinking it had always been this way (as I said). But now it looks like I may have misremembered, confusing the special rules for being implicitly static with the special rules for being implicitly public.
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bug reported is now available:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7186836
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!