Ignore:
Timestamp:
2017-12-23T02:40:43+01:00 (8 years ago)
Author:
Don-vip
Message:

see #15682 - upgrade to JSR 374 (JSON Processing) API 1.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/glassfish/json/JsonNumberImpl.java

    r6756 r13231  
    22 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    33 *
    4  * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
     4 * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved.
    55 *
    66 * The contents of this file are subject to the terms of either the GNU
     
    99 * may not use this file except in compliance with the License.  You can
    1010 * obtain a copy of the License at
    11  * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
    12  * or packager/legal/LICENSE.txt.  See the License for the specific
     11 * https://oss.oracle.com/licenses/CDDL+GPL-1.1
     12 * or LICENSE.txt.  See the License for the specific
    1313 * language governing permissions and limitations under the License.
    1414 *
    1515 * When distributing the software, include this License Header Notice in each
    16  * file and include the License file at packager/legal/LICENSE.txt.
     16 * file and include the License file at LICENSE.txt.
    1717 *
    1818 * GPL Classpath Exception:
     
    126126
    127127        @Override
     128        public Number numberValue() {
     129            return num;
     130        }
     131
     132        @Override
    128133        public String toString() {
    129134            return Integer.toString(num);
     
    143148        public boolean isIntegral() {
    144149            return true;
     150        }
     151
     152        @Override
     153        public int intValue() {
     154            return (int) num;
     155        }
     156
     157        @Override
     158        public int intValueExact() {
     159            return Math.toIntExact(num);
    145160        }
    146161
     
    172187
    173188        @Override
     189        public Number numberValue() {
     190            return num;
     191        }
     192
     193        @Override
    174194        public String toString() {
    175195            return Long.toString(num);
     
    191211        }
    192212
     213        @Override
     214        public Number numberValue() {
     215            return bigDecimalValue();
     216        }
     217
    193218    }
    194219
     
    245270    @Override
    246271    public boolean equals(Object obj) {
     272        if (this == obj){
     273            return true;
     274        }
    247275        if (!(obj instanceof JsonNumber)) {
    248276            return false;
Note: See TracChangeset for help on using the changeset viewer.