[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-dev
Subject:    [jira] [Commented] (MSHARED-545) maven-dependency-analyzer fails on classes containing constant long
From:       "Jonathan Haber (JIRA)" <jira () apache ! org>
Date:       2016-06-29 21:37:11
Message-ID: JIRA.12975366.1464922338000.415.1467236231944 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/MSHARED-545?page=com.atlassian.jira.plugin \
.system.issuetabpanels:comment-tabpanel&focusedCommentId=15355839#comment-15355839 ] 

Jonathan Haber commented on MSHARED-545:
----------------------------------------

Anything I can do to move this along? The bug is very literally a blocker and renders \
the maven-dependency-analyzer completely unusable. And the fix that I \
[PRed|https://github.com/apache/maven-shared/pull/10] is quite trivial.

> maven-dependency-analyzer fails on classes containing constant long or double
> -----------------------------------------------------------------------------
> 
> Key: MSHARED-545
> URL: https://issues.apache.org/jira/browse/MSHARED-545
> Project: Maven Shared Components
> Issue Type: Bug
> Affects Versions: maven-dependency-analyzer-1.7
> Reporter: Jonathan Haber
> Priority: Blocker
> 
> The maven-dependency-analyzer was updated to parse the constant pool on each class \
> file so that it can discover method references and constant references, but the \
> ConstantPoolParser is missing two critical lines that cause it to throw an \
> exception on any class file containing a constant long or constant double field. \
> According to the [Javadoc|https://github.com/apache/maven-shared/blob/ca1f714442eb49 \
> 439a1f184ba8177e7795158b75/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java#L34], \
> the class was adapted from [this|http://stackoverflow.com/a/32278587/23691] stack \
> overflow answer. If you look inside the switch statement at the cases for longs and \
> doubles, it increments the index. But the ConstantPoolParser is \
> [missing|https://github.com/apache/maven-shared/blob/ca1f714442eb49439a1f184ba8177e7 \
> 795158b75/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java#L118-L123] \
> this increment. This causes it to land \
> [here|https://github.com/apache/maven-shared/blob/ca1f714442eb49439a1f184ba8177e7795 \
> 158b75/maven-dependency-analyzer/src/main/java/org/apache/maven/shared/dependency/analyzer/asm/ConstantPoolParser.java#L95-L96] \
> and throw an exception on all but the most trivial codebases. In \
> [this|https://github.com/apache/maven-shared/pull/10] pull request I fixed the bug \
> and updated one of the test classes to have a constant long field to prevent \
> regressions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic