From 4838c534a2f29109e7e5bcf8bad074fd4fa17f6d Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 29 Sep 2011 11:09:22 -0400
Subject: [PATCH] Set default federation strategy in model (issue 20)

---
 docs/04_releases.mkd                        |    1 +
 src/com/gitblit/models/RepositoryModel.java |    3 ++-
 docs/00_index.mkd                           |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/docs/00_index.mkd b/docs/00_index.mkd
index 48d373b..2c40e1e 100644
--- a/docs/00_index.mkd
+++ b/docs/00_index.mkd
@@ -28,6 +28,7 @@
 
 **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
 
+- fixed: Null pointer exception if did not set federation strategy (issue 20)
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
 - added: IUserService.setup(IStoredSettings) for custom user service implementations
 
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index c63f6eb..667e5f2 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -3,6 +3,7 @@
 ### Current Release
 **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] &nbsp; *released %BUILDDATE%*
 
+- fixed: Null pointer exception if did not set federation strategy (issue 20)
 - fixed: Gitblit GO allows SSL renegotiation if running on Java 1.6.0_22 or later
 - added: IUserService.setup(IStoredSettings) for custom user service implementations
 
diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/com/gitblit/models/RepositoryModel.java
index 0f1a676..e85fd6a 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/com/gitblit/models/RepositoryModel.java
@@ -63,7 +63,8 @@
 		this.owner = owner;
 		this.lastChange = lastchange;
 		this.accessRestriction = AccessRestrictionType.NONE;
-		federationSets = new ArrayList<String>();
+		this.federationSets = new ArrayList<String>();
+		this.federationStrategy = FederationStrategy.FEDERATE_THIS;
 	}
 
 	@Override

--
Gitblit v1.9.1