From 32d8d5d498436dd764d64381b1cae2be10fb0262 Mon Sep 17 00:00:00 2001 From: Stefan Hahmann Date: Thu, 5 Dec 2024 12:28:46 +0100 Subject: [PATCH] Add temporary workaround for a bug in mastodon-core --- .../treesimilarity/tree/BranchSpotTree.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/mastodon/mamut/clustering/treesimilarity/tree/BranchSpotTree.java b/src/main/java/org/mastodon/mamut/clustering/treesimilarity/tree/BranchSpotTree.java index ae2d51415..bf8e9aca9 100644 --- a/src/main/java/org/mastodon/mamut/clustering/treesimilarity/tree/BranchSpotTree.java +++ b/src/main/java/org/mastodon/mamut/clustering/treesimilarity/tree/BranchSpotTree.java @@ -169,7 +169,16 @@ public void setParams( final boolean includeName, final boolean includeTag, fina private String getTagLabel() { Spot ref = model.getGraph().vertexRef(); - String tagLabel = LegacyTagSetUtils.getTagLabel( model, branchSpot, tagSet, ref ); + String tagLabel = null; + try + { + // TODO: this try-catch block is a workaround. It will not be needed anymore after mastodon-core beta-34 + tagLabel = LegacyTagSetUtils.getTagLabel( model, branchSpot, tagSet, ref ); + } + catch ( NullPointerException e ) + { + // happens, when the branchSpot is not in the model anymore + } model.getGraph().releaseRef( ref ); if ( tagLabel == null ) tagLabel = "";