Skip to content

Commit

Permalink
Merge branch 'ikvm-jdk8u422-b05' into ikvm-jdk8u432-b06
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Oct 31, 2024
2 parents 618917e + e904cb9 commit 00a32da
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 36 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* -text
* -text
* binary
17 changes: 14 additions & 3 deletions jdk/src/share/classes/com/sun/media/sound/WaveFloatFileReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,23 @@ public AudioFileFormat getAudioFileFormat(File file)

public AudioInputStream getAudioInputStream(URL url)
throws UnsupportedAudioFileException, IOException {
return getAudioInputStream(new BufferedInputStream(url.openStream()));
InputStream stream = url.openStream();
try {
return getAudioInputStream(new BufferedInputStream(stream));
} catch (Exception e) {
stream.close();
throw e;
}
}

public AudioInputStream getAudioInputStream(File file)
throws UnsupportedAudioFileException, IOException {
return getAudioInputStream(new BufferedInputStream(new FileInputStream(
file)));
InputStream stream = new FileInputStream(file);
try {
return getAudioInputStream(new BufferedInputStream(stream));
} catch (Exception e) {
stream.close();
throw e;
}
}
}
2 changes: 1 addition & 1 deletion jdk/src/share/native/java/net/net_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jfieldID NET_GetFileDescriptorID(JNIEnv *env);

JNIEXPORT jint JNICALL ipv6_available() ;

void
JNIEXPORT void JNICALL
NET_AllocSockaddr(struct sockaddr **him, int *len);

JNIEXPORT int JNICALL
Expand Down
4 changes: 2 additions & 2 deletions jdk/src/solaris/native/sun/xawt/XToolkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
#ifdef __linux__
#if defined __linux__ && !__MUSL__
#include <execinfo.h>
#endif

Expand Down Expand Up @@ -796,7 +796,7 @@ JNIEXPORT jstring JNICALL Java_sun_awt_X11_XToolkit_getEnv
return ret;
}

#ifdef __linux__
#if defined __linux__ && !__MUSL__
void print_stack(void)
{
void *array[10];
Expand Down
12 changes: 6 additions & 6 deletions jdk/src/windows/native/sun/java2d/d3d/D3DPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#include "Trace.h"

#define DebugPrintD3DError(res, msg) \
J2dTraceLn1(J2D_TRACE_ERROR, "D3D Error: " ## msg ## " res=%d", res)
J2dTraceLn1(J2D_TRACE_ERROR, "D3D Error: " msg " res=%d", res)

#endif /*D3D_PPL_DLL*/

Expand All @@ -92,9 +92,9 @@ do { \
#define SAFE_PRINTLN(RES) \
do { \
if ((RES)!= NULL) { \
J2dTraceLn1(J2D_TRACE_VERBOSE, " " ## #RES ## "=0x%x", (RES)); \
J2dTraceLn1(J2D_TRACE_VERBOSE, " " #RES "=0x%x", (RES)); \
} else { \
J2dTraceLn(J2D_TRACE_VERBOSE, " " ## #RES ## "=NULL"); \
J2dTraceLn(J2D_TRACE_VERBOSE, " " #RES "=NULL"); \
} \
} while (0);
#else // DEBUG
Expand All @@ -109,7 +109,7 @@ do { \
#define ACT_IF_NULL(ACTION, value) \
if ((value) == NULL) { \
J2dTraceLn3(J2D_TRACE_ERROR, \
"%s is null in %s:%d", #value, THIS_FILE, __LINE__); \
"%s is null in %s:%d", #value, __FILE__, __LINE__); \
ACTION; \
} else do { } while (0)
#define RETURN_IF_NULL(value) ACT_IF_NULL(return, value)
Expand All @@ -119,12 +119,12 @@ do { \

#define RETURN_STATUS_IF_EXP_FAILED(EXPR) \
if (FAILED(res = (EXPR))) { \
DebugPrintD3DError(res, " " ## #EXPR ## " failed in " ## THIS_FILE); \
DebugPrintD3DError(res, " " #EXPR " failed in " __FILE__); \
return res; \
} else do { } while (0)

#define RETURN_STATUS_IF_FAILED(status) \
if (FAILED((status))) { \
DebugPrintD3DError((status), " failed in " ## THIS_FILE ## ", return;");\
DebugPrintD3DError((status), " failed in " __FILE__ ", return;");\
return (status); \
} else do { } while (0)
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <windows.h>
#include <aclapi.h>
#include <winioctl.h>
#include <Sddl.h>
#include <sddl.h>

#include "jni.h"
#include "jni_util.h"
Expand Down
10 changes: 5 additions & 5 deletions jdk/src/windows/native/sun/security/jgss/sspi_bridge/sspi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <Strsafe.h>
#include <strsafe.h>
#include <ntsecapi.h>
#include <new>

Expand Down Expand Up @@ -648,7 +648,7 @@ gss_acquire_cred(OM_uint32 *minor_status,
if (cred->phCredK == NULL) {
goto err;
}
ss = AcquireCredentialsHandle(
ss = ::AcquireCredentialsHandle(
NULL,
L"Kerberos",
cred_usage == 0 ? SECPKG_CRED_BOTH :
Expand Down Expand Up @@ -678,7 +678,7 @@ gss_acquire_cred(OM_uint32 *minor_status,
auth.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
auth.PackageList = (unsigned short*)L"Kerberos";
auth.PackageListLength = 8;
ss = AcquireCredentialsHandle(
ss = ::AcquireCredentialsHandle(
NULL,
L"Negotiate",
cred_usage == 0 ? SECPKG_CRED_BOTH :
Expand Down Expand Up @@ -936,9 +936,9 @@ gss_init_sec_context(OM_uint32 *minor_status,
auth.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
auth.PackageList = (unsigned short*)L"Kerberos";
auth.PackageListLength = 8;
ss = AcquireCredentialsHandle(
ss = ::AcquireCredentialsHandle(
NULL,
isSPNEGO ? L"Negotiate" : L"Kerberos",
isSPNEGO ? (LPTSTR)L"Negotiate" : (LPTSTR)L"Kerberos",
SECPKG_CRED_OUTBOUND,
NULL,
isSPNEGO ? &auth : NULL,
Expand Down
2 changes: 1 addition & 1 deletion jdk/src/windows/native/sun/security/mscapi/security.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ void showProperty(NCRYPT_HANDLE hKey) {
BCryptBuffer bb;
bb.BufferType = NCRYPTBUFFER_PKCS_SECRET;
bb.cbBuffer = 18;
bb.pvBuffer = L"changeit";
bb.pvBuffer = (PVOID)L"changeit";
BCryptBufferDesc bbd;
bbd.ulVersion = 0;
bbd.cBuffers = 1;
Expand Down
1 change: 1 addition & 0 deletions jdk/src/windows/native/sun/security/pkcs11/j2secmod_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <jni_util.h>

#include "j2secmod.h"
#include "wrapper/pkcs11wrapper.h"

void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) {
HINSTANCE hModule = (HINSTANCE)jHandle;
Expand Down
5 changes: 5 additions & 0 deletions jdk/src/windows/native/sun/security/pkcs11/wrapper/p11_md.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@

/* defines for WIN32 platform *************************************************/

#ifndef _P11_MD_H
#define _P11_MD_H 1

#include <windows.h>

/* statement according to PKCS11 docu */
Expand Down Expand Up @@ -101,3 +104,5 @@ struct ModuleData {

};
typedef struct ModuleData ModuleData;

#endif /* _P11_MD_H */
2 changes: 1 addition & 1 deletion jdk/src/windows/native/sun/windows/awt.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class JavaStringBuffer
jsize m_dwSize;
LPWSTR getNonEmptyString() {
return (NULL==m_pStr)
? L""
? (LPWSTR)L""
: m_pStr;
}

Expand Down
2 changes: 1 addition & 1 deletion jdk/src/windows/native/sun/windows/awt_Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3579,7 +3579,7 @@ UINT AwtComponent::WindowsKeyToJavaChar(UINT wkey, UINT modifiers, TransOps ops,
} else {
UINT scancode = ::MapVirtualKey(wkey, 0);
converted = ::ToUnicodeEx(wkey, scancode, keyboardState,
wChar, 2, 0, GetKeyboardLayout());
(LPWSTR)&wChar, 2, 0, GetKeyboardLayout());
}

UINT translation;
Expand Down
4 changes: 2 additions & 2 deletions jdk/src/windows/native/sun/windows/awt_PrintControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ BOOL AwtPrintControl::UpdateAttributes(JNIEnv *env,
DASSERT(!IsBadReadPtr(devnames, sizeof(DEVNAMES)));
LPTSTR lpcNames = (LPTSTR)devnames;
LPTSTR pbuf = (_tcslen(lpcNames + devnames->wDeviceOffset) == 0 ?
TEXT("") : lpcNames + devnames->wDeviceOffset);
(LPTSTR)TEXT("") : lpcNames + devnames->wDeviceOffset);
if (pbuf != NULL) {
jstring jstr = JNU_NewStringPlatform(env, pbuf);
env->CallVoidMethod(printCtrl,
Expand All @@ -1028,7 +1028,7 @@ BOOL AwtPrintControl::UpdateAttributes(JNIEnv *env,
env->DeleteLocalRef(jstr);
}
pbuf = (_tcslen(lpcNames + devnames->wOutputOffset) == 0 ?
TEXT("") : lpcNames + devnames->wOutputOffset);
(LPTSTR)TEXT("") : lpcNames + devnames->wOutputOffset);
if (pbuf != NULL) {
if (wcscmp(pbuf, L"FILE:") == 0) {
pdFlags |= PD_PRINTTOFILE;
Expand Down
11 changes: 0 additions & 11 deletions jdk/src/windows/native/sun/windows/awt_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,6 @@ void *safe_Realloc(void *memblock, size_t size) throw (std::bad_alloc) {
return ret_val;
}

#if !defined(DEBUG)
// This function exists because VC++ 5.0 currently does not conform to the
// Standard C++ specification which requires that operator new throw
// std::bad_alloc in an out of memory situation. Instead, VC++ 5.0 returns 0.
//
// This function can be safely removed when the problem is corrected.
void * CDECL operator new(size_t size) throw (std::bad_alloc) {
return safe_Malloc(size);
}
#endif

// This function is called at the beginning of an entry point.
// Entry points are functions which are declared:
// 1. CALLBACK,
Expand Down
2 changes: 1 addition & 1 deletion jdk/test/TEST.ROOT
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# A "headful" test requires a graphical environment to meaningfully
# run. Tests that are not headful are "headless."

keys=2d dnd i18n intermittent randomness headful jfr
keys=2d dnd i18n intermittent randomness headful jfr printer

# Tests that must run in othervm mode
othervm.dirs=java/awt java/beans java/rmi javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces sun/rmi
Expand Down

0 comments on commit 00a32da

Please sign in to comment.