< prev index next >

src/jdk.jdwp.agent/share/native/libjdwp/transport.c

Print this page
rev 50999 : 8207233: Minor improvements of jdk C-coding

*** 1,7 **** /* ! * Copyright (c) 1998, 2017, 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) 1998, 2018, 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
*** 209,219 **** jint supported_versions[2] = {JDWPTRANSPORT_VERSION_1_1, JDWPTRANSPORT_VERSION_1_0}; JNI_FUNC_PTR(env,GetJavaVM)(env, &jvm); /* Try version 1.1 first, fallback to 1.0 on error */ ! for (i = 0; i < sizeof(supported_versions); ++i) { rc = (*onLoad)(jvm, &callback, supported_versions[i], &t); if (rc != JNI_EVERSION) { info->transportVersion = supported_versions[i]; break; } --- 209,219 ---- jint supported_versions[2] = {JDWPTRANSPORT_VERSION_1_1, JDWPTRANSPORT_VERSION_1_0}; JNI_FUNC_PTR(env,GetJavaVM)(env, &jvm); /* Try version 1.1 first, fallback to 1.0 on error */ ! for (i = 0; i < sizeof(supported_versions)/sizeof(jint); ++i) { rc = (*onLoad)(jvm, &callback, supported_versions[i], &t); if (rc != JNI_EVERSION) { info->transportVersion = supported_versions[i]; break; }
< prev index next >