From 12edbdc409ae0ea5b24a732c191555cbc22f1fca Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 21 Jan 2005 14:03:46 +0000 Subject: [PATCH] checkstyle - space around operators git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277410 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/repository/Libraries.java | 19 ++++++++++--------- .../taskdefs/repository/MavenRepository.java | 8 ++++---- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java b/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java index 7059b0df6..b39ff61be 100644 --- a/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java +++ b/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java @@ -99,13 +99,13 @@ public final class Libraries extends Task { * where maven stores stuff, and where we save stuff too, unless * declared otherwise. */ - public static final String MAVEN_LOCATION=".maven/repository"; + public static final String MAVEN_LOCATION = ".maven/repository"; /** * name of the property which can provide an override of the repository dir * from {@link #MAVEN_LOCATION} */ - public static final String REPOSITORY_DIR_PROPERTY="ant.maven.repository.dir"; + public static final String REPOSITORY_DIR_PROPERTY = "ant.maven.repository.dir"; /** * name of the property which can provide an override of the repository URL */ @@ -134,8 +134,8 @@ public final class Libraries extends Task { File mavenDir = new File(System.getProperty("user.home"), MAVEN_LOCATION); String propertyDir = getProject().getProperty(REPOSITORY_DIR_PROPERTY); - if(propertyDir!=null) { - mavenDir=getProject().resolveFile(propertyDir); + if (propertyDir != null) { + mavenDir = getProject().resolveFile(propertyDir); } return mavenDir; } @@ -359,11 +359,12 @@ public final class Libraries extends Task { */ public void validate() { if (destDir == null) { - destDir=locateDefaultDestDirectory(); + destDir = locateDefaultDestDirectory(); } if (repository == null) { - MavenRepository maven=(MavenRepository)getProject().createDataType(MavenRepository.TYPE_NAME); - repository=maven; + MavenRepository maven = + (MavenRepository) getProject().createDataType(MavenRepository.TYPE_NAME); + repository = maven; } Iterator it = libraries.iterator(); while (it.hasNext()) { @@ -433,7 +434,7 @@ public final class Libraries extends Task { if (isOffline()) { log("No retrieval, task is \"offline\""); - retrieve=false; + retrieve = false; } //see if we need to do a download @@ -568,7 +569,7 @@ public final class Libraries extends Task { Library library = (Library) it.next(); if (library.isToFetch()) { count++; - }; + } } return count; } diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java b/src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java index d88e93f09..f50ef2fae 100644 --- a/src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java +++ b/src/main/org/apache/tools/ant/taskdefs/repository/MavenRepository.java @@ -74,12 +74,12 @@ public class MavenRepository extends HttpRepository { * @throws BuildException if unhappy */ public void validate() { - if(getUrl()==null) { + if (getUrl() == null) { //we have no URL yet; so use the maven one - if(getProject()!=null) { - String urlProperty=getProject() + if (getProject() != null) { + String urlProperty = getProject() .getProperty(Libraries.REPOSITORY_URL_PROPERTY); - if(urlProperty!=null) { + if (urlProperty != null) { setUrl(urlProperty); } else { setUrl(MAVEN_URL);