< prev index next >

src/java.xml.bind/share/classes/com/sun/xml/internal/bind/DatatypeConverterImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 79,89 **** public static String _printInteger(BigInteger val) { return val.toString(); } /** ! * Faster but less robust String->int conversion. * * Note that: * <ol> * <li>XML Schema allows '+', but {@link Integer#valueOf(String)} is not. * <li>XML Schema allows leading and trailing (but not in-between) whitespaces. --- 79,89 ---- public static String _printInteger(BigInteger val) { return val.toString(); } /** ! * Faster but less robust {@code String->int} conversion. * * Note that: * <ol> * <li>XML Schema allows '+', but {@link Integer#valueOf(String)} is not. * <li>XML Schema allows leading and trailing (but not in-between) whitespaces.
*** 113,123 **** return r * sign; } public static long _parseLong(CharSequence s) { ! return Long.valueOf(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString()); } public static short _parseShort(CharSequence s) { return (short) _parseInt(s); } --- 113,123 ---- return r * sign; } public static long _parseLong(CharSequence s) { ! return Long.parseLong(removeOptionalPlus(WhiteSpaceProcessor.trim(s)).toString()); } public static short _parseShort(CharSequence s) { return (short) _parseInt(s); }
< prev index next >