How about something like this:

```java
public static boolean isNumeric(String str, boolean allowDot) {
        if (str == null) {
            return false;
        }
        int sz = str.length();
        for (int i = 0; i < sz; i++) {
            if ((!allowDot && str.charAt(i) == '.') || 
!Character.isDigit(str.charAt(i))) {
                return false;
            }
        }
        return true;
    }
```

Not tested yet. Just for your information. In this way we can unify the logic 
into one method.
And call isNumeric(value, true) from ClassHelper.

[ Full content available at: 
https://github.com/apache/incubator-dubbo/pull/3093 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to