jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r405567 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
Date Tue, 09 May 2006 23:09:25 GMT
Author: tripod
Date: Tue May  9 16:09:24 2006
New Revision: 405567

URL: http://svn.apache.org/viewcvs?rev=405567&view=rev
Log:
adding simple protection of eventual NPE. need to investigate further.

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewcvs/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?rev=405567&r1=405566&r2=405567&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
Tue May  9 16:09:24 2006
@@ -152,8 +152,12 @@
                     QName name = pState.getName();
                     UUID ref = (UUID) pState.getValues()[0].internalValue();
                     InternalVersionImpl v = (InternalVersionImpl) getVersion(new NodeId(ref));
-                    labelCache.put(name, v);
-                    v.internalAddLabel(name);
+                    if (v != null) {
+                        labelCache.put(name, v);
+                        v.internalAddLabel(name);
+                    } else {
+                        log.warn("Error while resolving label reference. Version missing:
" + ref);
+                    }
                 }
             }
         } catch (ItemStateException e) {



Mime
View raw message