Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-6829] Replace any StringUtils#isEmpty(String) and #isNotEmpty(String) #38

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -384,13 +384,15 @@ public void execute() throws MojoExecutionException {
return;
}

if (StringUtils.isEmpty(encoding)) {
if (encoding == null || encoding.isEmpty()) {
getLog().warn("File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
+ ", i.e. build is platform dependent!");
}

if (resolveScopes == null) {
resolveScopes = new String[] {StringUtils.isEmpty(this.includeScope) ? JavaScopes.TEST : this.includeScope};
resolveScopes = new String[] {
(this.includeScope == null || this.includeScope.isEmpty()) ? JavaScopes.TEST : this.includeScope
};
}

if (supplementalModels == null) {
Expand Down Expand Up @@ -804,7 +806,7 @@ public Object internalGet(String key) {
String inceptionYear = project.getInceptionYear();
String year = new SimpleDateFormat("yyyy").format((outputDate == null) ? new Date() : outputDate);

if (StringUtils.isEmpty(inceptionYear)) {
if (inceptionYear == null || inceptionYear.isEmpty()) {
if (getLog().isDebugEnabled()) {
getLog().debug("inceptionYear not specified, defaulting to " + year);
}
Expand Down Expand Up @@ -849,10 +851,10 @@ private List<File> downloadBundles(List<String> bundles) throws MojoExecutionExc
String g = s[0];
String a = s[1];
String v = s[2];
String type = (s.length >= 4 ? s[3] : "jar");
String type = s.length >= 4 ? s[3] : "jar";
ArtifactType artifactType =
RepositoryUtils.newArtifactType(type, artifactHandlerManager.getArtifactHandler(type));
String classifier = (s.length == 5 ? s[4] : artifactType.getClassifier());
String classifier = s.length == 5 ? s[4] : artifactType.getClassifier();

DefaultArtifact artifact =
new DefaultArtifact(g, a, classifier, artifactType.getExtension(), v, artifactType);
Expand Down
Expand Up @@ -93,7 +93,7 @@ public void execute() throws MojoExecutionException {
return;
}

if (StringUtils.isEmpty(sourceEncoding)) {
if (sourceEncoding == null || sourceEncoding.isEmpty()) {
getLog().warn("sourceEncoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
+ ", i.e. build is platform dependent!");
sourceEncoding = ReaderFactory.FILE_ENCODING;
Expand Down