You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2014/01/06 12:25:22 UTC

[09/21] git commit: document why this is not a NPE

document why this is not a NPE


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/4ff2d7ef
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/4ff2d7ef
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/4ff2d7ef

Branch: refs/heads/master
Commit: 4ff2d7ef2a1842d4484e17836991cbc3b172a9d4
Parents: 4454210
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Jan 6 10:46:44 2014 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Jan 6 10:46:44 2014 +0000

----------------------------------------------------------------------
 .../org/apache/maven/usability/plugin/ExpressionDocumenter.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/4ff2d7ef/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
index 7d41f0a..0e98b0c 100644
--- a/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
+++ b/maven-compat/src/main/java/org/apache/maven/usability/plugin/ExpressionDocumenter.java
@@ -147,6 +147,8 @@ public class ExpressionDocumenter
 
         URL myResource = ExpressionDocumenter.class.getClassLoader().getResource( myResourcePath );
 
+        assert myResource != null : "The resource is this class itself loaded by its own classloader and must exist";
+
         String myClasspathEntry = myResource.getPath();
 
         myClasspathEntry = myClasspathEntry.substring( 0, myClasspathEntry.length() - ( myResourcePath.length() + 2 ) );