You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "dk2k (via GitHub)" <gi...@apache.org> on 2023/04/05 07:44:08 UTC

[GitHub] [camel] dk2k commented on a diff in pull request #9817: String.equalsTo("") replaced with String.isEmpty() in core and tooling

dk2k commented on code in PR #9817:
URL: https://github.com/apache/camel/pull/9817#discussion_r1158141887


##########
tooling/camel-tooling-maven/src/main/java/org/apache/camel/tooling/maven/MavenDownloaderImpl.java:
##########
@@ -731,10 +731,7 @@ Settings mavenConfiguration(
         // 3) ${user.home}/.m2/repository (if exists)
         // 4) /tmp/.m2/repository
         String localRepository = System.getProperty("maven.repo.local");
-        if (localRepository == null || "".equals(localRepository.trim())) {
-            localRepository = settings.getLocalRepository();

Review Comment:
   The first step. Another IF with the same condition below. Both get combined into one block.
   The second step. The assigned value isn't used before another value is assigned to localRepository => the firas assignment can be removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org