Github user ottobackwards commented on the issue: https://github.com/apache/commons-lang/pull/311 ```java Optional<StackWatch> watchOptional = state.context.getWatch(); watchOptional.ifPresent((sw) -> sw.startTiming("lambda", "LAMBDA")); Object result = apply(localState); watchOptional.ifPresent(StackWatch::stopTiming); return result; ``` ```java Optional<StackWatch> watchOptional = state.context.getWatch(); Object result; if(watchOption.isPresent() { try( TimingNode timing = watchOption.get().startTiming("lambda","LAMBDA")) { result = apply(localState); } } else { result = apply(localState); } return result; ``` or something
---