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

Joerg Schaible resolved LANG-605.
---------------------------------

    Resolution: Fixed

{noformat}
commit -m "Fix DefaultExceptionContext.addValue that overwrites information in 
a recursive situation (LANG-605). Allow explicit replacement of a label with 
the new replaceValue methods." (7 paths specified)
    Sending        
Commons/proper/lang/src/main/java/org/apache/commons/lang3/exception/ContextedException.java
    Sending        
Commons/proper/lang/src/main/java/org/apache/commons/lang3/exception/ContextedRuntimeException.java
    Sending        
Commons/proper/lang/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
    Sending        
Commons/proper/lang/src/main/java/org/apache/commons/lang3/exception/ExceptionContext.java
    Sending        
Commons/proper/lang/src/test/java/org/apache/commons/lang3/exception/ContextedExceptionTest.java
    Sending        
Commons/proper/lang/src/test/java/org/apache/commons/lang3/exception/ContextedRuntimeExceptionTest.java
    Sending        
Commons/proper/lang/src/test/java/org/apache/commons/lang3/exception/DefaultExceptionContextTest.java
    Transmitting file data ...
    Committed revision 923341.
{noformat}

I added now a replaceValue method to make the old behavior explicit. However, 
the addValue is used in normal cases and that should not overwrite the existing 
values.

> DefaultExceptionContext overwrites values in recursive situations
> -----------------------------------------------------------------
>
>                 Key: LANG-605
>                 URL: https://issues.apache.org/jira/browse/LANG-605
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.exception.*
>    Affects Versions: 3.0
>            Reporter: Joerg Schaible
>            Assignee: Joerg Schaible
>            Priority: Minor
>             Fix For: 3.0
>
>
> The DefaultExceptionContext is not useful in case of a recursion, since while 
> adding information unwrapping the stack, the added info will always overwrite 
> the one that is already provided from a deeper stack level. Therefore the 
> label should be appended with a sequence number if it already exists.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to