Index: TaskLogger.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/util/TaskLogger.java,v retrieving revision 1.9 diff -u -r1.9 TaskLogger.java --- TaskLogger.java 9 Mar 2004 16:48:52 -0000 1.9 +++ TaskLogger.java 17 Dec 2004 06:42:03 -0000 @@ -20,37 +20,60 @@ import org.apache.tools.ant.Task; /** - * A facade that makes logging nicers to use. - * + * A facade that makes logging nicer to use. * @version $Revision: 1.9 $ $Date: 2004/03/09 16:48:52 $ */ public final class TaskLogger { /** * Task to use to do logging. */ - private Task m_task; + private Task task; + /** + * Constructor for the TaskLogger + * @param task the task + */ public TaskLogger(final Task task) { - this.m_task = task; + this.task = task; } + /** + * Log a message with <code>MSG_INFO</code> priority + * @param message the message to log + */ public void info(final String message) { - m_task.log(message, Project.MSG_INFO); + task.log(message, Project.MSG_INFO); } + /** + * Log a message with <code>MSG_ERR</code> priority + * @param message the message to log + */ public void error(final String message) { - m_task.log(message, Project.MSG_ERR); + task.log(message, Project.MSG_ERR); } + /** + * Log a message with <code>MSG_WARN</code> priority + * @param message the message to log + */ public void warning(final String message) { - m_task.log(message, Project.MSG_WARN); + task.log(message, Project.MSG_WARN); } + /** + * Log a message with <code>MSG_VERBOSE</code> priority + * @param message the message to log + */ public void verbose(final String message) { - m_task.log(message, Project.MSG_VERBOSE); + task.log(message, Project.MSG_VERBOSE); } + /** + * Log a message with <code>MSG_DEBUG</code> priority + * @param message the message to log + */ public void debug(final String message) { - m_task.log(message, Project.MSG_DEBUG); + task.log(message, Project.MSG_DEBUG); } } Index: JavaVersionTest.java =================================================================== RCS file: JavaVersionTest.java diff -N JavaVersionTest.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ JavaVersionTest.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,60 @@ +/* + * Created on 16-Dec-2004 + * + */ +package org.apache.tools.ant.util; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * @author it-kevin + */ +public class JavaVersionTest extends TestCase { + + /* + * @see TestCase#setUp() + */ + protected void setUp() throws Exception { + super.setUp(); + } + + /* + * @see TestCase#tearDown() + */ + protected void tearDown() throws Exception { + super.tearDown(); + } + + /** + * Constructor for JavaVersionTest. + * @param name + */ + public JavaVersionTest(String name) { + super(name); + } + + public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(new JavaVersionTest("testVersionJDK14")); + return suite; + } + + public void testVersionJDK14() { + try { + boolean version = false; + if ((!JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_2)) + && (!JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_3)) + && (!JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_1)) + && (!JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_0))) { + version = true; + } + assertTrue(version); + System.out.println(System.getProperty("java.version")); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } +}
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]