More loose bits…

This commit is contained in:
twogee 2017-05-28 20:03:07 +02:00
parent 4498bdaf5b
commit 096c5bd0c1
11 changed files with 17 additions and 23 deletions

View File

@ -453,6 +453,7 @@
printsummary="yes"
includeantruntime="yes"
dir="${basedir}"
tempdir="${build.dir}"
fork="true">
<classpath>
<path refid="test.classpath"/>

View File

@ -59,8 +59,8 @@ public class PackageMapping {
return pkg;
}
public void setPackage(String package1) {
pkg = package1;
public void setPackage(String packageName) {
pkg = packageName;
}
public ModuleRevisionId getModuleRevisionId() {

View File

@ -469,7 +469,7 @@ public class DefaultDependencyDescriptor implements DependencyDescriptor {
private Set getCollectionForConfiguration(String moduleConfiguration, Map collectionMap) {
if (collectionMap == null || collectionMap.isEmpty()) {
return Collections.EMPTY_SET;
return Collections.emptySet();
}
Collection artifacts = (Collection) collectionMap.get(moduleConfiguration);
Collection defArtifacts = (Collection) collectionMap.get("*");

View File

@ -28,14 +28,12 @@ This packages gathers classes used to represent identifiers of objects involved
As identifiers, they do not store any information on the module content and detailed metadata (like dependencies).
</p>
<h2>Classes</h2>
<p>
<ul>
<li>ModuleId</li> is used as the identifier of module, without considering its version. It's basically an organization and module name couple.
<li>ModuleRevisionId</li> is used as the identifier of a module in a particular version or version constraint. It is composed of a ModuleId, a revision, and optionally a branch and extra attributes.
<li>ArtifactId</li> identifies an artifact without considering its version. It's basically a ModuleId and an artifact name, type and extension, plus optional extra attributes.
<li>ArtifactRevisionId</li> identifies an artifact of a module in a particular version. It is composed of a ModuleRevisionId along with artifact identifier like the name type and extension.
</ul>
</p>
<h2>Text Representation</h2>
<p>
These classes share an homogeneous text representation, which can be easily obtained through the toString() method.

View File

@ -198,7 +198,7 @@ public class ResolveOptions extends LogOptions {
}
/**
* Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values *
* Get the asked confs. Special confs (like *) use the moduleDescriptor to find the values
*
* @param md
* Used to get the exact values for special confs.

View File

@ -477,7 +477,7 @@ public class XmlSettingsParser extends DefaultHandler {
String environmentPrefix = (String) attributes.get("environment");
if (propFilePath != null) {
String overrideStr = (String) attributes.get("override");
boolean override = (overrideStr == null) ? true : Boolean.valueOf(overrideStr);
boolean override = (overrideStr == null) || Boolean.valueOf(overrideStr);
Message.verbose("loading properties: " + propFilePath);
try {
URL fileUrl = urlFromFileAttribute(propFilePath);
@ -505,8 +505,8 @@ public class XmlSettingsParser extends DefaultHandler {
if (value == null) {
throw new IllegalArgumentException("missing attribute value on property tag");
}
ivy.setVariable(name, value, (override == null) ? true : Boolean.valueOf(override),
isSetVar, unlessSetVar);
ivy.setVariable(name, value, (override == null) || Boolean.valueOf(override), isSetVar,
unlessSetVar);
}
private void typedefStarted(Map attributes) {

View File

@ -125,7 +125,7 @@ public class DelegatingHandler extends DefaultHandler implements DTDHandler, Con
parent.delegate = null;
skip = false;
started = false;
for (DelegatingHandler/* <?> */subHandler : saxHandlerMapping.values()) {
for (DelegatingHandler subHandler : saxHandlerMapping.values()) {
subHandler.stopDelegating();
}
}

View File

@ -52,11 +52,7 @@ public class MRIDTransformationRule implements NamespaceTransformer {
}
}
matchers[3] = Pattern.compile(getPattern(src.getRev())).matcher(mrid.getRevision());
if (!matchers[3].matches()) {
return false;
}
return true;
return matchers[3].matches();
// CheckStyle:MagicNumber| ON
}

View File

@ -39,12 +39,12 @@ public class UpdateOptions {
/**
* Map from ModuleId of dependencies to new revision (as String)
*/
private Map resolvedRevisions = Collections.EMPTY_MAP;
private Map resolvedRevisions = Collections.emptyMap();
/**
* Map from ModuleId of dependencies to new branch (as String)
*/
private Map resolvedBranches = Collections.EMPTY_MAP;
private Map resolvedBranches = Collections.emptyMap();
/**
* the new status, <code>null</code> to keep the old one

View File

@ -312,7 +312,6 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
getBuffer().append("\"");
}
getBuffer().append(">");
return;
} else if ("ivy-module".equals(qName)) {
ivyModuleStarted(attributes);
} else if ("info".equals(qName)) {
@ -847,8 +846,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
String visibility = settings.substitute(attributes.getValue("visibility"));
String ext = settings.substitute(attributes.getValue("extends"));
String transitiveValue = attributes.getValue("transitive");
boolean transitive = (transitiveValue == null) ? true
: Boolean.valueOf(attributes.getValue("transitive"));
boolean transitive = (transitiveValue == null)
|| Boolean.valueOf(attributes.getValue("transitive"));
String deprecated = attributes.getValue("deprecated");
Configuration configuration = new Configuration(conf,
Configuration.Visibility.getVisibility((visibility == null) ? "public"
@ -904,8 +903,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
boolean changing = Boolean.valueOf(settings.substitute(attributes.getValue("changing")));
String transitiveValue = settings.substitute(attributes.getValue("transitive"));
boolean transitive = (transitiveValue == null) ? true
: Boolean.valueOf(attributes.getValue("transitive"));
boolean transitive = (transitiveValue == null)
|| Boolean.valueOf(attributes.getValue("transitive"));
String name = settings.substitute(attributes.getValue("name"));
String branch = settings.substitute(attributes.getValue("branch"));

View File

@ -152,7 +152,7 @@ public class FileSystemResolver extends RepositoryResolver {
try {
getFileRepository().move(transactionTempDir, transactionDestDir);
Message.info("\tpublish commited: moved " + transactionTempDir + " \n\t\tto "
Message.info("\tpublish committed: moved " + transactionTempDir + " \n\t\tto "
+ transactionDestDir);
} catch (IOException ex) {
IOException commitEx;