git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@374482 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -4,6 +4,9 @@ Changes from current Ant 1.6.5 version to current RCS version | |||||
| Changes that could break older environments: | Changes that could break older environments: | ||||
| -------------------------------------------- | -------------------------------------------- | ||||
| * Task will now log correctly even if no project is set. | |||||
| Bugzilla report 38458. | |||||
| * Use alternative names for the command line arguments in javac. Bugzilla | * Use alternative names for the command line arguments in javac. Bugzilla | ||||
| Report 37546. | Report 37546. | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2001-2004 The Apache Software Foundation | |||||
| * Copyright 2001-2004,2006 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -75,8 +75,8 @@ public abstract class ProjectComponent { | |||||
| * to be logged. | * to be logged. | ||||
| */ | */ | ||||
| public void log(String msg, int msgLevel) { | public void log(String msg, int msgLevel) { | ||||
| if (project != null) { | |||||
| project.log(msg, msgLevel); | |||||
| if (getProject() != null) { | |||||
| getProject().log(msg, msgLevel); | |||||
| } else { | } else { | ||||
| // 'reasonable' default, if the component is used without | // 'reasonable' default, if the component is used without | ||||
| // a Project ( for example as a standalone Bean ). | // a Project ( for example as a standalone Bean ). | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2000-2005 The Apache Software Foundation | |||||
| * Copyright 2000-2006 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -335,18 +335,6 @@ public abstract class Task extends ProjectComponent { | |||||
| log(msg, Project.MSG_INFO); | log(msg, Project.MSG_INFO); | ||||
| } | } | ||||
| /** | |||||
| * Logs a message with the given priority. This delegates | |||||
| * the actual logging to the project. | |||||
| * | |||||
| * @param msg The message to be logged. Should not be <code>null</code>. | |||||
| * @param msgLevel The message priority at which this message is to | |||||
| * be logged. | |||||
| */ | |||||
| public void log(String msg, int msgLevel) { | |||||
| getProject().log(this, msg, msgLevel); | |||||
| } | |||||
| /** | /** | ||||
| * Performs this task if it's still valid, or gets a replacement | * Performs this task if it's still valid, or gets a replacement | ||||
| * version and performs that otherwise. | * version and performs that otherwise. | ||||