mirror of https://github.com/apache/ant-ivy
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
This commit is contained in:
parent
0eb07d3980
commit
9029cca391
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -147,9 +147,10 @@ public class IvyDeliverTest extends TestCase {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,8 +157,9 @@ public class ModuleDescriptorMemoryCacheTest extends TestCase {
|
|||
|
||||
public ModuleDescriptor provideModule(ParserSettings ivySettings, File descriptorFile,
|
||||
boolean validate) {
|
||||
if (ivySettings != null)
|
||||
if (ivySettings != null) {
|
||||
ivySettings.substitute("${val}");
|
||||
}
|
||||
called = true;
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,8 +149,9 @@ public class PublishEventsTest extends TestCase {
|
|||
ivy = null;
|
||||
}
|
||||
publishEngine = null;
|
||||
if (dataFile != null)
|
||||
if (dataFile != null) {
|
||||
dataFile.delete();
|
||||
}
|
||||
dataFile = null;
|
||||
ivyFile = null;
|
||||
}
|
||||
|
|
@ -240,8 +241,9 @@ public class PublishEventsTest extends TestCase {
|
|||
// 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 TestCase {
|
|||
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 TestCase {
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue