mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
Upgrade to JDK7.
This commit is contained in:
parent
b939f910f9
commit
dba7531177
@ -6,7 +6,7 @@ import java.util.Collection;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.pmease.commons.util.EasySet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.pmease.commons.util.FileUtils;
|
||||
|
||||
public class ListChangedFilesCommandTest extends GitCommandTest {
|
||||
@ -37,7 +37,7 @@ public class ListChangedFilesCommandTest extends GitCommandTest {
|
||||
|
||||
Collection<String> changedFiles = git.findChangedFiles().fromRev("HEAD~4").toRev("HEAD").call();
|
||||
|
||||
Assert.assertTrue(changedFiles.containsAll(EasySet.of("a", "b", "c", "d")));
|
||||
Assert.assertTrue(changedFiles.containsAll(Sets.newHashSet("a", "b", "c", "d")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,74 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>parent.general</artifactId>
|
||||
<groupId>com.pmease</groupId>
|
||||
<version>1.0.28</version>
|
||||
</parent>
|
||||
<artifactId>commons.jetty</artifactId>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.pmease</groupId>
|
||||
<artifactId>plugin.maven</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.pmease</groupId>
|
||||
<artifactId>commons.loader</artifactId>
|
||||
<version>1.0.29</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-websocket</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>pmeaseRepo</id>
|
||||
<name>PMEase Repository</name>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>never</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
<url>http://artifact.pmease.com/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<moduleClass>com.pmease.commons.jetty.JettyModule</moduleClass>
|
||||
<jettyVersion>8.1.10.v20130312</jettyVersion>
|
||||
</properties>
|
||||
<version>1.0.29</version>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>parent.general</artifactId>
|
||||
<groupId>com.pmease</groupId>
|
||||
<version>1.0.28</version>
|
||||
</parent>
|
||||
<artifactId>commons.jetty</artifactId>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.pmease</groupId>
|
||||
<artifactId>plugin.maven</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.pmease</groupId>
|
||||
<artifactId>commons.loader</artifactId>
|
||||
<version>1.0.29</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlets</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-websocket</artifactId>
|
||||
<version>${jettyVersion}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>pmeaseRepo</id>
|
||||
<name>PMEase Repository</name>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>never</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</snapshots>
|
||||
<url>http://artifact.pmease.com/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<moduleClass>com.pmease.commons.jetty.JettyModule</moduleClass>
|
||||
<jettyVersion>8.1.10.v20130312</jettyVersion>
|
||||
</properties>
|
||||
<version>1.0.29</version>
|
||||
</project>
|
||||
|
||||
@ -15,8 +15,8 @@ import org.apache.shiro.authz.Permission;
|
||||
import org.apache.shiro.realm.AuthorizingRealm;
|
||||
import org.apache.shiro.subject.PrincipalCollection;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.inject.Inject;
|
||||
import com.pmease.commons.util.EasySet;
|
||||
|
||||
public abstract class AbstractRealm extends AuthorizingRealm {
|
||||
|
||||
@ -44,7 +44,7 @@ public abstract class AbstractRealm extends AuthorizingRealm {
|
||||
|
||||
@Override
|
||||
public Collection<Permission> getObjectPermissions() {
|
||||
return EasySet.of((Permission)getUserById(userId));
|
||||
return Sets.newHashSet((Permission)getUserById(userId));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -34,26 +34,33 @@ public class ClassUtils extends org.apache.commons.lang3.ClassUtils {
|
||||
.getCodeSource().getLocation().getFile());
|
||||
if (location.isFile()) {
|
||||
String packagePath = packageLocator.getPackage().getName().replace('.', '/') + "/";
|
||||
JarFile jarFile;
|
||||
JarFile jarFile = null;
|
||||
try {
|
||||
jarFile = new JarFile(location);
|
||||
Enumeration<JarEntry> entries = jarFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
JarEntry entry = entries.nextElement();
|
||||
if (entry.getName().startsWith(packagePath) && entry.getName().endsWith(".class")) {
|
||||
String className = entry.getName().replace('/', '.');
|
||||
className = StringUtils.substringBeforeLast(className, ".");
|
||||
Class<T> clazz;
|
||||
try {
|
||||
clazz = (Class<T>) superClass.getClassLoader().loadClass(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (superClass.isAssignableFrom(clazz) && clazz != superClass)
|
||||
classes.add(clazz);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
Enumeration<JarEntry> entries = jarFile.entries();
|
||||
while (entries.hasMoreElements()) {
|
||||
JarEntry entry = entries.nextElement();
|
||||
if (entry.getName().startsWith(packagePath) && entry.getName().endsWith(".class")) {
|
||||
String className = entry.getName().replace('/', '.');
|
||||
className = StringUtils.substringBeforeLast(className, ".");
|
||||
Class<T> clazz;
|
||||
} finally {
|
||||
if (jarFile != null) {
|
||||
try {
|
||||
clazz = (Class<T>) superClass.getClassLoader().loadClass(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
jarFile.close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
if (superClass.isAssignableFrom(clazz) && clazz != superClass)
|
||||
classes.add(clazz);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
package com.pmease.commons.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EasyList {
|
||||
|
||||
public static <T> List<T> of(T...objects) {
|
||||
List<T> list = new ArrayList<T>();
|
||||
for (int i=0; i<objects.length; i++)
|
||||
list.add(objects[i]);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
package com.pmease.commons.util;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class EasySet {
|
||||
|
||||
public static <T> Set<T> of(T...objects) {
|
||||
Set<T> set = new HashSet<T>();
|
||||
for (int i=0; i<objects.length; i++)
|
||||
set.add(objects[i]);
|
||||
return set;
|
||||
}
|
||||
|
||||
}
|
||||
@ -9,6 +9,8 @@ import java.util.Collection;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public class PathUtilsTest {
|
||||
|
||||
@Test
|
||||
@ -23,15 +25,15 @@ public class PathUtilsTest {
|
||||
|
||||
@Test
|
||||
public void shouldMatchLongest() {
|
||||
Collection<String> basePaths = EasyList.of("/path1/path2", "/path1/path2/path3");
|
||||
Collection<String> basePaths = Lists.newArrayList("/path1/path2", "/path1/path2/path3");
|
||||
assertEquals(matchLongest(basePaths, "/path1/path2/path3/path4"), "/path1/path2/path3");
|
||||
assertNull(matchLongest(basePaths, "/path1/path23"));
|
||||
assertNull(matchLongest(basePaths, "/path1/path3"));
|
||||
|
||||
basePaths = EasyList.of("/path1/path2", "/path1\\");
|
||||
basePaths = Lists.newArrayList("/path1/path2", "/path1\\");
|
||||
assertEquals(matchLongest(basePaths, "path1\\path234"), "/path1\\");
|
||||
|
||||
basePaths = EasyList.of("/asset1/asset2", "/asset1");
|
||||
basePaths = Lists.newArrayList("/asset1/asset2", "/asset1");
|
||||
assertEquals(matchLongest(basePaths, "/asset1/asset2/test.html"), "/asset1/asset2");
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import org.apache.wicket.markup.head.HeaderItem;
|
||||
import org.apache.wicket.request.resource.CssResourceReference;
|
||||
import org.apache.wicket.request.resource.JavaScriptResourceReference;
|
||||
|
||||
import com.pmease.commons.util.EasyList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.pmease.commons.wicket.asset.bootstrap.BootstrapHeaderItem;
|
||||
|
||||
/**
|
||||
@ -31,7 +31,7 @@ public class CommonResourceReference extends JavaScriptResourceReference {
|
||||
|
||||
@Override
|
||||
public Iterable<? extends HeaderItem> getDependencies() {
|
||||
return EasyList.of(
|
||||
return Lists.newArrayList(
|
||||
BootstrapHeaderItem.get(),
|
||||
CssHeaderItem.forReference(new CssResourceReference(CommonResourceReference.class, "common.css")));
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import org.apache.wicket.markup.head.HeaderItem;
|
||||
import org.apache.wicket.request.resource.CssResourceReference;
|
||||
import org.apache.wicket.request.resource.JavaScriptResourceReference;
|
||||
|
||||
import com.pmease.commons.util.EasyList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.pmease.commons.wicket.asset.JQueryHeaderItem;
|
||||
|
||||
public class BootstrapResourceReference extends JavaScriptResourceReference {
|
||||
@ -28,6 +28,6 @@ public class BootstrapResourceReference extends JavaScriptResourceReference {
|
||||
HeaderItem stylesheet = CssHeaderItem.forReference(
|
||||
new CssResourceReference(BootstrapResourceReference.class, "css/bootstrap.css"));
|
||||
|
||||
return EasyList.of(jquery, stylesheet);
|
||||
return Lists.newArrayList(jquery, stylesheet);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
package com.pmease.commons.wicket.component.tabbable;
|
||||
|
||||
import org.apache.wicket.Page;
|
||||
import org.apache.wicket.markup.html.list.ListItem;
|
||||
import org.apache.wicket.model.IModel;
|
||||
|
||||
@ -12,9 +11,9 @@ public class PageTab implements Tab {
|
||||
|
||||
private final IModel<String> titleModel;
|
||||
|
||||
private final Class<? extends Page>[] pageClasses;
|
||||
private final Class<?>[] pageClasses;
|
||||
|
||||
public PageTab(IModel<String> titleModel, Class<? extends Page>...pageClasses) {
|
||||
public PageTab(IModel<String> titleModel, Class<?>...pageClasses) {
|
||||
Preconditions.checkArgument(pageClasses.length > 0, "At least one page class has to be provided.");
|
||||
|
||||
this.titleModel = titleModel;
|
||||
@ -25,7 +24,7 @@ public class PageTab implements Tab {
|
||||
return titleModel;
|
||||
}
|
||||
|
||||
protected final Class<? extends Page>[] getPageClasses() {
|
||||
protected final Class<?>[] getPageClasses() {
|
||||
return pageClasses;
|
||||
}
|
||||
|
||||
@ -44,7 +43,7 @@ public class PageTab implements Tab {
|
||||
|
||||
@Override
|
||||
public boolean isActive(ListItem<Tab> item) {
|
||||
for (Class<? extends Page> pageClass: pageClasses) {
|
||||
for (Class<?> pageClass: pageClasses) {
|
||||
if (pageClass.isAssignableFrom(item.getPage().getClass()))
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -10,10 +10,11 @@ public class PageTabComponent extends Panel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public PageTabComponent(String id, PageTab tab) {
|
||||
super(id);
|
||||
|
||||
Link<?> pageLink = newLink("link", tab.getPageClasses()[0]);
|
||||
Link<?> pageLink = newLink("link", (Class<? extends Page>) tab.getPageClasses()[0]);
|
||||
add(pageLink);
|
||||
pageLink.add(new Label("label", tab.getTitleModel()));
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import org.apache.wicket.markup.head.HeaderItem;
|
||||
import org.apache.wicket.request.resource.CssResourceReference;
|
||||
import org.apache.wicket.request.resource.JavaScriptResourceReference;
|
||||
|
||||
import com.pmease.commons.util.EasyList;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.pmease.commons.wicket.asset.bootstrap.BootstrapHeaderItem;
|
||||
|
||||
public class EditableResourceReference extends JavaScriptResourceReference {
|
||||
@ -24,7 +24,7 @@ public class EditableResourceReference extends JavaScriptResourceReference {
|
||||
|
||||
@Override
|
||||
public Iterable<? extends HeaderItem> getDependencies() {
|
||||
return EasyList.of(
|
||||
return Lists.newArrayList(
|
||||
BootstrapHeaderItem.get(),
|
||||
CssHeaderItem.forReference(new CssResourceReference(EditableResourceReference.class, "editable.css")));
|
||||
}
|
||||
|
||||
@ -8,9 +8,9 @@ import org.apache.wicket.markup.html.basic.Label;
|
||||
import org.apache.wicket.markup.html.form.DropDownChoice;
|
||||
import org.apache.wicket.model.IModel;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.pmease.commons.editable.EditContext;
|
||||
import com.pmease.commons.editable.PropertyEditContext;
|
||||
import com.pmease.commons.util.EasyList;
|
||||
import com.pmease.commons.wicket.editable.EditableResourceBehavior;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@ -48,7 +48,7 @@ public class NullableBooleanPropertyEditContext extends PropertyEditContext {
|
||||
setPropertyValue(null);
|
||||
}
|
||||
|
||||
}, EasyList.of("yes", "no")) {
|
||||
}, Lists.newArrayList("yes", "no")) {
|
||||
|
||||
@Override
|
||||
protected void onComponentTag(ComponentTag tag) {
|
||||
|
||||
@ -17,7 +17,6 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.pmease.commons.git.Git;
|
||||
import com.pmease.gitop.core.manager.RepositoryManager;
|
||||
import com.pmease.gitop.core.manager.UserManager;
|
||||
import com.pmease.gitop.core.model.Repository;
|
||||
|
||||
@Singleton
|
||||
@ -31,16 +30,18 @@ public class GitServlet extends HttpServlet {
|
||||
private final RepositoryManager repositoryManager;
|
||||
|
||||
@Inject
|
||||
public GitServlet(UserManager userManager, RepositoryManager repositoryManager) {
|
||||
public GitServlet(RepositoryManager repositoryManager) {
|
||||
this.repositoryManager = repositoryManager;
|
||||
}
|
||||
|
||||
private Repository getRepository(HttpServletResponse response, String repoInfo) throws IOException {
|
||||
private Repository getRepository(HttpServletRequest request, HttpServletResponse response, String repoInfo) throws IOException {
|
||||
String ownerName = StringUtils.substringBefore(repoInfo, "/");
|
||||
String repositoryName = StringUtils.substringAfter(repoInfo, "/");
|
||||
|
||||
if (StringUtils.isBlank(ownerName) || StringUtils.isBlank(repositoryName)) {
|
||||
String message = "Expecting url of format http(s)://<server>:<port>/<owner name>/<repository name>";
|
||||
String urlRoot = StringUtils.substringBeforeLast(request.getRequestURL().toString(), "?");
|
||||
urlRoot = StringUtils.substringBeforeLast(urlRoot, "/");
|
||||
String message = "Expecting url of format " + urlRoot + "/<owner name>/<repository name>";
|
||||
logger.error("Error serving git request: " + message);
|
||||
response.sendError(HttpServletResponse.SC_BAD_REQUEST, message);
|
||||
return null;
|
||||
@ -69,7 +70,7 @@ public class GitServlet extends HttpServlet {
|
||||
String service = StringUtils.substringAfterLast(pathInfo, "/");
|
||||
|
||||
String repoInfo = StringUtils.substringBeforeLast(pathInfo, "/");
|
||||
Repository repository = getRepository(resp, repoInfo);
|
||||
Repository repository = getRepository(req, resp, repoInfo);
|
||||
|
||||
if (repository != null) {
|
||||
doNotCache(resp);
|
||||
@ -106,7 +107,7 @@ public class GitServlet extends HttpServlet {
|
||||
}
|
||||
|
||||
String repoInfo = pathInfo.substring(0, pathInfo.length() - INFO_REFS.length());
|
||||
Repository repository = getRepository(resp, repoInfo);
|
||||
Repository repository = getRepository(req, resp, repoInfo);
|
||||
if (repository != null) {
|
||||
doNotCache(resp);
|
||||
String service = req.getParameter("service");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package com.pmease.gitop.core.gatekeeper;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.pmease.commons.editable.annotation.Editable;
|
||||
import com.pmease.commons.util.EasySet;
|
||||
import com.pmease.gitop.core.model.MergeRequest;
|
||||
import com.pmease.gitop.core.model.User;
|
||||
import com.pmease.gitop.core.model.Vote;
|
||||
@ -17,7 +17,7 @@ public class ApprovedByRepositoryOwner extends AbstractGateKeeper {
|
||||
Vote.Result result = repositoryOwner.checkVoteSince(request.getBaseUpdate());
|
||||
|
||||
if (result == null) {
|
||||
request.inviteToVote(EasySet.of(repositoryOwner), 1);
|
||||
request.inviteToVote(Sets.newHashSet(repositoryOwner), 1);
|
||||
return pending("To be approved by user '" + repositoryOwner.getName() + "'.");
|
||||
} else if (result.isAccept()) {
|
||||
return accept("Approved by user '" + repositoryOwner.getName() + "'.");
|
||||
|
||||
@ -2,9 +2,9 @@ package com.pmease.gitop.core.gatekeeper;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.pmease.commons.editable.annotation.Editable;
|
||||
import com.pmease.commons.loader.AppLoader;
|
||||
import com.pmease.commons.util.EasySet;
|
||||
import com.pmease.gitop.core.manager.UserManager;
|
||||
import com.pmease.gitop.core.model.MergeRequest;
|
||||
import com.pmease.gitop.core.model.User;
|
||||
@ -33,7 +33,7 @@ public class ApprovedBySpecifiedUser extends AbstractGateKeeper {
|
||||
|
||||
Vote.Result result = user.checkVoteSince(request.getBaseUpdate());
|
||||
if (result == null) {
|
||||
request.inviteToVote(EasySet.of(user), 1);
|
||||
request.inviteToVote(Sets.newHashSet(user), 1);
|
||||
return pending("To be approved by user '" + user.getName() + "'.");
|
||||
} else if (result.isAccept()) {
|
||||
return accept("Approved by user '" + user.getName() + "'.");
|
||||
|
||||
@ -2,7 +2,7 @@ package com.pmease.gitop.core.gatekeeper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.pmease.commons.util.EasyList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
public abstract class CheckResult {
|
||||
|
||||
@ -13,7 +13,7 @@ public abstract class CheckResult {
|
||||
}
|
||||
|
||||
public CheckResult(String reason) {
|
||||
this.reasons = EasyList.of(reason);
|
||||
this.reasons = Lists.newArrayList(reason);
|
||||
}
|
||||
|
||||
public List<String> getReasons() {
|
||||
|
||||
@ -93,8 +93,8 @@
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@ -40,8 +40,8 @@
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user