Author: olamy
Date: Tue Sep 13 12:02:36 2011
New Revision: 1170131

URL: http://svn.apache.org/viewvc?rev=1170131&view=rev
Log:
format cleanup : no code change

Modified:
    
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java

Modified: 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java?rev=1170131&r1=1170130&r2=1170131&view=diff
==============================================================================
--- 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
 (original)
+++ 
archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/Artifact.java
 Tue Sep 13 12:02:36 2011
@@ -40,74 +40,16 @@ public class Artifact
 
     public Artifact()
     {
-
-    }
-
-    @Override
-    public boolean equals( Object o )
-    {
-        if ( this == o )
-        {
-            return true;
-        }
-        if ( o == null || getClass() != o.getClass() )
-        {
-            return false;
-        }
-
-        Artifact artifact = (Artifact) o;
-
-        if ( !artifactId.equals( artifact.artifactId ) )
-        {
-            return false;
-        }
-        if ( !groupId.equals( artifact.groupId ) )
-        {
-            return false;
-        }
-        if ( !repositoryId.equals( artifact.repositoryId ) )
-        {
-            return false;
-        }
-        if ( type != null ? !type.equals( artifact.type ) : artifact.type != 
null )
-        {
-            return false;
-        }
-        if ( !version.equals( artifact.version ) )
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode()
-    {
-        int result = repositoryId.hashCode();
-        result = 31 * result + groupId.hashCode();
-        result = 31 * result + artifactId.hashCode();
-        result = 31 * result + version.hashCode();
-        result = 31 * result + ( type != null ? type.hashCode() : 0 );
-        return result;
-    }
-
-    @Override
-    public String toString()
-    {
-        return "Artifact{" + "repositoryId='" + repositoryId + '\'' + ", 
groupId='" + groupId + '\'' + ", artifactId='"
-            + artifactId + '\'' + ", version='" + version + '\'' + ", type='" 
+ type + '\'' + '}';
+        // no op
     }
 
     public Artifact( String repositoryId, String groupId, String artifactId, 
String version, String type )
-//                     String type, Date whenGathered )
     {
         this.repositoryId = repositoryId;
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.version = version;
         this.type = type;
-        //this.whenGathered = whenGathered;
     }
 
     public String getGroupId()
@@ -135,11 +77,6 @@ public class Artifact
         return repositoryId;
     }
 
-    /*public Date getWhenGathered()
-    {
-        return whenGathered;
-    }*/
-
     public void setGroupId( String groupId )
     {
         this.groupId = groupId;
@@ -165,9 +102,67 @@ public class Artifact
         this.repositoryId = repositoryId;
     }
 
-    /*@ServiceBeanField( "whenGathered" )
-    public void setWhenGathered( Date whenGathered )
+    @Override
+    public boolean equals( Object o )
     {
-        this.whenGathered = whenGathered;
-    }*/
+        if ( this == o )
+        {
+            return true;
+        }
+        if ( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+
+        Artifact artifact = (Artifact) o;
+
+        if ( !artifactId.equals( artifact.artifactId ) )
+        {
+            return false;
+        }
+        if ( !groupId.equals( artifact.groupId ) )
+        {
+            return false;
+        }
+        if ( !repositoryId.equals( artifact.repositoryId ) )
+        {
+            return false;
+        }
+        if ( type != null ? !type.equals( artifact.type ) : artifact.type != 
null )
+        {
+            return false;
+        }
+        if ( !version.equals( artifact.version ) )
+        {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode()
+    {
+        int result = repositoryId.hashCode();
+        result = 31 * result + groupId.hashCode();
+        result = 31 * result + artifactId.hashCode();
+        result = 31 * result + version.hashCode();
+        result = 31 * result + ( type != null ? type.hashCode() : 0 );
+        return result;
+    }
+
+    @Override
+    public String toString()
+    {
+        final StringBuilder sb = new StringBuilder();
+        sb.append( "Artifact" );
+        sb.append( "{repositoryId='" ).append( repositoryId ).append( '\'' );
+        sb.append( ", groupId='" ).append( groupId ).append( '\'' );
+        sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
+        sb.append( ", version='" ).append( version ).append( '\'' );
+        sb.append( ", type='" ).append( type ).append( '\'' );
+        sb.append( '}' );
+        return sb.toString();
+    }
+
 }


Reply via email to