Author: jlboudart
Date: Tue Jan 14 09:07:55 2014
New Revision: 1557988
URL: http://svn.apache.org/r1557988
Log:
Add missing brackets in if statements
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java?rev=1557988&r1=1557987&r2=1557988&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorUpdater.java
Tue Jan 14 09:07:55 2014
@@ -594,8 +594,9 @@ public final class XmlModuleDescriptorUp
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
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java?rev=1557988&r1=1557987&r2=1557988&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java Tue Jan
14 09:07:55 2014
@@ -147,9 +147,10 @@ public class IvyDeliverTest extends Test
mergeLine = mergeLine.trim();
expectedLine = expectedLine.trim();
- if (!mergeLine.startsWith("<info"))
+ if (!mergeLine.startsWith("<info")) {
assertEquals("published descriptor matches at line[" +
lineNo + "]",
expectedLine.trim(), mergeLine.trim());
+ }
++lineNo;
}
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java?rev=1557988&r1=1557987&r2=1557988&view=diff
==============================================================================
---
ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java
(original)
+++
ant/ivy/core/trunk/test/java/org/apache/ivy/core/cache/ModuleDescriptorMemoryCacheTest.java
Tue Jan 14 09:07:55 2014
@@ -157,8 +157,9 @@ public class ModuleDescriptorMemoryCache
public ModuleDescriptor provideModule(ParserSettings ivySettings, File
descriptorFile,
boolean validate) {
- if (ivySettings != null)
+ if (ivySettings != null) {
ivySettings.substitute("${val}");
+ }
called = true;
return result;
}
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java?rev=1557988&r1=1557987&r2=1557988&view=diff
==============================================================================
---
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
(original)
+++
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
Tue Jan 14 09:07:55 2014
@@ -149,8 +149,9 @@ public class PublishEventsTest extends T
ivy = null;
}
publishEngine = null;
- if (dataFile != null)
+ if (dataFile != null) {
dataFile.delete();
+ }
dataFile = null;
ivyFile = null;
}
@@ -240,8 +241,9 @@ public class PublishEventsTest extends T
// set an error to be thrown during publication of the data file.
this.publishError = new IOException("boom!");
// we don't care which artifact is attempted; either will fail with an
IOException.
- for (Iterator it = expectedPublications.values().iterator();
it.hasNext();)
+ for (Iterator it = expectedPublications.values().iterator();
it.hasNext();) {
((PublishTestCase) it.next()).expectedSuccess = false;
+ }
try {
publishEngine.publish(publishModule.getModuleRevisionId(),
publishSources, "default",
@@ -341,9 +343,10 @@ public class PublishEventsTest extends T
expectedArtifact.getExt(), "default",
String.valueOf(test.expectedOverwrite)};
- for (int i = 0; i < attributes.length; ++i)
+ for (int i = 0; i < attributes.length; ++i) {
assertEquals("event declares correct value for " +
attributes[i], values[i],
event.getAttributes().get(attributes[i]));
+ }
// we test file separately, since it is hard to guaranteean
exact path match, but we
// want
// to make sure that both paths point to the same canonical
location on the
@@ -474,8 +477,9 @@ public class PublishEventsTest extends T
test.currentTestCase.expectedData.exists());
// simulate a publisher error if the current test case demands it.
- if (test.publishError != null)
+ if (test.publishError != null) {
throw test.publishError;
+ }
// all assertions pass. increment the publication count
test.currentTestCase.published = true;