Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
baev committed Dec 1, 2023
1 parent 92e8a5d commit 0cb5ebf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ final class ClassNames {

static final String DESCRIPTION_ANNOTATION = "io.qameta.allure.Description";

private ClassNames() {
throw new IllegalStateException("do not instance");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,7 @@ public boolean process(final Set<? extends TypeElement> annotations, final Round
final Set<ExecutableElement> methods = ElementFilter.methodsIn(elements);
methods.forEach(method -> {
final String rawDocs = elementUtils.getDocComment(method);
final List<String> typeParams = method.getParameters().stream()
.map(this::methodParameterTypeMapper)
.collect(Collectors.toList());
final String name = method.getSimpleName().toString();

if (rawDocs == null) {
return;
}
Expand All @@ -89,7 +86,14 @@ public boolean process(final Set<? extends TypeElement> annotations, final Round
return;
}

final String hash = generateMethodSignatureHash(method.getEnclosingElement().toString(), name, typeParams);
final String name = method.getSimpleName().toString();
final List<String> typeParams = method.getParameters().stream()
.map(this::methodParameterTypeMapper)
.collect(Collectors.toList());

final String hash = generateMethodSignatureHash(
method.getEnclosingElement().toString(), name, typeParams
);
try {
final FileObject file = filer.createResource(StandardLocation.CLASS_OUTPUT, "",
ALLURE_DESCRIPTIONS_FOLDER + hash);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ private Optional<String> getDisplayName(final Description result) {
.map(DisplayName::value);
}

@SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
private Optional<String> getDescription(final Description result) {
final io.qameta.allure.Description annotation = result
.getAnnotation(io.qameta.allure.Description.class);
Expand Down

0 comments on commit 0cb5ebf

Please sign in to comment.