From a41ce8eb7fe01263fcf3923005eb95937bed8b75 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Thu, 24 Nov 2005 16:04:44 +0000 Subject: [PATCH] apt fix. this should have gone in with the fork-only patch in march. also: pulled java1.5 only rule. because java1.6 is coming. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@348762 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Apt.java | 3 --- .../ant/taskdefs/compilers/AptExternalCompilerAdapter.java | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Apt.java b/src/main/org/apache/tools/ant/taskdefs/Apt.java index 453fd87bc..3867ae004 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Apt.java +++ b/src/main/org/apache/tools/ant/taskdefs/Apt.java @@ -259,9 +259,6 @@ public class Apt */ public void execute() throws BuildException { - if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_5)) { - throw new BuildException(ERROR_WRONG_JAVA_VERSION); - } super.execute(); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/AptExternalCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/compilers/AptExternalCompilerAdapter.java index b276a3545..d1ddaee0c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/AptExternalCompilerAdapter.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/AptExternalCompilerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2001-2004 The Apache Software Foundation + * Copyright 2001-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,13 +53,13 @@ public class AptExternalCompilerAdapter extends DefaultCompilerAdapter { cmd.setExecutable(apt.getAptExecutable()); setupModernJavacCommandlineSwitches(cmd); AptCompilerAdapter.setAptCommandlineSwitches(apt, cmd); - + int firstFileName = cmd.size(); //add the files logAndAddFilesToCompile(cmd); //run return 0 == executeExternalCompile(cmd.getCommandline(), - cmd.size(), + firstFileName, true); }