Pierre Gruet pushed to branch upstream at Debian Med / jebl2


Commits:
664633f1 by Pierre Gruet at 2026-05-29T12:18:35+02:00
New upstream version 0.1+git20231105.51da3b1
- - - - -


1 changed file:

- src/jebl/evolution/io/NewickImporter.java


Changes:

=====================================
src/jebl/evolution/io/NewickImporter.java
=====================================
@@ -23,6 +23,8 @@ public class NewickImporter implements TreeImporter {
     private final ImportHelper helper;
     private boolean unquotedLabels;
 
+    private String lastLabel = null;
+
     /**
      * Constructor
      * @param reader  tree text
@@ -154,7 +156,7 @@ public class NewickImporter implements TreeImporter {
      */
     private Node readInternalNode(SimpleRootedTree tree) throws IOException, 
ImportException
     {
-        List<Node> children = new ArrayList<Node>();
+        List<Node> children = new ArrayList<>();
 
         // read the opening '('
         helper.readCharacter();
@@ -175,7 +177,7 @@ public class NewickImporter implements TreeImporter {
 
         // should have had a closing ')'
         if (helper.getLastDelimiter() != ')') {
-            throw new ImportException.BadFormatException("Missing closing ')' 
in tree");
+            throw new ImportException.BadFormatException("Missing closing ')' 
in tree" + (lastLabel != null ? " - after tip " + lastLabel : ""));
         }
 
         final Node node = tree.createInternalNode(children);
@@ -212,6 +214,7 @@ public class NewickImporter implements TreeImporter {
         if ("".equals(label)) {
             throw new ImportException.UnknownTaxonException("Emtpy node names 
are not allowed.");
         }
+        lastLabel = label;
         try {
             return tree.createExternalNode(Taxon.getTaxon(label));
         } catch (IllegalArgumentException e) {



View it on GitLab: 
https://salsa.debian.org/med-team/jebl2/-/commit/664633f19a51c262c70ea0666b45d7f2050b6df1

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/jebl2/-/commit/664633f19a51c262c70ea0666b45d7f2050b6df1
You're receiving this email because of your account on salsa.debian.org. Manage 
all notifications: https://salsa.debian.org/-/profile/notifications | Help: 
https://salsa.debian.org/help


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to