From: Plamen Totev Date: Sun, 12 Jul 2015 15:08:14 +0000 (+0300) Subject: Fix tags not properly indexed in Lucene X-Git-Tag: v1.7.0~1^2~42^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F291%2Fhead;p=gitblit.git Fix tags not properly indexed in Lucene All tags that reference to particular object are stored in a list within a map. There is a if statement that inits empty list when there are not references to the current object yet, but the boolean expression checks for the wrong value. --- diff --git a/src/main/java/com/gitblit/service/LuceneService.java b/src/main/java/com/gitblit/service/LuceneService.java index 285ea8d7..097a39b2 100644 --- a/src/main/java/com/gitblit/service/LuceneService.java +++ b/src/main/java/com/gitblit/service/LuceneService.java @@ -437,7 +437,7 @@ public class LuceneService implements Runnable { // skip non-annotated tags continue; } - if (!tags.containsKey(tag.getObjectId().getName())) { + if (!tags.containsKey(tag.getReferencedObjectId().getName())) { tags.put(tag.getReferencedObjectId().getName(), new ArrayList()); } tags.get(tag.getReferencedObjectId().getName()).add(tag.displayName);