[ nice-Bugs-1070579 ] java.lang.VerifyError in constructor
"SourceForge.net" <[email protected]> Mon, 22 Nov 2004 08:03:37 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1070579, was opened at 2004-11-21 20:57
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070579&group_id=12788
Category: None
Group: None
Status: Open
>Resolution: Accepted
Priority: 5
Submitted By: Kim Rutherford (rutherford)
>Assigned to: Daniel Bonniot (bonniot)
Summary: java.lang.VerifyError in constructor
Initial Comment:
Hi. I'm getting a "VerifyError" from the Sun 1.4.2 and
1.5.0 JVMs when I run my code. I've reduce my program
to the following test case:
package test;
class TestClass {
}
new TestClass(int i2) {
Map<int, int> newMap = new HashMap();
new ArrayList().foreach(int i3 => {
newMap.get(0);
});
this();
}
void main(String[] args) {
TestClass t1 = new TestClass();
}
The code causes this Exception:
Exception in thread "main" java.lang.VerifyError:
(class: test/TestClass, method: <init> signature: (I)V)
Expecting to find object/array on stack
at test.fun.main(test.nice:14)
at test.dispatch.main(dispatch.nice)
I'm using the 0.9.9 Debian package.
Kim.
----------------------------------------------------------------------
>Comment By: Daniel Bonniot (bonniot)
Date: 2004-11-22 17:03
Message:
Logged In: YES
user_id=88952
Kim, thanks for this very good testcase. I'm going to look
at this bug, hopefully with a fix soon.
If you need a workaround in the mean time, you can call a
helper method that contains the anonymous function. For
instance, in your testcase:
new TestClass(int i2) {
Map<int, int> newMap = new HashMap();
init(newMap);
this();
}
void init(Map<int,int> newMap) {
new ArrayList().foreach(int i3 => {
newMap.get(0);
});
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1070579&group_id=12788
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/