From 9b82d16c49738e1ec6cf848c80e78e8a7ce4a76c Mon Sep 17 00:00:00 2001 From: Kevin Mader Date: Wed, 8 Oct 2014 11:53:08 +0200 Subject: [PATCH] Ignore whitespace between indexed annotations When creating uber jars via Maven Shade's AppendingTransformer, the annotation indexes are concatenated, separated by line feed characters. So let's just ingore whitespace between indexed annotations, handling the illustrated problem gracefully. This fixes https://github.com/scijava/scijava-common/issues/128. Signed-off-by: Johannes Schindelin --- src/main/java/org/scijava/annotations/IndexReader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/scijava/annotations/IndexReader.java b/src/main/java/org/scijava/annotations/IndexReader.java index a08fad8c5..3121bf4c1 100644 --- a/src/main/java/org/scijava/annotations/IndexReader.java +++ b/src/main/java/org/scijava/annotations/IndexReader.java @@ -73,6 +73,7 @@ class IndexReader { public Object next() throws IOException { int c = in.read(); + while (Character.isWhitespace(c)) c = in.read(); if (c < 0) { return null; }