changeset 1540:4c5a2c8d2db4

Relaxed vendor and title to be no longer mandatory - based on oracle javaws behavior * netx/net/sourceforge/jnlp/JNLPFile.java: getVendor/Title refactored to work without values. In strict mode, they keep throwing MisisngElement exception/ * netx/net/sourceforge/jnlp/Parser.java: delegating logic to check title/vendor to JNLPfile. Jsut calling it with possibility of fail. * netx/net/sourceforge/jnlp/resources/Messages.properties: added PMissingMandatoryWarning and PMissingMandatorySubstitution to inform about missing title/vendor * tests/netx/unit/net/sourceforge/jnlp/ParserTest.java: adapted to new behavior
author Jiri Vanek <jvanek@redhat.com>
date Tue, 15 Jan 2019 18:08:34 +0100
parents bd5ba061f12c
children 3bb7eb063740
files ChangeLog netx/net/sourceforge/jnlp/JNLPFile.java netx/net/sourceforge/jnlp/Parser.java netx/net/sourceforge/jnlp/resources/Messages.properties tests/netx/unit/net/sourceforge/jnlp/ParserTest.java
diffstat 5 files changed, 122 insertions(+), 71 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 15 17:56:07 2019 +0100
+++ b/ChangeLog	Tue Jan 15 18:08:34 2019 +0100
@@ -1,3 +1,13 @@
+2019-01-15  Jiri Vanek <jvanek@redhat.com>
+
+	Relaxed vendor and title to be no longer mandatory - based on oracle javaws behavior
+	* netx/net/sourceforge/jnlp/JNLPFile.java: getVendor/Title refactored to work without values. In strict mode,
+	they keep throwing MisisngElement exception/
+	* netx/net/sourceforge/jnlp/Parser.java: delegating logic to check title/vendor to JNLPfile. Jsut calling it with possibility of fail.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: added PMissingMandatoryWarning and PMissingMandatorySubstitution
+	to inform about missing title/vendor
+	* tests/netx/unit/net/sourceforge/jnlp/ParserTest.java: adapted to new behavior
+
 2019-01-15  Jiri Vanek <jvanek@redhat.com>
 
 	Made Linux launchers portable
--- a/netx/net/sourceforge/jnlp/JNLPFile.java	Tue Jan 15 17:56:07 2019 +0100
+++ b/netx/net/sourceforge/jnlp/JNLPFile.java	Tue Jan 15 18:08:34 2019 +0100
@@ -327,13 +327,40 @@
      * See PluginBridge
      */
     public String getTitle() {
+        try {
+            return getTitle(false);
+        } catch (MissingTitleException cause) {
+            throw new RuntimeException(cause);
+        }
+    }
+
+    public String getTitle(boolean kill) throws MissingTitleException {
+        String title = getTitleImpl();
+        if (title == null) {
+            title = "";
+
+        }
+        if (title.trim().isEmpty() && kill) {
+            throw new MissingTitleException();
+        }
+        if (title.trim().isEmpty()) {
+            OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("PMissingElement", R("PMissingTitle")));
+            title = R("PMissingMandatorySubstitution", R("PMissingTitle"));
+            OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("PMissingMandatoryWarning", R("PMissingTitle")) + ": " + title);
+        } else {
+            OutputController.getLogger().log("Acceptable title tag found, contains: " + title);
+        }
+        return title;
+    }
+
+    private String getTitleImpl() {
         String jnlpTitle = getTitleFromJnlp();
         String manifestTitle = getTitleFromManifest();
         if (jnlpTitle != null && manifestTitle != null) {
             if (jnlpTitle.equals(manifestTitle)) {
                 return jnlpTitle;
             }
-            return jnlpTitle+" ("+manifestTitle+")";
+            return jnlpTitle + " (" + manifestTitle + ")";
         }
         if (jnlpTitle != null && manifestTitle == null) {
             return jnlpTitle;
@@ -342,32 +369,56 @@
             return manifestTitle;
         }
         String mainClass = getManifestsAttributes().getMainClass();
-        return mainClass;        
+        return mainClass;
     }
-    
+
     /**
-     * @return the JNLP file's best localized title. This method returns the same
-     * value as InformationDesc.getTitle().
+     * @return the JNLP file's best localized title. This method returns the
+     * same value as InformationDesc.getTitle().
      */
     public String getTitleFromJnlp() {
         return getInformation().getTitle();
     }
-    
+
     public String getTitleFromManifest() {
         String inManifestTitle = getManifestsAttributes().getApplicationName();
-        if (inManifestTitle == null && getManifestsAttributes().isLoader()){
+        if (inManifestTitle == null && getManifestsAttributes().isLoader()) {
             OutputController.getLogger().log(OutputController.Level.WARNING_ALL, TITLE_NOT_FOUND);
         }
         return inManifestTitle;
     }
-    
-    
 
     /**
-     * @return the JNLP file's best localized vendor. This method returns the same
-     * value as InformationDesc.getVendor().
+     * @return the JNLP file's best localized vendor. This method returns the
+     * same value as InformationDesc.getVendor().
      */
     public String getVendor() {
+        try {
+            return getVendor(false);
+        } catch (MissingVendorException cause) {
+            throw new RuntimeException(cause);
+        }
+    }
+
+    public String getVendor(boolean kill) throws MissingVendorException {
+        String vendor = getVendorImpl();
+        if (vendor == null) {
+            vendor = "";
+        }
+        if (vendor.trim().isEmpty() && kill) {
+            throw new MissingVendorException();
+        }
+        if (vendor.trim().isEmpty()) {
+            OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("PMissingElement", R("PMissingVendor")));
+            vendor = R("PMissingMandatorySubstitution", R("PMissingVendor"));
+            OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("PMissingMandatoryWarning", R("PMissingVendor")) + ": " + vendor);
+        } else {
+            OutputController.getLogger().log("Acceptable vendor tag found, contains: " + vendor);
+        }
+        return vendor;
+    }
+
+    private String getVendorImpl() {
         return getInformation().getVendor();
     }
 
--- a/netx/net/sourceforge/jnlp/Parser.java	Tue Jan 15 17:56:07 2019 +0100
+++ b/netx/net/sourceforge/jnlp/Parser.java	Tue Jan 15 18:08:34 2019 +0100
@@ -29,6 +29,7 @@
 import net.sourceforge.jnlp.SecurityDesc.RequestedPermissionLevel;
 import net.sourceforge.jnlp.UpdateDesc.Check;
 import net.sourceforge.jnlp.UpdateDesc.Policy;
+import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.logging.OutputController;
 
 /**
@@ -486,21 +487,8 @@
     void checkForInformation() throws RequiredElementException {
         OutputController.getLogger().log("Homepage: " + file.getInformation().getHomepage());
         OutputController.getLogger().log("Description: " + file.getInformation().getDescription());
-
-        String title = file.getTitle();
-        String vendor = file.getVendor();
-
-        if (title == null || title.trim().isEmpty()) {
-            throw new MissingTitleException();
-        } else {
-            OutputController.getLogger().log("Acceptable title tag found, contains: " + title);
-        }
-
-        if (vendor == null || vendor.trim().isEmpty()) {
-            throw new MissingVendorException();
-        } else {
-            OutputController.getLogger().log("Acceptable vendor tag found, contains: " + vendor);
-        }
+        file.getTitle(strict);
+        file.getVendor(strict);
     }
 
     /**
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Tue Jan 15 17:56:07 2019 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Tue Jan 15 18:08:34 2019 +0100
@@ -195,6 +195,8 @@
 PMissingTitle=title
 PMissingVendor=vendor
 PMissingElement=The {0} section has not been specified for your locale nor does a default value exist in the JNLP file.
+PMissingMandatoryWarning=However there is to many applications known to suffer this issue, so providing fake: 
+PMissingMandatorySubstitution=Corrupted or missing {0}. Do not trust this application!
 PTwoDescriptions=Duplicate description elements of kind {0} are illegal.
 PSharing=sharing-allowed element is illegal in a standard JNLP file
 PTwoSecurity=Only one security element allowed per JNLP file.
--- a/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java	Tue Jan 15 17:56:07 2019 +0100
+++ b/tests/netx/unit/net/sourceforge/jnlp/ParserTest.java	Tue Jan 15 18:08:34 2019 +0100
@@ -85,8 +85,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -336,8 +336,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -363,8 +363,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -387,8 +387,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
@@ -411,8 +411,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
@@ -434,8 +434,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -457,8 +457,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(ALL_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -534,8 +534,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -557,7 +557,7 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
+        Parser parser = new Parser(file, null, root, strictParser);
         List<InformationDesc> infoDescs = parser.getInfo(root);
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -781,8 +781,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -808,8 +808,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -832,8 +832,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
@@ -856,8 +856,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
@@ -879,8 +879,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -902,8 +902,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_COUNTRY_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -979,8 +979,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -1002,7 +1002,7 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
+        Parser parser = new Parser(file, null, root, strictParser);
         List<InformationDesc> infoDescs = parser.getInfo(root);
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -1023,7 +1023,7 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
+        Parser parser = new Parser(file, null, root, strictParser);
         List<InformationDesc> infoDescs = parser.getInfo(root);
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
 
@@ -1186,8 +1186,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -1213,8 +1213,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly three info descs should be found", infoDescs.size() == 3);
@@ -1237,8 +1237,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found", infoDescs.size() == 2);
@@ -1261,8 +1261,8 @@
         Node root = Parser.getRootNode(new ByteArrayInputStream(data.getBytes()), defaultParser);
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly two info descs should be found",infoDescs.size() == 2);
@@ -1284,8 +1284,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);
@@ -1307,8 +1307,8 @@
         Assert.assertEquals("Root name is not jnlp", "jnlp", root.getNodeName().getName());
 
         MockJNLPFile file = new MockJNLPFile(LANG_LOCALE);
-        Parser parser = new Parser(file, null, root, defaultParser);
-        List<InformationDesc> infoDescs = new ArrayList<InformationDesc>();
+        Parser parser = new Parser(file, null, root, strictParser);
+        List<InformationDesc> infoDescs = new ArrayList<>();
         infoDescs.addAll(parser.getInfo(root));
 
         Assert.assertTrue("Exactly one info desc should be found", infoDescs.size() == 1);