You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Philip Arickx (JIRA)" <ji...@apache.org> on 2018/08/22 08:28:00 UTC
[jira] [Created] (GROOVY-8763) CharSequence.toInteger() only deals
with base 10 integer literals
Philip Arickx created GROOVY-8763:
-------------------------------------
Summary: CharSequence.toInteger() only deals with base 10 integer literals
Key: GROOVY-8763
URL: https://issues.apache.org/jira/browse/GROOVY-8763
Project: Groovy
Issue Type: Bug
Components: groovy-jdk
Affects Versions: 2.5.2
Reporter: Philip Arickx
{{'0644'.toInteger() }}resolves to 644 (base 10)
{{'0x123'.toInteger() }}fails with an exception
The groovy JDK docs for the method state "Parse a CharSequence into an Integer"
Either the docs should be updated, stating explicitly the parsing happens in base 10, or the method should be altered to accept the various non-base 10 integer literal notations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)