Re: Enhance ObjectHelper's after/before/between

2016-10-16 Thread Claus Ibsen
On Fri, Oct 14, 2016 at 2:38 PM, Antonin Stefanutti wrote: > >> On 14 Oct 2016, at 14:35, Luca Burgazzoli wrote: >> >> An option would be to move before/after/between in StringHelper and >> wrapping them in ObjectHelper with @Deprecated annotation,

Re: Enhance ObjectHelper's after/before/between

2016-10-14 Thread Luca Burgazzoli
I've logged two JIRA: - https://issues.apache.org/jira/browse/CAMEL-10389 --> Move some function to Stringhelper (target 2.19) - https://issues.apache.org/jira/browse/CAMEL-10390 --> Enhance before/after/between (target 2.18.1) --- Luca Burgazzoli On Fri, Oct 14, 2016 at 2:38 PM, Antonin

Re: Enhance ObjectHelper's after/before/between

2016-10-14 Thread Antonin Stefanutti
> On 14 Oct 2016, at 14:35, Luca Burgazzoli wrote: > > An option would be to move before/after/between in StringHelper and > wrapping them in ObjectHelper with @Deprecated annotation, the > proposed new methods should go straight to StringHelper. I didn’t dare to propose

Re: Enhance ObjectHelper's after/before/between

2016-10-14 Thread Luca Burgazzoli
An option would be to move before/after/between in StringHelper and wrapping them in ObjectHelper with @Deprecated annotation, the proposed new methods should go straight to StringHelper. --- Luca Burgazzoli On Fri, Oct 14, 2016 at 2:25 PM, Antonin Stefanutti wrote: > Hi

Re: Enhance ObjectHelper's after/before/between

2016-10-14 Thread Antonin Stefanutti
Hi Luca, Make sense to me. As I refactored Camel CDI with Java 8 in Camel 2.18.0, I found using Optional as return type of internal util methods quite useful in term of client conciseness / readability compared to null handling. I’m wondering whether that should be added to StringHelper

Enhance ObjectHelper's after/before/between

2016-10-14 Thread Luca Burgazzoli
Hello, I've sometime had the need to find a string after a separator, lookup an object based on the result value and then use it to process something, like: String after = ObjectHelper.after(key, ":"); if (after != null) { MyStuff s = cache.get(after) if (s != null) {