maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject svn commit: r1755616 - in /maven/shared/trunk/maven-dependency-analyzer/src: main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java
Date Tue, 09 Aug 2016 15:16:38 GMT
Author: michaelo
Date: Tue Aug  9 15:16:38 2016
New Revision: 1755616

URL: http://svn.apache.org/viewvc?rev=1755616&view=rev
Log:
[MSHARED-545] maven-dependency-analyzer fails on classes containing constant long or double

Submitted-by: Jonathan Haber <jhaber@hubspot.com>

This fixes #10

Modified:
    maven/shared/trunk/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
    maven/shared/trunk/maven-dependency-analyzer/src/test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java

Modified: maven/shared/trunk/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java?rev=1755616&r1=1755615&r2=1755616&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
(original)
+++ maven/shared/trunk/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java
Tue Aug  9 15:16:38 2016
@@ -117,9 +117,11 @@ public class ConstantPoolParser
                     break;
                 case CONSTANT_DOUBLE:
                     buf.getDouble();
+                    ix++;
                     break;
                 case CONSTANT_LONG:
                     buf.getLong();
+                    ix++;
                     break;
                 case CONSTANT_METHODHANDLE:
                     buf.get();

Modified: maven/shared/trunk/maven-dependency-analyzer/src/test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-dependency-analyzer/src/test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java?rev=1755616&r1=1755615&r2=1755616&view=diff
==============================================================================
--- maven/shared/trunk/maven-dependency-analyzer/src/test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java
(original)
+++ maven/shared/trunk/maven-dependency-analyzer/src/test/resources/java8methodRefs/src/main/java/inlinedStaticReference/Project.java
Tue Aug  9 15:16:38 2016
@@ -26,6 +26,8 @@ import org.apache.commons.io.FileUtils;
 
 public class Project
 {
+    public static final long LONG_CONSTANT = 123L;
+    public static final double DOUBLE_CONSTANT = 123.0;
     public static final Function<String, File> souv = FileUtils::getFile;
 
     public Project() {



Mime
View raw message