I need to convert hex->dec using groovy, i have
def hex = 0x15B546EF13361F7B530C59332C60C2CE
int i= Integer.parseInt(hex,16);
When i run this, the error is actually showing me the value i need, but i cant get it
groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.parseInt() is applicable for argument types: (java.math.BigInteger, java.lang.Integer) values: [28855032353026779507009821653742961358, ...] Possible solutions: parseInt(java.lang.String, int), parseInt(java.lang.String) error at line: 4
If i give the hex as string as the error suggests:
def hex = '0x15B546EF13361F7B530C59332C60C2CE'
java.lang.NumberFormatException: For input string: "0x15B546EF13361F7B530C59332C60C2CE"
What am i missing?