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

ASF GitHub Bot commented on GROOVY-7941:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/426

    GROOVY-7941: MissingMethodException should limit argument types in ge…

    …tMessage()

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy7941

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/426.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #426
    
----
commit bec7c31b5781518634a8b9a270372a32cdb636f0
Author: paulk <pa...@asert.com.au>
Date:   2016-09-19T06:03:18Z

    GROOVY-7941: MissingMethodException should limit argument types in 
getMessage()

----


> MissingMethodException should limit argument types in getMessage()
> ------------------------------------------------------------------
>
>                 Key: GROOVY-7941
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7941
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-jdk
>    Affects Versions: 2.4.7
>         Environment: All Environments
>            Reporter: Vlad Shtibin
>            Priority: Trivial
>         Attachments: add_missing_method_limit.patch
>
>
> The getMessage() method in MissingMethodException uses 
> InvokerHelper.toTypeString(Object[] arguments) to generate the types of each 
> argument. When this exception occurs with a large parameter list this can 
> create a very large String. The format method which is used 2 lines later to 
> print the values uses a 40 character limit, I'd like to propose to use 
> similar logic for the types as well.
> Here is a trivial code snippet from groovysh - this log message can grow 
> unbounded:
> {code}
> groovy:000> missing(*("Test".getBytes()))
> ERROR groovy.lang.MissingMethodException:
> No signature of method: groovysh_evaluate.missing() is applicable for 
> argument types: (java.lang.Byte, java.lang.Byte, java.lang.Byte, 
> java.lang.Byte) values: [84, 101, 115, 116]
> Possible solutions: toString(), toString()
> {code}



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

Reply via email to