diff --git a/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java b/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java index b41e494..ed97d09 100644 --- a/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java +++ b/junit5/src/main/java/com/automation/remarks/junit5/VideoExtension.java @@ -49,10 +49,7 @@ public void afterTestExecution(ExtensionContext context) throws Exception { private boolean videoDisabled(Method testMethod) { Optional video = AnnotationUtils.findAnnotation(testMethod, com.automation.remarks.video.annotations.Video.class); - return video.map(v -> !videoEnabled(v)) - .orElseGet(() -> true); - - //return !video.isPresent() && !videoEnabled(video.get()); + return !videoEnabled(video.orElse(null)); } private String getFileName(Method testMethod) {