Plamen Totev
2015-07-12 d0bb38c765274b1c889a429616d4da2b478cdbd2
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.
1 files modified
2 ■■■ changed files
src/main/java/com/gitblit/service/LuceneService.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/gitblit/service/LuceneService.java
@@ -437,7 +437,7 @@
                    // skip non-annotated tags
                    continue;
                }
                if (!tags.containsKey(tag.getObjectId().getName())) {
                if (!tags.containsKey(tag.getReferencedObjectId().getName())) {
                    tags.put(tag.getReferencedObjectId().getName(), new ArrayList<String>());
                }
                tags.get(tag.getReferencedObjectId().getName()).add(tag.displayName);