diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-23 06:43:19 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-23 06:43:19 +0000 |
commit | ebc6b76dcc0b09c2b6d3328a05023134c6094e01 (patch) | |
tree | eab2c62661bc9dbe2d72f41954e45525093de401 | |
parent | b79bd84a0cded52fd0b8e44c8b7dbab6616c6093 (diff) | |
download | archiva-ebc6b76dcc0b09c2b6d3328a05023134c6094e01.tar.gz archiva-ebc6b76dcc0b09c2b6d3328a05023134c6094e01.zip |
format code
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1174543 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTask.java | 104 |
1 files changed, 59 insertions, 45 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTask.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTask.java index 94f55bee7..7e1d170bd 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTask.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTask.java @@ -1,9 +1,9 @@ package org.apache.archiva.scheduler.repository; -import java.io.File; - import org.codehaus.plexus.taskqueue.Task; +import java.io.File; + /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -24,59 +24,22 @@ import org.codehaus.plexus.taskqueue.Task; */ /** - * DataRefreshTask - task for discovering changes in the repository - * and updating all associated data. + * DataRefreshTask - task for discovering changes in the repository + * and updating all associated data. * * @version $Id: DataRefreshTask.java 525176 2007-04-03 15:21:33Z joakime $ */ public class RepositoryTask implements Task { - @Override - public int hashCode() - { - final int prime = 31; - int result = 1; - result = prime * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() ); - result = prime * result + ( ( resourceFile == null ) ? 0 : resourceFile.hashCode() ); - return result; - } - - @Override - public boolean equals( Object obj ) - { - if ( this == obj ) - return true; - if ( obj == null ) - return false; - if ( getClass() != obj.getClass() ) - return false; - RepositoryTask other = (RepositoryTask) obj; - if ( repositoryId == null ) - { - if ( other.repositoryId != null ) - return false; - } - else if ( !repositoryId.equals( other.repositoryId ) ) - return false; - if ( resourceFile == null ) - { - if ( other.resourceFile != null ) - return false; - } - else if ( !resourceFile.equals( other.resourceFile ) ) - return false; - return true; - } - private String repositoryId; - + private File resourceFile; - + private boolean updateRelatedArtifacts; - + private boolean scanAll; - + public boolean isScanAll() { return scanAll; @@ -128,4 +91,55 @@ public class RepositoryTask return "RepositoryTask [repositoryId=" + repositoryId + ", resourceFile=" + resourceFile + ", scanAll=" + scanAll + ", updateRelatedArtifacts=" + updateRelatedArtifacts + "]"; } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() ); + result = prime * result + ( ( resourceFile == null ) ? 0 : resourceFile.hashCode() ); + return result; + } + + @Override + public boolean equals( Object obj ) + { + if ( this == obj ) + { + return true; + } + if ( obj == null ) + { + return false; + } + if ( getClass() != obj.getClass() ) + { + return false; + } + RepositoryTask other = (RepositoryTask) obj; + if ( repositoryId == null ) + { + if ( other.repositoryId != null ) + { + return false; + } + } + else if ( !repositoryId.equals( other.repositoryId ) ) + { + return false; + } + if ( resourceFile == null ) + { + if ( other.resourceFile != null ) + { + return false; + } + } + else if ( !resourceFile.equals( other.resourceFile ) ) + { + return false; + } + return true; + } } |