diff --git a/pmd-netbeans/lib/backport-util-concurrent.jar b/pmd-netbeans/lib/backport-util-concurrent.jar
deleted file mode 100644
index 99f9b9c6a3..0000000000
Binary files a/pmd-netbeans/lib/backport-util-concurrent.jar and /dev/null differ
diff --git a/pmd-netbeans/lib/jaxen-1.1-beta-10.jar b/pmd-netbeans/lib/jaxen-1.1.jar
similarity index 55%
rename from pmd-netbeans/lib/jaxen-1.1-beta-10.jar
rename to pmd-netbeans/lib/jaxen-1.1.jar
index 69b45d7a43..821519245b 100644
Binary files a/pmd-netbeans/lib/jaxen-1.1-beta-10.jar and b/pmd-netbeans/lib/jaxen-1.1.jar differ
diff --git a/pmd-netbeans/lib/pmd-3.9.jar b/pmd-netbeans/lib/pmd-3.9.jar
deleted file mode 100644
index 5006cbea02..0000000000
Binary files a/pmd-netbeans/lib/pmd-3.9.jar and /dev/null differ
diff --git a/pmd-netbeans/lib/pmd-4.0.jar b/pmd-netbeans/lib/pmd-4.0.jar
new file mode 100644
index 0000000000..c204b18356
Binary files /dev/null and b/pmd-netbeans/lib/pmd-4.0.jar differ
diff --git a/pmd-netbeans/nbproject/project.properties b/pmd-netbeans/nbproject/project.properties
index 8eae133e7d..8c7149b275 100644
--- a/pmd-netbeans/nbproject/project.properties
+++ b/pmd-netbeans/nbproject/project.properties
@@ -1,7 +1,6 @@
extra.module.files=\
- modules/ext/jaxen-1.1-beta-10.jar \
- modules/ext/pmd-3.9.jar \
- modules/ext/backport-util-concurrent.jar \
+ modules/ext/jaxen-1.1.jar \
+ modules/ext/pmd-4.0.jar \
modules/ext/asm-3.0.jar \
modules/ext/nbpmdrules.jar
javac.compilerargs=-Xlint:unchecked
diff --git a/pmd-netbeans/nbproject/project.xml b/pmd-netbeans/nbproject/project.xml
index 71d65abb43..14511be556 100644
--- a/pmd-netbeans/nbproject/project.xml
+++ b/pmd-netbeans/nbproject/project.xml
@@ -13,16 +13,12 @@
lib/asm-3.0.jar
- ext/backport-util-concurrent.jar
- lib/backport-util-concurrent.jar
+ ext/jaxen-1.1.jar
+ lib/jaxen-1.1.jar
- ext/jaxen-1.1-beta-10.jar
- lib/jaxen-1.1-beta-10.jar
-
-
- ext/pmd-3.9.jar
- lib/pmd-3.9.jar
+ ext/pmd-4.0.jar
+ lib/pmd-4.0.jar
@@ -193,7 +189,7 @@
libsrc
- lib/pmd-3.9.jar
+ lib/pmd-4.0.jar
build/libclasses
${cluster}/modules/ext/nbpmdrules.jar
diff --git a/pmd-netbeans/src/pmd/scan/Scanner.java b/pmd-netbeans/src/pmd/scan/Scanner.java
index 8edbfa69d2..4d4b022aab 100644
--- a/pmd-netbeans/src/pmd/scan/Scanner.java
+++ b/pmd-netbeans/src/pmd/scan/Scanner.java
@@ -91,6 +91,9 @@ public class Scanner implements CancellableTask {
LOG.fine(toString() + "started");
cancelled = false;
Document doc = info.getDocument();
+ if (doc == null) {
+ return;
+ }
int tabSize = 8;
if (doc instanceof BaseDocument) {
@@ -107,7 +110,7 @@ public class Scanner implements CancellableTask {
return;
}
- LineCookie cookie = ( LineCookie )dobj.getCookie( LineCookie.class );
+ LineCookie cookie = dobj.getCookie(LineCookie.class);
Line.Set lineset = cookie.getLineSet();
List list = Collections.singletonList(dobj);
// TODO try to avoid duplicate work in this method