Re: Potential Bug
Emilian Bold <[email protected]> Sun, 26 Jun 2016 10:49:37 +0300
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <CAL6R17Bj5Zr3asAFMH4zf3-GA9ZoUAmb9gQRDyThtj5LEwHEmA@mail.gmail.com> |
It would be best to talk this on bugzilla, either that issue or a new one. I believe the logic should be if !isUpdated || forceUpdate but just my 2c. În data de joi, 23 iunie 2016, kmortelite <[email protected]> a scris: > In options.api\src\org\netbeans\modules\options\CategoryModel.java, there > is the following code: > > > Code: > final void update(PropertyChangeListener l, boolean forceUpdate) { > if ((!isUpdated && !forceUpdate) || (isUpdated && > forceUpdate)) {// problem with this line?? Boils down to: > if(isUpdated==forceUpdate) > isUpdated = true; > getComponent(); > create().update(); > if (l != null) { > create().addPropertyChangeListener(l); > } > } > } > > > > > Wouldn't it make more sense to say if(isUpdated || forceUpdate) for this > clause? > > I'm noticed this while trying to hunt down this bug: > https://netbeans.org/bugzilla/show_bug.cgi?id=262540 Can someone help me > understand the logic here? > > Sincerely, > Karl > > > > > -- --emi