You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Mike Houston (Jira)" <ji...@apache.org> on 2019/11/19 15:08:00 UTC

[jira] [Commented] (GROOVY-9126) Unreachable line numbers after ARETURN in bytecode

    [ https://issues.apache.org/jira/browse/GROOVY-9126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977544#comment-16977544 ] 

Mike Houston commented on GROOVY-9126:
--------------------------------------

One quick note.  With this issue, code coverage metrics are almost useless.  Almost every method has at least one line of code that mistakenly appears to be not covered.   This caused my line coverage metric to drop from 98% to 85%.  I can live with that.

The real problem is that I use the un-covered lines to discover test cases I missed.  This problem makes that almost impossible.  It is very hard to find missed cases when every method has one line un covered.  It is like looking for a needle in a hay-stack (sorry for the English language idiom :).

As a work-around, I rolled back to Groovy 2.5.4.  I am worried that I won't be able to upgrade past that version if this issues remains...

Thanks.

> Unreachable line numbers after ARETURN in bytecode
> --------------------------------------------------
>
>                 Key: GROOVY-9126
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9126
>             Project: Groovy
>          Issue Type: Bug
>          Components: bytecode
>    Affects Versions: 2.5.5, 2.5.6, 2.5.7
>            Reporter: Adam Estabrook
>            Priority: Minor
>
> Starting with Groovy 2.5.5, unreachable line numbers were added to the byte code. This causes tools like JaCoCo to report uncovered lines. Removing these line numbers after the ARETURN would be helpful.
> [https://github.com/jacoco/jacoco/issues/884]
> ARETURN
>  L1
>  LINENUMBER 16 L1 <-- new line number that cant be hit after ARETURN
>  FRAME FULL [] [java/lang/Throwable]
>  NOP
>  ATHROW
>  LOCALVARIABLE this Lcom/company/Form; L0 L1 0
>  MAXSTACK = 2
>  MAXLOCALS = 1
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)