Potential Bug
"kmortelite" <[email protected]> Thu, 23 Jun 2016 19:51:56 +0000
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <[email protected]> |
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