Fw: (Incident Review ID: 1759967) Multiple generic types cause weaker access privileges error on clone()

Nick Radov nradov at axolotl.com
Tue May 4 17:43:30 PDT 2010


I found a bug in the JDK 1.6.0_20 javac compiler two weeks ago and 
submitted a bug report to Sun (Oracle); see forwarded confirmation below. 
Now I just reproduced the same failure in OpenJDK 1.7.0-ea-b91.

Should I also report that bug in OpenJDK Bugzilla <
https://bugs.openjdk.java.net/> or does the OpenJDK project automatically 
pick up everything from the old Java bug database? Is the Java bug 
database still even being maintained after the Oracle acquisition? The Bug 
ID 6946211 link <
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946211> still doesn't 
work and it has been well more than two days. This bug is causing serious 
problems so I would like to ensure that it doesn't slip though any process 
cracks.

Nick Radov | Director, Research & Development | Axolotl Corp
www.axolotl.com, d: 408.920.0800 x116, f: 408.920.0880
160 West Santa Clara St., Suite 1000, San Jose, CA, 95113
 
THE MARKET LEADER IN HEALTH INFORMATION EXCHANGE – PROVIDING PATIENT 
INFORMATION WHEN AND WHERE IT IS NEEDED.
 
The information contained in this e-mail transmission may contain 
confidential information. It is intended for the use of the addressee. If 
you are not the intended recipient, any disclosure, copying, or 
distribution of this information is strictly prohibited. If you receive 
this message in error, please inform the sender immediately and remove any 
record of this message.
----- Forwarded by Nick Radov/ACHQ on 05/04/2010 05:14 PM -----

From:   Sun Microsystems <IncidentUpdateDaemon at sun.com>
To:     nradov at axolotl.com
Date:   04/22/2010 03:42 AM
Subject:        Re: (Incident Review ID: 1759967) Multiple generic types 
cause weaker access privileges error on clone()
Sent by:        Nelson.Dcosta at sun.com



--- Note: you can send us updates about your Incident ---
--- by replying to this mail.  Place new information  ---
--- above these lines.  Do not include attachments.   ---
--- Our system ignores attachments and anything below ---
--- these lines.                                      ---

Hi Nick Radov,

Thank you for reporting this issue.

We have determined that this report is a new bug and entered the bug into 
our internal bug tracking system under Bug Id: 6946211.

You can monitor this bug on the Java Bug Database at
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6946211.

It may take a day or two before your bug shows up in this external 
database.  If you are a member of the Sun Developer Network (SDN), there 
are two additional options once the bug is visible.

1. Voting for the bug
   Click http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6946211.

2. Adding the report to your Bug Watch list.
   You will receive an email notification when this bug is updated.
   Click http://bugs.sun.com/bugdatabase/addBugWatch.do?bug_id=6946211.

We greatly appreciate your efforts in identifying areas in the Java 
Standard Edition where we can improve upon and I would request you to 
continue doing so.
 
Regards,
Nelson

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: This message, including any attachments, is for the intended
recipient(s) only.  If you are not the intended recipient(s), please
reply to the sender, delete this message, and refrain from disclosing,
copying, or distributing this message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------- Previous Messages ----------------


--------------------- Report ---------------------

      category : java
   subcategory : compiler
       release : 6u20
          type : bug
      synopsis : Multiple generic types cause weaker access privileges 
error on clone()
 customer name : Nick Radov
 customer mail : nradov at axolotl.com
        sdn id : nradov
      language : en
       company : Axolotl Corp
      hardware : x86
            os : windows_7
        bug id : 6946211
  date created : Tue Apr 20 16:55:54 MST 2010
date evaluated : Thu Apr 22 03:37:44 MST 2010
   description : 
FULL PRODUCT VERSION :
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]

A DESCRIPTION OF THE PROBLEM :
The compiler fails if a base interface includes a clone() method and an 
extended interface has multiple generic types. The error message is the 
same as Bug ID:  4185308 but the cause is different.
(Note that the sample code compiles correctly in the Eclipse Java 
compiler.)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Put the source code for an executable test case into two separate files in 
the same directory. Compile them. You should get a compiler error.


ERROR MESSAGES/STACK TRACES THAT OCCUR :
SubType.java:1: clone() in java.lang.Object cannot implement clone() in 
BaseType; attempting to assign weaker access privileges; was public
public interface SubType<T extends BaseType & java.io.Closeable> extends 
BaseType {
                         ^
1 error


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public interface BaseType {
    BaseType clone() throws CloneNotSupportedException;
}

public interface SubType<T extends BaseType & java.io.Closeable> extends 
BaseType {
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Modify SubType so that the generic type parameter T extends only BaseType, 
not Closeable.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20100504/7cbb6a4d/attachment.html 


More information about the compiler-dev mailing list