summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/authority/Launcher.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 09:30:04 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 10:11:28 -0400
commit699e71e76b15081baf746c6ce9c9144f7e5f1ff9 (patch)
tree4a9ea25c258caeae3dea4bc1de809f47bc615d81 /src/main/java/com/gitblit/authority/Launcher.java
parent235ad956fa84cad4fac1b2e69a0c9e4f50376ea3 (diff)
downloadgitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.tar.gz
gitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.zip
Trim trailing whitespace and organize imports
Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
Diffstat (limited to 'src/main/java/com/gitblit/authority/Launcher.java')
-rw-r--r--src/main/java/com/gitblit/authority/Launcher.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/com/gitblit/authority/Launcher.java b/src/main/java/com/gitblit/authority/Launcher.java
index 1da97149..bffeb68e 100644
--- a/src/main/java/com/gitblit/authority/Launcher.java
+++ b/src/main/java/com/gitblit/authority/Launcher.java
@@ -37,9 +37,9 @@ import com.gitblit.client.Translation;
/**
* Downloads dependencies and launches Gitblit Authority.
- *
+ *
* @author James Moger
- *
+ *
*/
public class Launcher {
@@ -53,10 +53,10 @@ public class Launcher {
public static void main(String[] args) {
final SplashScreen splash = SplashScreen.getSplashScreen();
-
+
File libFolder = new File("ext");
List<File> jars = findJars(libFolder.getAbsoluteFile());
-
+
// sort the jars by name and then reverse the order so the newer version
// of the library gets loaded in the event that this is an upgrade
Collections.sort(jars);
@@ -69,7 +69,7 @@ public class Launcher {
}
}
-
+
updateSplash(splash, Translation.get("gb.starting") + " Gitblit Authority...");
GitblitAuthority.main(args);
}
@@ -80,12 +80,13 @@ public class Launcher {
}
try {
EventQueue.invokeAndWait(new Runnable() {
+ @Override
public void run() {
Graphics2D g = splash.createGraphics();
if (g != null) {
// Splash is 320x120
FontMetrics fm = g.getFontMetrics();
-
+
// paint startup status
g.setColor(Color.darkGray);
int h = fm.getHeight() + fm.getMaxDescent();
@@ -98,7 +99,7 @@ public class Launcher {
g.setColor(Color.WHITE);
int xw = fm.stringWidth(string);
g.drawString(string, x + ((w - xw) / 2), y - 5);
-
+
// paint version
String ver = "v" + Constants.getVersion();
int vw = g.getFontMetrics().stringWidth(ver);
@@ -112,7 +113,7 @@ public class Launcher {
t.printStackTrace();
}
}
-
+
public static List<File> findJars(File folder) {
List<File> jars = new ArrayList<File>();
if (folder.exists()) {
@@ -137,7 +138,7 @@ public class Launcher {
/**
* Adds a file to the classpath
- *
+ *
* @param f
* the file to be added
* @throws IOException