Skip to content

Commit b03fcc8

Browse files
committed
fix npe in attachment aspect
1 parent 759f60b commit b03fcc8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

allure-java-commons/src/main/java/io/qameta/allure/aspects/AttachmentsAspects.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void attachment(final JoinPoint joinPoint, final Object result) {
7070
final MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
7171
final Attachment attachment = methodSignature.getMethod()
7272
.getAnnotation(Attachment.class);
73-
final byte[] bytes = (result instanceof byte[]) ? (byte[]) result : result.toString()
73+
final byte[] bytes = (result instanceof byte[]) ? (byte[]) result : Objects.toString(result)
7474
.getBytes(StandardCharsets.UTF_8);
7575

7676
final String name = attachment.value().isEmpty()

0 commit comments

Comments
 (0)