Browse Source

whitespace

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@809624 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
90f1f69a51
2 changed files with 26 additions and 26 deletions
  1. +13
    -13
      src/main/org/apache/tools/ant/taskdefs/Property.java
  2. +13
    -13
      src/tests/antunit/taskdefs/property-test.xml

+ 13
- 13
src/main/org/apache/tools/ant/taskdefs/Property.java View File

@@ -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);
}

}

+ 13
- 13
src/tests/antunit/taskdefs/property-test.xml View File

@@ -1,20 +1,20 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

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.
-->
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.
-->
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">

<import file="../antunit-base.xml" />


Loading…
Cancel
Save