You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Julian Reschke <ju...@gmx.de> on 2017/04/24 12:14:12 UTC

Intent to backport to 1.6/1.4/1.2/1.0: OAK-6086

...a trivial fix making the actual call parameters consistent with the 
nullability annotations.


On 2017-04-24 14:10, reschke@apache.org wrote:
> Author: reschke
> Date: Mon Apr 24 12:10:40 2017
> New Revision: 1792463
>
> URL: http://svn.apache.org/viewvc?rev=1792463&view=rev
> Log:
> OAK-6086: Incorrect usage of RDBDocumentStore.unwrap()
>
> Modified:
>     jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
>
> Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java?rev=1792463&r1=1792462&r2=1792463&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java (original)
> +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java Mon Apr 24 12:10:40 2017
> @@ -686,7 +686,8 @@ public class RDBDocumentStore implements
>          if (collection != Collection.NODES) {
>              return null;
>          } else {
> -            NodeDocument doc = unwrap(nodesCache.getIfPresent(id));
> +            NodeDocument doc = nodesCache.getIfPresent(id);
> +            doc = (doc != null) ? unwrap(doc) : null;
>              return castAsT(doc);
>          }
>      }
>
>
>


Re: Intent to backport to 1.6/1.4/1.2/1.0: OAK-6086

Posted by Marcel Reutegger <mr...@adobe.com>.
+1 for back-porting this fix.

Regards
  Marcel

On 24/04/17 14:14, Julian Reschke wrote:
> ...a trivial fix making the actual call parameters consistent with the
> nullability annotations.
>
>
> On 2017-04-24 14:10, reschke@apache.org wrote:
>> Author: reschke
>> Date: Mon Apr 24 12:10:40 2017
>> New Revision: 1792463
>>
>> URL: http://svn.apache.org/viewvc?rev=1792463&view=rev
>> Log:
>> OAK-6086: Incorrect usage of RDBDocumentStore.unwrap()
>>
>> Modified:
>>
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
>>
>>
>> Modified:
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
>>
>> URL:
>> http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java?rev=1792463&r1=1792462&r2=1792463&view=diff
>>
>> ==============================================================================
>>
>> ---
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
>> (original)
>> +++
>> jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBDocumentStore.java
>> Mon Apr 24 12:10:40 2017
>> @@ -686,7 +686,8 @@ public class RDBDocumentStore implements
>>          if (collection != Collection.NODES) {
>>              return null;
>>          } else {
>> -            NodeDocument doc = unwrap(nodesCache.getIfPresent(id));
>> +            NodeDocument doc = nodesCache.getIfPresent(id);
>> +            doc = (doc != null) ? unwrap(doc) : null;
>>              return castAsT(doc);
>>          }
>>      }
>>
>>
>>
>