United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4684378 : generics: verify error in generated bytecode

Details
Type:
Bug
Submit Date:
2002-05-14
Status:
Resolved
Updated Date:
2002-09-28
Project Name:
JDK
Resolved Date:
2002-09-28
Component:
tools
OS:
solaris_8
Sub-Component:
javac
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
1.4.2 (mantis)

Related Reports

Sub Tasks

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
EVALUATION

A bug.

###@###.### 2002-05-16
                                     
2002-05-16
PUBLIC COMMENTS

...
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b03


                                     
2004-06-14



Hardware and Software, Engineered to Work Together