Skip to content

Commit

Permalink
[sint] review feedback: init variable near first use
Browse files Browse the repository at this point in the history
  • Loading branch information
guusdk committed Apr 9, 2024
1 parent fc321c9 commit e488c26
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,13 @@ public static void main(String[] args) throws IOException, KeyManagementExceptio
}

private static String getSpecificationReference(Method method) {
final SmackIntegrationTest test = method.getAnnotation(SmackIntegrationTest.class);
final SpecificationReference spec = method.getDeclaringClass().getAnnotation(SpecificationReference.class);
if (spec == null || spec.document().isBlank()) {
return null;
}
String line = spec.document().trim();

final SmackIntegrationTest test = method.getAnnotation(SmackIntegrationTest.class);
if (test.section() != null && !test.section().isBlank()) {
line += " section " + test.section().trim();
}
Expand Down

0 comments on commit e488c26

Please sign in to comment.