jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1342307 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Date Thu, 24 May 2012 16:02:54 GMT
Author: mduerig
Date: Thu May 24 16:02:54 2012
New Revision: 1342307

URL: http://svn.apache.org/viewvc?rev=1342307&view=rev
Log:
OAK-37: Use nullability annotation to enforce/document API contract
- remove redundant check for null

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java?rev=1342307&r1=1342306&r2=1342307&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/PropertyImpl.java
Thu May 24 16:02:54 2012
@@ -545,8 +545,7 @@ public class PropertyImpl extends ItemIm
     */
     private int getRequiredType(int defaultType) throws RepositoryException {
         // check type according to definition of this property
-        PropertyDefinition def = getDefinition();
-        int reqType = (def == null) ? PropertyType.UNDEFINED : getDefinition().getRequiredType();
+        int reqType = getDefinition().getRequiredType();
         if (reqType == PropertyType.UNDEFINED) {
             if (defaultType == PropertyType.UNDEFINED) {
                 reqType = PropertyType.STRING;



Mime
View raw message