[ nice-Bugs-1070579 ] java.lang.VerifyError in constructor
"SourceForge.net" <[email protected]> Mon, 22 Nov 2004 13:59:48 -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: Closed
>Resolution: Fixed
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 22:59
Message:
Logged In: YES
user_id=88952
This bug has been fixed. The next release of the compiler will
include this correction. In the mean time, I encourage you try
the development version. It contains a version of the compiler
that fixes the bug. Please try it and reopen the bug-report if
you find any problem with it.
To know how to get an install the development version of the
compiler that fixes this bug, please read
http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/DevelopmentVersion
Note that the bug has first been fixed in the CVS version, and it
might take one or two hours until the development version
includes the fix.
Thanks again for your help by submiting this bug report.
Daniel Bonniot
----------------------------------------------------------------------
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/