JDK-4684378 : generics: verify error in generated bytecode
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: generic
  • Submitted: 2002-05-14
  • Updated: 2002-09-28
  • Resolved: 2002-09-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Description
frog:~/workspaces/test/Generic16 $ cat -n Case.java 
     1  import java.util.Stack;
     2  public class Case
     3  {
     4  public static void main(String[] argv)
     5  {
     6  Stack<String> bar = new Stack<String>();
     7  String foo;
     8
     9  // Compiles, but causes verify error
    10  foo=(bar.empty()?"":bar.peek()).intern();
    11
    12  // The following two work fine
    13  foo = (bar.empty()?"":bar.peek().intern());
    14  foo = (bar.empty()?"":(String)bar.peek()).intern();
    15  }
    16  }
frog:~/workspaces/test/Generic16 $ newjavac -gj Case.java 
frog:~/workspaces/test/Generic16 $ newjava Case
+ /java/re/j2se/1.4.1/promoted/latest/binaries/solaris-sparc/bin/java -Xfuture Case 
Exception in thread "main" java.lang.VerifyError: (class: Case, method: main signature: ([Ljava/lang/String;)V) Incompatible object argument for function call
frog:~/workspaces/test/Generic16 $ 

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis mantis-b03
14-06-2004

PUBLIC COMMENTS ...
10-06-2004

EVALUATION A bug. ###@###.### 2002-05-16
16-05-2002