Bug 205046 - runtime error using labeled blocks
Summary: runtime error using labeled blocks
Status: VERIFIED DUPLICATE of bug 195317
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-01 08:58 EDT by Marco CLA
Modified: 2007-10-29 10:13 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco CLA 2007-10-01 08:58:09 EDT
Build ID:  I20070621-1340

Steps To Reproduce:
1. copy the belove code and try to execute
2. modify the if(false) condition with if(true)
3. compile and run the modified code...


More information:
 public static void main(String[] args) {
        System.out.println("line 1");
        myBlock: {
            System.out.println("line 2");

            if (false)
            {   break myBlock;
            }
            System.out.println("line 3");
        }
        System.out.println("line 4");

    }
Comment 1 Jerome Lanneluc CLA 2007-10-04 12:10:15 EDT
The runtime error is:

java.lang.ClassFormatError: Invalid pc in LineNumberTable in class file Test
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main" 

*** This bug has been marked as a duplicate of bug 195317 ***
Comment 2 Olivier Thomann CLA 2007-10-04 12:51:17 EDT
Added regression test org.eclipse.jdt.core.tests.compiler.regression.DebugAttributeTest#test002
Comment 3 Jerome Lanneluc CLA 2007-10-29 10:13:50 EDT
Verified for 3.4M3 using I20071029-0010