diff --git a/src/main/org/apache/tools/ant/taskdefs/Property.java b/src/main/org/apache/tools/ant/taskdefs/Property.java index 4f05c14ba..ad8393c26 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Property.java +++ b/src/main/org/apache/tools/ant/taskdefs/Property.java @@ -189,12 +189,12 @@ public class Property extends Task { */ public void addText(String msg) { if (!valueAttributeUsed) { - msg = getProject().replaceProperties(msg); - String currentValue = getValue(); - if (currentValue != null) { - msg = currentValue + msg; - } - internalSetValue(msg); + msg = getProject().replaceProperties(msg); + String currentValue = getValue(); + if (currentValue != null) { + msg = currentValue + msg; + } + internalSetValue(msg); } else if (msg.trim().length() > 0) { throw new BuildException("can't combine nested text with value" + " attribute"); @@ -502,13 +502,13 @@ public class Property extends Task { * @see java.util.Properties#loadFromXML(InputStream) */ private void loadProperties( - Properties props, InputStream is, boolean isXml) throws IOException { + Properties props, InputStream is, boolean isXml) throws IOException { if (isXml) { // load the xml based property definition // use reflection because of bwc to Java 1.3 try { Method loadXmlMethod = props.getClass().getMethod("loadFromXML", - new Class[] {InputStream.class}); + new Class[] {InputStream.class}); loadXmlMethod.invoke(props, new Object[] {is}); } catch (NoSuchMethodException e) { e.printStackTrace(); @@ -543,7 +543,7 @@ public class Property extends Task { addProperties(props); } else { log("Unable to find property file: " + file.getAbsolutePath(), - Project.MSG_VERBOSE); + Project.MSG_VERBOSE); } } catch (IOException ex) { throw new BuildException(ex, getLocation()); @@ -610,7 +610,7 @@ public class Property extends Task { log("Ignoring: " + entry, Project.MSG_WARN); } else { props.put(prefix + entry.substring(0, pos), - entry.substring(pos + 1)); + entry.substring(pos + 1)); } } addProperties(props); @@ -672,9 +672,9 @@ public class Property extends Task { PropertyHelper propertyHelper = (PropertyHelper) PropertyHelper.getPropertyHelper(getProject()); new ResolvePropertyMap( - getProject(), - propertyHelper, - propertyHelper.getExpanders()).resolveAllProperties(props); + getProject(), + propertyHelper, + propertyHelper.getExpanders()).resolveAllProperties(props); } } diff --git a/src/tests/antunit/taskdefs/property-test.xml b/src/tests/antunit/taskdefs/property-test.xml index c5341804f..fdcec53c3 100644 --- a/src/tests/antunit/taskdefs/property-test.xml +++ b/src/tests/antunit/taskdefs/property-test.xml @@ -1,20 +1,20 @@ + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + -->