Yi EungJun 2015-02-24
Organize imports of classes in models package
@9925b83b26d1aa22a1465053d03229611432afa2
app/models/AbstractPosting.java
--- app/models/AbstractPosting.java
+++ app/models/AbstractPosting.java
@@ -23,11 +23,11 @@
 import models.enumeration.ResourceType;
 import models.resource.Resource;
 import models.resource.ResourceConvertible;
-
 import org.joda.time.Duration;
 import play.data.format.Formats;
 import play.data.validation.Constraints;
-import play.db.ebean.*;
+import play.db.ebean.Model;
+import play.db.ebean.Transactional;
 import utils.JodaDateUtil;
 
 import javax.persistence.*;
app/models/Assignee.java
--- app/models/Assignee.java
+++ app/models/Assignee.java
@@ -20,16 +20,14 @@
  */
 package models;
 
-import java.util.Set;
+import play.data.validation.Constraints.Required;
+import play.db.ebean.Model;
 
-import javax.persistence.CascadeType;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
-
-import play.data.validation.Constraints.Required;
-import play.db.ebean.Model;
+import java.util.Set;
 
 @Entity
 public class Assignee extends Model {
app/models/Attachment.java
--- app/models/Attachment.java
+++ app/models/Attachment.java
@@ -20,7 +20,6 @@
  */
 package models;
 
-import utils.AttachmentCache;
 import controllers.AttachmentApp;
 import models.enumeration.ResourceType;
 import models.resource.GlobalResource;
@@ -33,6 +32,7 @@
 import play.db.ebean.Model;
 import play.libs.Akka;
 import scala.concurrent.duration.Duration;
+import utils.AttachmentCache;
 import utils.FileUtil;
 import utils.JodaDateUtil;
 
app/models/AuthInfo.java
--- app/models/AuthInfo.java
+++ app/models/AuthInfo.java
@@ -21,7 +21,6 @@
 package models;
 
 import play.data.validation.Constraints;
-import utils.ReservedWordsValidator;
 
 public class AuthInfo {
     @Constraints.Required
app/models/IssueEvent.java
--- app/models/IssueEvent.java
+++ app/models/IssueEvent.java
@@ -27,7 +27,9 @@
 import play.db.ebean.Model;
 
 import javax.persistence.*;
-import java.util.*;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
 import java.util.regex.Matcher;
 
 @Entity
app/models/IssueLabelCategory.java
--- app/models/IssueLabelCategory.java
+++ app/models/IssueLabelCategory.java
@@ -21,10 +21,10 @@
 package models;
 
 import models.enumeration.ResourceType;
-import play.db.ebean.Model;
 import models.resource.Resource;
 import models.resource.ResourceConvertible;
 import play.data.validation.Constraints.Required;
+import play.db.ebean.Model;
 
 import javax.persistence.*;
 import javax.validation.constraints.Size;
app/models/LabelOwner.java
--- app/models/LabelOwner.java
+++ app/models/LabelOwner.java
@@ -20,10 +20,10 @@
  */
 package models;
 
-import java.util.Set;
-
 import models.resource.ResourceConvertible;
 
+import java.util.Set;
+
 /**
  * @see models.resource.ResourceConvertible
  */
app/models/Milestone.java
--- app/models/Milestone.java
+++ app/models/Milestone.java
@@ -20,20 +20,24 @@
  */
 package models;
 
-import models.enumeration.*;
+import models.enumeration.Direction;
+import models.enumeration.Matching;
+import models.enumeration.ResourceType;
+import models.enumeration.State;
 import models.resource.Resource;
 import models.resource.ResourceConvertible;
-import models.support.*;
-
+import models.support.FinderTemplate;
+import models.support.OrderParams;
+import models.support.SearchParams;
 import org.apache.commons.lang3.time.DateUtils;
-import play.data.format.*;
-import play.data.validation.*;
-import play.db.ebean.*;
+import play.data.format.Formats;
+import play.data.validation.Constraints;
+import play.db.ebean.Model;
 import play.i18n.Messages;
 import utils.JodaDateUtil;
 
 import javax.persistence.*;
-import java.text.*;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 @Entity
app/models/NonRangedCodeCommentThread.java
--- app/models/NonRangedCodeCommentThread.java
+++ app/models/NonRangedCodeCommentThread.java
@@ -20,9 +20,10 @@
  */
 package models;
 
+import org.apache.commons.lang3.StringUtils;
+
 import javax.persistence.DiscriminatorValue;
 import javax.persistence.Entity;
-import org.apache.commons.lang3.StringUtils;
 
 /**
  * @author Keesun Baik
app/models/NotificationEvent.java
--- app/models/NotificationEvent.java
+++ app/models/NotificationEvent.java
@@ -20,7 +20,6 @@
  */
 package models;
 
-import com.avaje.ebean.RawSql;
 import com.avaje.ebean.RawSqlBuilder;
 import controllers.UserApp;
 import controllers.routes;
@@ -42,7 +41,6 @@
 import playRepository.*;
 import scala.concurrent.duration.Duration;
 import utils.AccessControl;
-import utils.Config;
 import utils.EventConstants;
 import utils.RouteUtil;
 
@@ -52,7 +50,10 @@
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
-import java.util.*;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
app/models/NotificationMail.java
--- app/models/NotificationMail.java
+++ app/models/NotificationMail.java
@@ -20,8 +20,8 @@
  */
 package models;
 
-import mailbox.EmailAddressWithDetail;
 import info.schleichardt.play2.mailplugin.Mailer;
+import mailbox.EmailAddressWithDetail;
 import models.enumeration.ResourceType;
 import models.enumeration.UserState;
 import models.resource.Resource;
@@ -43,11 +43,11 @@
 import utils.Markdown;
 import utils.Url;
 
+import javax.annotation.Nullable;
 import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-import javax.annotation.Nullable;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.OneToOne;
app/models/OrganizationUser.java
--- app/models/OrganizationUser.java
+++ app/models/OrganizationUser.java
@@ -20,14 +20,13 @@
  */
 package models;
 
-import java.util.List;
+import models.enumeration.RoleType;
+import play.db.ebean.Model;
 
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.ManyToOne;
-
-import models.enumeration.RoleType;
-import play.db.ebean.Model;
+import java.util.List;
 
 @Entity
 public class OrganizationUser extends Model {
app/models/PostingComment.java
--- app/models/PostingComment.java
+++ app/models/PostingComment.java
@@ -23,7 +23,8 @@
 import models.enumeration.ResourceType;
 import models.resource.Resource;
 
-import javax.persistence.*;
+import javax.persistence.Entity;
+import javax.persistence.ManyToOne;
 
 @Entity
 public class PostingComment extends Comment {
app/models/Project.java
--- app/models/Project.java
+++ app/models/Project.java
@@ -46,7 +46,10 @@
 import javax.persistence.*;
 import javax.servlet.ServletException;
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
 
 @Entity
 public class Project extends Model implements LabelOwner {
app/models/ProjectMenuSetting.java
--- app/models/ProjectMenuSetting.java
+++ app/models/ProjectMenuSetting.java
@@ -22,7 +22,9 @@
 
 import play.db.ebean.Model;
 
-import javax.persistence.*;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToOne;
 
 @Entity
 public class ProjectMenuSetting extends Model {
app/models/ProjectUser.java
--- app/models/ProjectUser.java
+++ app/models/ProjectUser.java
@@ -20,14 +20,15 @@
  */
 package models;
 
-import java.util.*;
+import models.enumeration.RoleType;
+import play.db.ebean.Model;
 
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.ManyToOne;
-
-import models.enumeration.RoleType;
-import play.db.ebean.Model;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 
 @Entity
 public class ProjectUser extends Model {
app/models/PullRequestCommit.java
--- app/models/PullRequestCommit.java
+++ app/models/PullRequestCommit.java
@@ -20,22 +20,12 @@
  */
 package models;
 
-import java.util.Date;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.Transient;
-
 import org.apache.commons.lang3.StringUtils;
 import play.db.ebean.Model;
 import playRepository.GitCommit;
 import utils.JodaDateUtil;
 
+import javax.annotation.Nonnull;
 import javax.persistence.*;
 import java.util.Date;
 import java.util.List;
app/models/PushedBranch.java
--- app/models/PushedBranch.java
+++ app/models/PushedBranch.java
@@ -20,19 +20,17 @@
  */
 package models;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.jgit.lib.Constants;
+import play.db.ebean.Model;
 
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.ManyToOne;
 import javax.persistence.Table;
-
-import org.apache.commons.lang.StringUtils;
-import org.eclipse.jgit.lib.Constants;
-
-import play.db.ebean.Model;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
 
 /**
  * @author Wansoon Park
app/models/Role.java
--- app/models/Role.java
+++ app/models/Role.java
@@ -20,16 +20,15 @@
  */
 package models;
 
-import java.util.ArrayList;
-import java.util.List;
+import models.enumeration.RoleType;
+import play.db.ebean.Model;
 
 import javax.persistence.CascadeType;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.OneToMany;
-
-import models.enumeration.RoleType;
-import play.db.ebean.Model;
+import java.util.ArrayList;
+import java.util.List;
 
 @Entity
 public class Role extends Model {
app/models/Search.java
--- app/models/Search.java
+++ app/models/Search.java
@@ -20,7 +20,10 @@
  */
 package models;
 
-import com.avaje.ebean.*;
+import com.avaje.ebean.Expr;
+import com.avaje.ebean.ExpressionList;
+import com.avaje.ebean.Junction;
+import com.avaje.ebean.Page;
 import models.enumeration.Operation;
 import models.enumeration.ProjectScope;
 import models.enumeration.UserState;
app/models/SimpleCommentThread.java
--- app/models/SimpleCommentThread.java
+++ app/models/SimpleCommentThread.java
@@ -23,8 +23,6 @@
 import javax.persistence.DiscriminatorValue;
 import javax.persistence.Entity;
 
-import play.db.ebean.Model.Finder;
-
 /**
  * @author Keesun Baik
  */
app/models/SiteAdmin.java
--- app/models/SiteAdmin.java
+++ app/models/SiteAdmin.java
@@ -20,15 +20,14 @@
  */
 package models;
 
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.OneToOne;
-
 import controllers.UserApp;
 import org.apache.shiro.crypto.RandomNumberGenerator;
 import org.apache.shiro.crypto.SecureRandomNumberGenerator;
 import play.db.ebean.Model;
 
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToOne;
 import java.util.Arrays;
 
 @Entity
app/models/Unwatch.java
--- app/models/Unwatch.java
+++ app/models/Unwatch.java
@@ -22,7 +22,7 @@
 
 import models.enumeration.ResourceType;
 
-import javax.persistence.*;
+import javax.persistence.Entity;
 import java.util.List;
 
 @Entity
app/models/User.java
--- app/models/User.java
+++ app/models/User.java
@@ -20,35 +20,33 @@
  */
 package models;
 
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import javax.persistence.*;
-import javax.persistence.OrderBy;
-import javax.persistence.criteria.Expression;
-
 import com.avaje.ebean.*;
 import controllers.UserApp;
-import models.enumeration.*;
+import models.enumeration.ResourceType;
+import models.enumeration.RoleType;
+import models.enumeration.UserState;
 import models.resource.GlobalResource;
 import models.resource.Resource;
 import models.resource.ResourceConvertible;
-
 import models.support.UserComparator;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.crypto.hash.Sha256Hash;
 import org.apache.shiro.util.ByteSource;
 import play.data.format.Formats;
 import play.data.validation.Constraints;
-import play.data.validation.Constraints.*;
+import play.data.validation.Constraints.Pattern;
+import play.data.validation.Constraints.Required;
+import play.data.validation.Constraints.ValidateWith;
 import play.db.ebean.Model;
 import play.db.ebean.Transactional;
-import scala.reflect.internal.Trees;
 import play.i18n.Messages;
 import utils.JodaDateUtil;
 import utils.ReservedWordsValidator;
 
-import static com.avaje.ebean.Expr.eq;
+import javax.persistence.*;
+import javax.persistence.OrderBy;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 @Table(name = "n4user")
 @Entity
app/models/Watch.java
--- app/models/Watch.java
+++ app/models/Watch.java
@@ -30,7 +30,7 @@
 import org.apache.commons.collections.Predicate;
 import utils.AccessControl;
 
-import javax.persistence.*;
+import javax.persistence.Entity;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
app/models/YobiUpdate.java
--- app/models/YobiUpdate.java
+++ app/models/YobiUpdate.java
@@ -23,18 +23,15 @@
 
 import com.github.zafarkhaja.semver.Version;
 import com.github.zafarkhaja.semver.util.UnexpectedElementTypeException;
-import com.typesafe.config.*;
 import org.eclipse.jgit.api.Git;
 import org.eclipse.jgit.api.errors.GitAPIException;
-import org.eclipse.jgit.api.errors.InvalidRemoteException;
 import org.eclipse.jgit.lib.Ref;
 import play.Configuration;
-import play.Logger;
 import play.libs.Akka;
 import scala.concurrent.duration.Duration;
 import utils.Config;
 
-import java.util.*;
+import java.util.Collection;
 import java.util.concurrent.TimeUnit;
 
 public class YobiUpdate {
app/models/enumeration/EventType.java
--- app/models/enumeration/EventType.java
+++ app/models/enumeration/EventType.java
@@ -22,7 +22,10 @@
 
 import play.i18n.Messages;
 
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
 
 public enum EventType {
 
app/models/resource/GlobalResource.java
--- app/models/resource/GlobalResource.java
+++ app/models/resource/GlobalResource.java
@@ -21,7 +21,6 @@
 package models.resource;
 
 import models.Project;
-import models.resource.Resource;
 
 abstract public class GlobalResource extends Resource {
     @Override
app/models/resource/ResourcePersistAdapter.java
--- app/models/resource/ResourcePersistAdapter.java
+++ app/models/resource/ResourcePersistAdapter.java
@@ -20,14 +20,13 @@
  */
 package models.resource;
 
-import models.Unwatch;
-import models.Watch;
-
 import com.avaje.ebean.EbeanServer;
 import com.avaje.ebean.Query;
 import com.avaje.ebean.Transaction;
 import com.avaje.ebean.event.BeanPersistAdapter;
 import com.avaje.ebean.event.BeanPersistRequest;
+import models.Unwatch;
+import models.Watch;
 
 /**
  * @see com.avaje.ebean.event.BeanPersistController
app/models/support/FinderTemplate.java
--- app/models/support/FinderTemplate.java
+++ app/models/support/FinderTemplate.java
@@ -20,11 +20,12 @@
  */
 package models.support;
 
-import com.avaje.ebean.*;
+import com.avaje.ebean.ExpressionList;
+import com.avaje.ebean.Page;
+import play.db.ebean.Model;
 
-import play.db.ebean.*;
-
-import java.util.*;
+import java.util.Collection;
+import java.util.List;
 
 public class FinderTemplate {
 
app/models/support/ModelLock.java
--- app/models/support/ModelLock.java
+++ app/models/support/ModelLock.java
@@ -20,12 +20,11 @@
  */
 package models.support;
 
-import java.util.Map;
-
 import com.google.common.collect.MapMaker;
-
 import play.db.ebean.Model;
 
+import java.util.Map;
+
 public class ModelLock<T extends Model> {
     private final Map<T, Object> locks = new MapMaker().weakValues().makeMap();
 
app/models/support/Options.java
--- app/models/support/Options.java
+++ app/models/support/Options.java
@@ -20,7 +20,7 @@
  */
 package models.support;
 
-import java.util.*;
+import java.util.LinkedHashMap;
 
 public class Options extends LinkedHashMap<String, String> {
     private static final long serialVersionUID = 1L;
app/models/support/OrderParam.java
--- app/models/support/OrderParam.java
+++ app/models/support/OrderParam.java
@@ -20,7 +20,7 @@
  */
 package models.support;
 
-import models.enumeration.*;
+import models.enumeration.Direction;
 
 public class OrderParam {
 
app/models/support/OrderParams.java
--- app/models/support/OrderParams.java
+++ app/models/support/OrderParams.java
@@ -20,9 +20,10 @@
  */
 package models.support;
 
-import models.enumeration.*;
+import models.enumeration.Direction;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 
 public class OrderParams {
app/models/support/SearchParam.java
--- app/models/support/SearchParam.java
+++ app/models/support/SearchParam.java
@@ -20,7 +20,7 @@
  */
 package models.support;
 
-import models.enumeration.*;
+import models.enumeration.Matching;
 
 public class SearchParam {
 
app/models/support/SearchParams.java
--- app/models/support/SearchParams.java
+++ app/models/support/SearchParams.java
@@ -20,9 +20,10 @@
  */
 package models.support;
 
-import models.enumeration.*;
+import models.enumeration.Matching;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 public class SearchParams {
 
app/utils/PlayServletRequest.java
--- app/utils/PlayServletRequest.java
+++ app/utils/PlayServletRequest.java
@@ -20,35 +20,6 @@
  */
 package utils;
 
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.Principal;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.AsyncContext;
-import javax.servlet.DispatcherType;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.Part;
-
 import org.tmatesoft.svn.core.internal.util.SVNEncodingUtil;
 import play.Play;
 import play.i18n.Lang;
@@ -56,6 +27,15 @@
 import play.mvc.Http.RawBuffer;
 import play.mvc.Http.Request;
 
+import javax.servlet.*;
+import javax.servlet.http.*;
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.Principal;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
 public class PlayServletRequest implements HttpServletRequest {
 
     private String characterEncoding;
Add a comment
List