diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-01 21:07:19 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-01 21:07:19 +0000 |
commit | eca9e1bc2cea58b31341d7f6dc5d12515a4b8bf9 (patch) | |
tree | 04f0adf0aeabf008d15c2208c71119e4f16fb8cb /sonar-server | |
parent | 1cf4319b8274779de77de0eb9fed740a7623e7fb (diff) | |
download | sonarqube-eca9e1bc2cea58b31341d7f6dc5d12515a4b8bf9.tar.gz sonarqube-eca9e1bc2cea58b31341d7f6dc5d12515a4b8bf9.zip |
add some missing license headers
Diffstat (limited to 'sonar-server')
3 files changed, 26 insertions, 9 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java b/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java index 73f66de5618..d76f3dcfa7d 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/PluginClassLoaders.java @@ -19,6 +19,7 @@ */ package org.sonar.server.plugins; +import com.google.common.collect.Lists; import org.apache.commons.lang.StringUtils; import org.slf4j.LoggerFactory; import org.sonar.api.ServerComponent; @@ -27,7 +28,6 @@ import org.sonar.core.classloaders.ClassLoadersCollection; import java.io.File; import java.net.MalformedURLException; import java.net.URL; -import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -41,7 +41,7 @@ public class PluginClassLoaders implements ServerComponent { ClassLoader create(String pluginKey, Collection<File> classloaderFiles, boolean useChildFirstClassLoader) { try { - List<URL> urls = new ArrayList<URL>(); + List<URL> urls = Lists.newArrayList(); for (File file : classloaderFiles) { urls.add(toUrl(file)); } @@ -59,10 +59,10 @@ public class PluginClassLoaders implements ServerComponent { // Otherwise the constituent will be treated as a JAR file. URL url = file.toURI().toURL(); if (file.isDirectory()) { - if ( !url.toString().endsWith("/")) { + if (!url.toString().endsWith("/")) { url = new URL(url.toString() + "/"); } - } else if ( !StringUtils.endsWithIgnoreCase(file.getName(), "jar")) { + } else if (!StringUtils.endsWithIgnoreCase(file.getName(), "jar")) { url = file.getParentFile().toURI().toURL(); } return url; diff --git a/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java b/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java index c86cc6b64f9..982ea7e2124 100644 --- a/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java +++ b/sonar-server/src/main/java/org/sonar/server/plugins/StaticResourcesServlet.java @@ -1,3 +1,22 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2009 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ package org.sonar.server.plugins; import org.apache.commons.io.IOUtils; @@ -6,14 +25,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.server.platform.Platform; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; public class StaticResourcesServlet extends HttpServlet { diff --git a/sonar-server/src/main/java/org/sonar/server/ui/Views.java b/sonar-server/src/main/java/org/sonar/server/ui/Views.java index 6addb165827..de6a55fe980 100644 --- a/sonar-server/src/main/java/org/sonar/server/ui/Views.java +++ b/sonar-server/src/main/java/org/sonar/server/ui/Views.java @@ -19,7 +19,6 @@ */ package org.sonar.server.ui; -import com.google.common.collect.Lists; import org.apache.commons.lang.ArrayUtils; import org.sonar.api.ServerComponent; import org.sonar.api.web.Page; |