From 699e71e76b15081baf746c6ce9c9144f7e5f1ff9 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Mon, 30 Sep 2013 10:11:28 -0400
Subject: [PATCH] Trim trailing whitespace and organize imports

---
 src/main/java/com/gitblit/GitFilter.java |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/main/java/com/gitblit/GitFilter.java b/src/main/java/com/gitblit/GitFilter.java
index baa7ff0..5e18f5f 100644
--- a/src/main/java/com/gitblit/GitFilter.java
+++ b/src/main/java/com/gitblit/GitFilter.java
@@ -27,9 +27,9 @@
  * The GitFilter is an AccessRestrictionFilter which ensures that Git client
  * requests for push, clone, or view restricted repositories are authenticated
  * and authorized.
- * 
+ *
  * @author James Moger
- * 
+ *
  */
 public class GitFilter extends AccessRestrictionFilter {
 
@@ -42,7 +42,7 @@
 
 	/**
 	 * Extract the repository name from the url.
-	 * 
+	 *
 	 * @param cloneUrl
 	 * @return repository name
 	 */
@@ -59,7 +59,7 @@
 
 	/**
 	 * Extract the repository name from the url.
-	 * 
+	 *
 	 * @param url
 	 * @return repository name
 	 */
@@ -71,7 +71,7 @@
 	/**
 	 * Analyze the url and returns the action of the request. Return values are
 	 * either "/git-receive-pack" or "/git-upload-pack".
-	 * 
+	 *
 	 * @param serverUrl
 	 * @return action of the request
 	 */
@@ -92,20 +92,20 @@
 		}
 		return null;
 	}
-	
+
 	/**
 	 * Determine if a non-existing repository can be created using this filter.
-	 *  
+	 *
 	 * @return true if the server allows repository creation on-push
 	 */
 	@Override
 	protected boolean isCreationAllowed() {
 		return GitBlit.getBoolean(Keys.git.allowCreateOnPush, true);
 	}
-	
+
 	/**
 	 * Determine if the repository can receive pushes.
-	 * 
+	 *
 	 * @param repository
 	 * @param action
 	 * @return true if the action may be performed
@@ -124,7 +124,7 @@
 
 	/**
 	 * Determine if the repository requires authentication.
-	 * 
+	 *
 	 * @param repository
 	 * @param action
 	 * @return true if authentication required
@@ -133,7 +133,7 @@
 	protected boolean requiresAuthentication(RepositoryModel repository, String action) {
 		if (gitUploadPack.equals(action)) {
 			// send to client
-			return repository.accessRestriction.atLeast(AccessRestrictionType.CLONE);	
+			return repository.accessRestriction.atLeast(AccessRestrictionType.CLONE);
 		} else if (gitReceivePack.equals(action)) {
 			// receive from client
 			return repository.accessRestriction.atLeast(AccessRestrictionType.PUSH);
@@ -144,7 +144,7 @@
 	/**
 	 * Determine if the user can access the repository and perform the specified
 	 * action.
-	 * 
+	 *
 	 * @param repository
 	 * @param user
 	 * @param action
@@ -155,7 +155,7 @@
 		if (!GitBlit.getBoolean(Keys.git.enableGitServlet, true)) {
 			// Git Servlet disabled
 			return false;
-		}		
+		}
 		if (action.equals(gitReceivePack)) {
 			// Push request
 			if (user.canPush(repository)) {
@@ -179,11 +179,11 @@
 		}
 		return true;
 	}
-	
+
 	/**
 	 * An authenticated user with the CREATE role can create a repository on
 	 * push.
-	 * 
+	 *
 	 * @param user
 	 * @param repository
 	 * @param action
@@ -203,7 +203,7 @@
 				if (repository.contains("/../")) {
 					logger.error(MessageFormat.format("Illegal relative path in repository name! {0}", repository));
 					return null;
-				}					
+				}
 
 				// confirm valid characters in repository name
 				Character c = StringUtils.findInvalidCharacter(repository);
@@ -239,7 +239,7 @@
 				logger.warn(MessageFormat.format("{0} is not permitted to create repository {1} ON-PUSH!", user.username, repository));
 			}
 		}
-		
+
 		// repository could not be created or action was not a push
 		return null;
 	}

--
Gitblit v1.9.1