Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6081

Log refactoring - Method Invocation Replaced By Variable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.9
    • Fix Version/s: 3.5.0-alpha-1, 3.5.0
    • Component/s: core
    • Labels:
      None

      Description

      Method Invocation Replaced By Variable
      In file: apache-maven-3.3.9/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java

      from line 70:

      String keptVersion = kept.getVersion();
      
      if ( omittedVersion != null ? !omittedVersion.equals( keptVersion ) : keptVersion != null )
      {
          logger.debug( indent + omitted + " (removed - nearer found: " + kept.getVersion() + ")" );
      }
      

      the "kept.getVersion()" can be replaced with "keptVersion" for the sake of simplicity and readability.

      1. MNG-6081.patch
        0.8 kB
        Nemo Chen

        Issue Links

          Activity

          Hide
          michael-o Michael Osipov added a comment -
          Show
          michael-o Michael Osipov added a comment - Fixed with e07978bdca0fe80ba059c686ac92229065b0fd44 .
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1403 (See https://builds.apache.org/job/maven-3.x/1403/)
          MNG-6081 Log refactoring - Method Invocation Replaced By Variable (michaelo: rev e07978bdca0fe80ba059c686ac92229065b0fd44)

          • (edit) maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1403 (See https://builds.apache.org/job/maven-3.x/1403/ ) MNG-6081 Log refactoring - Method Invocation Replaced By Variable (michaelo: rev e07978bdca0fe80ba059c686ac92229065b0fd44) (edit) maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
          Hide
          stephenc Stephen Connolly added a comment -

          Maven 3.4.0 has been dropped. See this thread for more details.

          This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.

          Show
          stephenc Stephen Connolly added a comment - Maven 3.4.0 has been dropped. See this thread for more details. This issue will need to be re-scheduled for a Maven release in the (hopefully near) future.
          Hide
          michael-o Michael Osipov added a comment -
          Show
          michael-o Michael Osipov added a comment - Fixed with a2358ba7bb9b5b8ccb4ca2b6ea66b637b88d6c09 .
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1500 (See https://builds.apache.org/job/maven-3.x/1500/)
          MNG-6081 Log refactoring - Method Invocation Replaced By Variable (michaelo: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=a2358ba7bb9b5b8ccb4ca2b6ea66b637b88d6c09)

          • (edit) maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1500 (See https://builds.apache.org/job/maven-3.x/1500/ ) MNG-6081 Log refactoring - Method Invocation Replaced By Variable (michaelo: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=a2358ba7bb9b5b8ccb4ca2b6ea66b637b88d6c09 ) (edit) maven-compat/src/main/java/org/apache/maven/artifact/resolver/DebugResolutionListener.java

            People

            • Assignee:
              michael-o Michael Osipov
              Reporter:
              chenfsd Nemo Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development