groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (GROOVY-8392) Groovy sometimes can not process varargs correctly
Date Thu, 31 Jan 2019 10:42:01 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King reopened GROOVY-8392:
-------------------------------

> Groovy sometimes can not process varargs correctly
> --------------------------------------------------
>
>                 Key: GROOVY-8392
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8392
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 1.8.6
>         Environment: online
>            Reporter: leizhiyuan
>            Priority: Major
>
> we have a StringUtil class in java
> ```
>     public static boolean areNotEmpty(String... values) {
>         System.out.println(values);
>         return true;
>     }
> ```
> and in a groovy script
> we invoke like  
> ```
> def str="S";
> StringUtil.areNotEmpty(str)
> ```
> But online enviroment, It occurs   when application  startup
> extraMessage=groovy.lang.MissingMethodException: No signature of method: static StringUtil.areNotEmpty()
is applicable for argument types: (java.lang.String) values: [S]
> Possible solutions: areNotEmpty([Ljava.lang.String;), isNotEmpty(java.lang.String), trimToEmpty(java.lang.String),
trimToEmpty(java.lang.String, java.lang.String)]
> but Not every application in other machine will occur.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message