mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-03 19:48:46 +00:00
8034209: [parfait] JNI exception pending in jdk/src/macosx/native/sun/awt/CClipboard.m
Reviewed-by: pchelko, azvegint
This commit is contained in:
parent
6ec334fede
commit
17b69ca45d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 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
|
||||
@ -23,14 +23,13 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "CClipboard.h"
|
||||
#include "CDataTransferer.h"
|
||||
#import "CClipboard.h"
|
||||
#import "CDataTransferer.h"
|
||||
#import "ThreadUtilities.h"
|
||||
#import "jni_util.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <JavaNativeFoundation/JavaNativeFoundation.h>
|
||||
|
||||
#include "ThreadUtilities.h"
|
||||
|
||||
|
||||
static CClipboard *sClipboard = nil;
|
||||
|
||||
//
|
||||
@ -246,6 +245,7 @@ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CClipboard_setData
|
||||
JNF_COCOA_ENTER(env);
|
||||
jint nBytes = (*env)->GetArrayLength(env, inBytes);
|
||||
jbyte *rawBytes = (*env)->GetPrimitiveArrayCritical(env, inBytes, NULL);
|
||||
CHECK_NULL(rawBytes);
|
||||
NSData *bytesAsData = [NSData dataWithBytes:rawBytes length:nBytes];
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, inBytes, rawBytes, JNI_ABORT);
|
||||
NSString *format = formatForIndex(inFormat);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user