diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java index 6ec43f74..9880f2d1 100644 --- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java +++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java @@ -594,8 +594,9 @@ public final class XmlModuleDescriptorUpdater { if (attributes.getIndex("branch") == -1) { if (newBranch != null) { // erase an existing branch attribute if its new value is blank - if (!newBranch.trim().equals("")) + if (!newBranch.trim().equals("")) { write(" branch=\"" + newBranch + "\""); + } } else if (options.isUpdateBranch() && systemMrid.getBranch() != null) { // this dependency is on a specific branch, we set it explicitly in the updated // file diff --git a/test/java/org/apache/ivy/ant/IvyDeliverTest.java b/test/java/org/apache/ivy/ant/IvyDeliverTest.java index 6b3b752b..2d2c8dea 100644 --- a/test/java/org/apache/ivy/ant/IvyDeliverTest.java +++ b/test/java/org/apache/ivy/ant/IvyDeliverTest.java @@ -147,9 +147,10 @@ public class IvyDeliverTest extends TestCase { mergeLine = mergeLine.trim(); expectedLine = expectedLine.trim(); - if (!mergeLine.startsWith("