jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1405050 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
Date Fri, 02 Nov 2012 17:00:57 GMT
Author: mduerig
Date: Fri Nov  2 17:00:57 2012
New Revision: 1405050

URL: http://svn.apache.org/viewvc?rev=1405050&view=rev
Log:
null check

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java?rev=1405050&r1=1405049&r2=1405050&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/util/NodeUtil.java
Fri Nov  2 17:00:57 2012
@@ -40,6 +40,7 @@ import org.apache.jackrabbit.oak.plugins
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.base.Preconditions.checkNotNull;
 import static org.apache.jackrabbit.oak.api.Type.BOOLEAN;
 import static org.apache.jackrabbit.oak.api.Type.DATE;
 import static org.apache.jackrabbit.oak.api.Type.LONG;
@@ -60,8 +61,8 @@ public class NodeUtil {
     private final Tree tree;
 
     public NodeUtil(Tree tree, NameMapper mapper) {
-        this.mapper = mapper;
-        this.tree = tree;
+        this.mapper = checkNotNull(mapper);
+        this.tree = checkNotNull(tree);
     }
 
     public NodeUtil(Tree tree) {



Mime
View raw message