Prefer using String.isEmpty over String.length()>0

This commit is contained in:
Guillaume Nodet 2023-07-03 10:26:10 +02:00
parent 08979553f2
commit 8f45d51bd6
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public interface Artifact {
+ getArtifactId()
+ ':'
+ getExtension()
+ (getClassifier().length() > 0 ? ":" + getClassifier() : "")
+ (getClassifier().isEmpty() ? "" : ":" + getClassifier())
+ ':'
+ getVersion();
}

View File

@ -43,7 +43,7 @@ public class DefaultArtifact implements Artifact {
+ getArtifactId()
+ ':'
+ getExtension()
+ (getClassifier().length() > 0 ? ":" + getClassifier() : "")
+ (getClassifier().isEmpty() ? "" : ":" + getClassifier())
+ ':'
+ getVersion();
}