From 9029cca391c6cb2e6f77ea3d6b99bf60644fa446 Mon Sep 17 00:00:00 2001 From: Jean-Louis Boudart Date: Tue, 14 Jan 2014 09:07:55 +0000 Subject: [PATCH] Add missing brackets in if statements git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1557988 13f79535-47bb-0310-9956-ffa450edef68 --- .../parser/xml/XmlModuleDescriptorUpdater.java | 3 ++- test/java/org/apache/ivy/ant/IvyDeliverTest.java | 3 ++- .../core/cache/ModuleDescriptorMemoryCacheTest.java | 3 ++- .../apache/ivy/core/publish/PublishEventsTest.java | 12 ++++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) 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("