From e488c26596910d721873954f4901708ccae5ef4f Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Tue, 9 Apr 2024 14:39:43 +0200 Subject: [PATCH] [sint] review feedback: init variable near first use --- .../smack/inttest/SmackIntegrationTestFramework.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java index 8034145e0e..6c1bbc7174 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java @@ -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(); }