Commits

Sebastian Sdorra committed 2a66c71

use ArrayList instead of ImmutableList for searchresult, because the result must be mutable for decorators

  • Participants
  • Parent commits 0fe78d2
  • Branches issue-345

Comments (0)

Files changed (1)

File scm-webapp/src/main/java/sonia/scm/search/SearchHandler.java

 
 import com.google.common.base.Function;
 import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
 
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.subject.Subject;
           Collections2.transform(users, function);
 
         result.setSuccess(true);
+
         // create a copy of the result collection to reduce memory
-        result.setResults(ImmutableList.copyOf(resultCollection));
+        // use ArrayList instead of ImmutableList for copy, 
+        // because the list must be mutable for decorators
+        result.setResults(Lists.newArrayList(resultCollection));
         cache.put(queryString, result);
       }
     }