You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/01/28 08:41:46 UTC

[plc4x] branch develop updated: test: small cleanup in XmlTestsuiteLoader

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 54be8e9  test: small cleanup in XmlTestsuiteLoader
54be8e9 is described below

commit 54be8e917a8ff7c91b1f03cecdd074d4427c8c05
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jan 28 09:41:05 2022 +0100

    test: small cleanup in XmlTestsuiteLoader
---
 .../src/main/java/org/apache/plc4x/test/XmlTestsuiteLoader.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/XmlTestsuiteLoader.java b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/XmlTestsuiteLoader.java
index 73b6cf5..5f24dc5 100644
--- a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/XmlTestsuiteLoader.java
+++ b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/XmlTestsuiteLoader.java
@@ -25,10 +25,11 @@ import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.Objects;
 
 /**
  * Parent class for test suites utilizing XML as representation mechanism.
- *
+ * <p>
  * It adds handling of resource loading and helps in navigating test framework to suite source files.
  */
 public abstract class XmlTestsuiteLoader {
@@ -47,6 +48,7 @@ public abstract class XmlTestsuiteLoader {
 
         try {
             URL resource = getClass().getResource(testsuiteDocument);
+            Objects.requireNonNull(resource, testsuiteDocument + " not found in classpath");
             if ("file".equals(resource.getProtocol())) { // we run in IDE so lets swap "target" directory to source!
                 String sourceLocation = resource.toString()
                     .replace("/target/classes/", "/src/main/resources/")