src/share/native/java/io/ObjectOutputStream.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2000, 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) 1999, 2013, 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
*** 21,34 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
- #include "jni.h"
- #include "jvm.h"
#include "jni_util.h"
! #include "jlong.h"
#include "java_lang_Float.h"
#include "java_lang_Double.h"
#include "java_io_ObjectOutputStream.h"
--- 21,32 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "jni_util.h"
! #include "jdk_util.h"
#include "java_lang_Float.h"
#include "java_lang_Double.h"
#include "java_io_ObjectOutputStream.h"
*** 86,96 ****
/* do conversion */
srcend = srcpos + nfloats;
for ( ; srcpos < srcend; srcpos++) {
fval = (float) floats[srcpos];
! if (JVM_IsNaN(fval)) { /* collapse NaNs */
ival = 0x7fc00000;
} else {
u.f = fval;
ival = (jint) u.i;
}
--- 84,94 ----
/* do conversion */
srcend = srcpos + nfloats;
for ( ; srcpos < srcend; srcpos++) {
fval = (float) floats[srcpos];
! if (ISNANF(fval)) { /* collapse NaNs */
ival = 0x7fc00000;
} else {
u.f = fval;
ival = (jint) u.i;
}
*** 158,168 ****
/* do conversion */
srcend = srcpos + ndoubles;
for ( ; srcpos < srcend; srcpos++) {
dval = doubles[srcpos];
! if (JVM_IsNaN((double) dval)) { /* collapse NaNs */
lval = jint_to_jlong(0x7ff80000);
lval = jlong_shl(lval, 32);
} else {
jdouble_to_jlong_bits(&dval);
u.d = (double) dval;
--- 156,166 ----
/* do conversion */
srcend = srcpos + ndoubles;
for ( ; srcpos < srcend; srcpos++) {
dval = doubles[srcpos];
! if (ISNAND((double) dval)) { /* collapse NaNs */
lval = jint_to_jlong(0x7ff80000);
lval = jlong_shl(lval, 32);
} else {
jdouble_to_jlong_bits(&dval);
u.d = (double) dval;