Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8017808 | 7u45 | Maurizio Cimadamore | P2 | Closed | Fixed | b01 |
JDK-8004242 | 7u40 | Dmeetry Degrave | P2 | Closed | Fixed | b08 |
JDK-8017419 | 6u65 | Dmeetry Degrave | P2 | Closed | Fixed | b01 |
JDK-8004244 | 6u60 | Dmeetry Degrave | P2 | Closed | Fixed | b01 |
JDK-8004245 | 5.0u55 | Dmeetry Degrave | P2 | Closed | Fixed | b01 |
SHORT SUMMARY:
javac compiler error - synthetic method accessor generated with duplicate
name
INDICATORS:
Problem Statement
=================
Customer's code compiles fine inside eclipse but fails when the compile is
attempted on the command line.
Issue Clarification
===================
This is a problem where the javac compiler gives an error
Error is:
CompileIssue3.java:4: error: types CompileIssue2<Object> and CompileIssue1
are incompatible; both define access$000(), but with unrelated return types
public class CompileIssue3 extends CompileIssue2<Object> {
There are four files in the test case.
If the four files are compiled together, the failure is seen.
If the order in which the files are compiled is changed, no failure is
seen.
If the files are compiled individually, no failure is seen.
system configuration
====================
The customer is using eclipse on Windows XP.
I have reproduced in on Solaris 10 Update 4 x86.
% cat /etc/release
Solaris 10 8/07 s10x_u4wos_12b X86
For the customer, with his real code, this fails on java 5.0, 6.0 and 7.0.
support work
============
The behavior is the same on all the versions that I tested.
5u19 and 7u07. Then I tested on:
% javac -version "@javacOpts.txt"
javac 1.5.0_38
CompileIssue3.java:4: types CompileIssue2<java.lang.Object> and
CompileIssue2<java.lang.Object> are incompatible; both define access$000(),
but with unrelated return types
public class CompileIssue3 extends CompileIssue2<Object> {
^
1 error
= = = = = = =
% javac -version
javac 1.7.0_12-ea
% javac "@javacOpts.txt"
CompileIssue3.java:4: error: types CompileIssue2<Object> and CompileIssue1
are incompatible; both define access$000(), but with unrelated return types
public class CompileIssue3 extends CompileIssue2<Object> {
^
1 error
%
COUNTER INDICATORS:
TRIGGERS:
KNOWN WORKAROUND:
PRESENT SINCE:
HOW TO VERIFY:
Uploaded Files
==============
CompileIssue.zip containing:
CompileIssue1.java
CompileIssue2.java
CompileIssue3.java
CompileIssueEnum.java
javacOpts.txt
Possible Solutions
==================
Changing the order in which the files are compiled allows the compile to
work
% cat javac*
CompileIssue1.java CompileIssue2.java CompileIssue3.java
CompileIssueEnum.java
CompileIssue2.java CompileIssue1.java CompileIssue3.java
CompileIssueEnum.java
CompileIssue3.java CompileIssue2.java CompileIssue1.java
CompileIssueEnum.java
% javac -version
javac 1.7.0_12-ea
% javac "@javacOpts.txt"
CompileIssue3.java:4: error: types CompileIssue1 and CompileIssue2<Object>
are incompatible; both define access$000(), but with unrelated return types
public class CompileIssue3 extends CompileIssue2<Object> {
^
1 error
% javac "@javacOpts1.txt"
CompileIssue3.java:4: error: types CompileIssue2<Object> and CompileIssue1
are incompatible; both define access$000(), but with unrelated return types
public class CompileIssue3 extends CompileIssue2<Object> {
^
1 error
% javac "@javacOpts2.txt"
% [ compile succeeds ]
NOTES FOR SE:
REGRESSION:
- backported by
-
JDK-8004242 Javac compiler error - synthetic method accessor generated with duplicate name
-
- Closed
-
-
JDK-8004244 Javac compiler error - synthetic method accessor generated with duplicate name
-
- Closed
-
-
JDK-8004245 Javac compiler error - synthetic method accessor generated with duplicate name
-
- Closed
-
-
JDK-8017419 Javac compiler error - synthetic method accessor generated with duplicate name
-
- Closed
-
-
JDK-8017808 Javac compiler error - synthetic method accessor generated with duplicate name
-
- Closed
-
- duplicates
-
JDK-8013842 Complex generic class with multiple bounds does not compile
-
- Closed
-