[ 
https://issues.apache.org/jira/browse/DIRSERVER-2410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emmanuel Lécharny resolved DIRSERVER-2410.
------------------------------------------
    Fix Version/s: 2.0.0.AM28
       Resolution: Fixed

The check for {{entryDnCache != null}} in line 2808 is absolutely useless, the 
{{entryDnCache}} variable is always initialized in the {{doInit()}} method and 
will never be null

> Potential NRE in AbstractBTreePartition
> ---------------------------------------
>
>                 Key: DIRSERVER-2410
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2410
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Ekaterina Zilotina
>            Priority: Major
>             Fix For: 2.0.0.AM28
>
>
> Let's see 
> [buildEntryDn()|https://github.com/apache/directory-server/blob/5f01dc406ff24892164849c73a34b1781b0f6a26/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java#L2793]
>  method of AbstractBTreePartition class.
> There is comparison of *entryDnCache* value with null in line 2808, that 
> hints that the method {*}put{*}, which calls in 2869 line, can dereference 
> null in {*}entryDnCache{*}. Is it absolutely true that in complex the 
> conditions in lines 2808 and 2812 must only works as "{_}true+true{_}" or be 
> skipped by first "{_}false{_}"? Does this part of code need another check 
> before 2869 line?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to