You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/11/03 16:19:00 UTC

svn commit: r1197180 - /archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java

Author: olamy
Date: Thu Nov  3 15:19:00 2011
New Revision: 1197180

URL: http://svn.apache.org/viewvc?rev=1197180&view=rev
Log:
fix formatting

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java?rev=1197180&r1=1197179&r2=1197180&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultSearchService.java Thu Nov  3 15:19:00 2011
@@ -49,7 +49,6 @@ import org.springframework.stereotype.Se
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
@@ -141,18 +140,18 @@ public class DefaultSearchService
         }
     }
 
-    public GroupIdList getAllGroupIds(List<String> selectedRepos)
+    public GroupIdList getAllGroupIds( List<String> selectedRepos )
         throws ArchivaRestServiceException
     {
         List<String> observableRepos = getObservableRepos();
         List<String> repos = ListUtils.intersection( observableRepos, selectedRepos );
-        if (repos == null || repos.isEmpty())
+        if ( repos == null || repos.isEmpty() )
         {
             return new GroupIdList( Collections.<String>emptyList() );
         }
         try
         {
-            return new GroupIdList( new ArrayList<String>( repositorySearch.getAllGroupIds( getPrincipal(), repos  ) ) );
+            return new GroupIdList( new ArrayList<String>( repositorySearch.getAllGroupIds( getPrincipal(), repos ) ) );
         }
         catch ( RepositorySearchException e )
         {
@@ -293,7 +292,8 @@ public class DefaultSearchService
 
     protected String getBaseUrl( HttpServletRequest req )
     {
-        return req.getScheme() + "://" + req.getServerName()
-            + ( req.getServerPort() == 80 ? "" : ":" + req.getServerPort() ) + req.getContextPath();
+        return req.getScheme() + "://" + req.getServerName() + ( req.getServerPort() == 80
+            ? ""
+            : ":" + req.getServerPort() ) + req.getContextPath();
     }
 }