few problems reported by Martin

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4304 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Radim Kubacki
2006-03-20 20:37:35 +00:00
parent fd90c51c08
commit d46d3b2f07
2 changed files with 6 additions and 1 deletions

View File

@ -98,7 +98,9 @@ public class EditorChangeListener implements PropertyChangeListener, ChangeListe
public void stateChanged(ChangeEvent e) {
BaseDocument doc = Registry.getMostActiveDocument();
if (doc == null) {
scanner.cancel();
if (scanner != null) {
scanner.cancel();
}
}
else if (!doc.equals(active)) {
startScan (doc);

View File

@ -102,6 +102,9 @@ public class Scanner implements Runnable, DocumentListener {
tabSize = foo.intValue();
DataObject object = NbEditorUtilities.getDataObject(doc);
if (object == null) {
return;
}
LineCookie cookie = ( LineCookie )object.getCookie( LineCookie.class );
Line.Set lineset = cookie.getLineSet();
List list = Collections.singletonList(object);