use interface rather than impl class to avoid CCE

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4302 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Radim Kubacki
2006-03-17 18:47:23 +00:00
parent 195704c33d
commit 46f5f0004f

View File

@ -31,6 +31,7 @@ import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.openide.text.Annotatable;
import org.openide.text.Annotation;
import org.openide.text.Line;
import org.openide.text.Line.Part;
@ -104,8 +105,8 @@ public class PMDScanAnnotation extends Annotation implements PropertyChangeListe
* @param propertyChangeEvent the event fired
*/
public void propertyChange( PropertyChangeEvent propertyChangeEvent ) {
Part part = ( Part )propertyChangeEvent.getSource();
part.removePropertyChangeListener( this );
Annotatable anno = ( Annotatable )propertyChangeEvent.getSource();
anno.removePropertyChangeListener( this );
detach();
}
}