From 6c75ce7f68ddd6ff3f7cab01a2dbfd28355ccbc4 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 16 Mar 2021 22:32:47 +0300 Subject: [PATCH] Fix bug in TestNG annotation support --- .../src/main/java/org/teavm/junit/TeaVMTestRunner.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java b/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java index 8eba20ab4..2e5f99acd 100644 --- a/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java +++ b/tools/junit/src/main/java/org/teavm/junit/TeaVMTestRunner.java @@ -660,7 +660,11 @@ public class TeaVMTestRunner extends Runner implements Filterable { return runner; } - String providerName = annot.getValue("dataProvider").getString(); + AnnotationValue dataProviderValue = annot.getValue("dataProvider"); + if (dataProviderValue == null) { + return runner; + } + String providerName = dataProviderValue.getString(); if (providerName.isEmpty()) { return runner; }