From 31abc26dd0354bc2dafe27c011c2e54934a89486 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Sun, 02 Oct 2011 15:37:24 -0400
Subject: [PATCH] Fairly complete json rpc interface to view/control Gitblit data objects.

---
 src/com/gitblit/utils/FederationUtils.java |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/com/gitblit/utils/FederationUtils.java b/src/com/gitblit/utils/FederationUtils.java
index d04a7a3..324aa67 100644
--- a/src/com/gitblit/utils/FederationUtils.java
+++ b/src/com/gitblit/utils/FederationUtils.java
@@ -49,16 +49,13 @@
  */
 public class FederationUtils {
 
-	public static final Type REPOSITORIES_TYPE = new TypeToken<Map<String, RepositoryModel>>() {
+	private static final Type REPOSITORIES_TYPE = new TypeToken<Map<String, RepositoryModel>>() {
 	}.getType();
 
-	public static final Type SETTINGS_TYPE = new TypeToken<Map<String, String>>() {
+	private static final Type SETTINGS_TYPE = new TypeToken<Map<String, String>>() {
 	}.getType();
 
-	public static final Type USERS_TYPE = new TypeToken<Collection<UserModel>>() {
-	}.getType();
-
-	public static final Type RESULTS_TYPE = new TypeToken<List<FederationModel>>() {
+	private static final Type USERS_TYPE = new TypeToken<Collection<UserModel>>() {
 	}.getType();
 
 	private static final Logger LOGGER = LoggerFactory.getLogger(FederationUtils.class);
@@ -276,10 +273,11 @@
 	 * @return a collection of UserModel objects
 	 * @throws Exception
 	 */
-	public static Collection<UserModel> getUsers(FederationModel registration) throws Exception {
+	public static List<UserModel> getUsers(FederationModel registration) throws Exception {
 		String url = asLink(registration.url, registration.token, FederationRequest.PULL_USERS);
 		Collection<UserModel> models = JsonUtils.retrieveJson(url, USERS_TYPE);
-		return models;
+		List<UserModel> list = new ArrayList<UserModel>(models);
+		return list;
 	}
 
 	/**

--
Gitblit v1.9.1