Re: Class test.B has no constructor

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
Andreas Schroeder wrote:
> i wasn't able to wait (even though i am writing a test today), so i found
> the following. Here is some code that exhibits the behavior.
> 
> [code]
> package test;
> 
> void main(String[] args) { }
> 
> public class A
> {
>   private B b = new B();
> }
> 
> public class B { }
> [/code]

Thanks, this was a good testcase. I just fixed this bug in CVS, it should be in 
the development version within 2 hours.

> Btw, i changed the order of the classes so that this "has no Constructor"
> error doesn't occur anymore, and i still got the NullPointerException on
> linkig 

Was that the following code?

> Note that the following code compiles the second time without any problems
> (just swapped A and B!!!):
> 
> [code]
> package test;
> 
> void main(String[] args) { }
> 
> public class B { }
> 
> public class A
> {
> 	private B b = new B();
> }
> [/code]

I couldn't reproduce an error with this version (even without applying my fix). 
Could you give the precise steps to reproduce it?

Daniel



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.