instance method writes to a static field. This is tricky to get correct
hi,
i am assinig a static refence to an obect, and acess this refrence outside the class.
public static loadingDialog StatusWndw = null;
StatusWndw = new loadingDialog(this);
i want toacess StatusWndw this out side the class but find bug show me generally bad practice.
pls reply.
regards,
lkkj
[350 byte] By [
lkkja] at [2007-11-27 11:03:49]

There are lot of false positives with find bugs so it is up to you to decide whether you want to keep the code.
If there is a good reason to keep the variable StatusWndw as static leave it as it is. In fact most singleton classes need to have static variable that is initialized at some point.
However you might want to make the StatusWndw as private and provide a gettor for it?
And please, read JavaCodeConvention
the right way should be
public static LoadingDialog statusWndw = null;
statusWndw = new LoadingDialog(this);
cya