Skip to content

Commit

Permalink
8221398: Move test NoClassDefFoundMsg.java to subdir exceptionMsgs/
Browse files Browse the repository at this point in the history
Reviewed-by: coleenp
  • Loading branch information
GoeLin committed Mar 28, 2019
1 parent caa5387 commit 2da45f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
Expand Down Expand Up @@ -28,18 +28,18 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.compiler
* @run main/native NoClassDefFoundMsg
* @run main/native NoClassDefFoundErrorTest
*/

import jdk.test.lib.compiler.InMemoryJavaCompiler;
import jdk.internal.misc.Unsafe;

public class NoClassDefFoundMsg {
public class NoClassDefFoundErrorTest {

static native void callDefineClass(String className);
static native void callFindClass(String className);
static {
System.loadLibrary("NoClassDefFoundMsg");
System.loadLibrary("NoClassDefFoundErrorTest");
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, 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
Expand All @@ -24,13 +24,13 @@
#include <jni.h>

JNIEXPORT void JNICALL
Java_NoClassDefFoundMsg_callDefineClass(JNIEnv *env, jclass klass, jstring className) {
Java_NoClassDefFoundErrorTest_callDefineClass(JNIEnv *env, jclass klass, jstring className) {
const char *c_name = (*env)->GetStringUTFChars(env, className, NULL);
(*env)->DefineClass(env, c_name, NULL, NULL, 0);
}

JNIEXPORT void JNICALL
Java_NoClassDefFoundMsg_callFindClass(JNIEnv *env, jclass klass, jstring className) {
Java_NoClassDefFoundErrorTest_callFindClass(JNIEnv *env, jclass klass, jstring className) {
const char *c_name;
jclass cls;
if (className == NULL) {
Expand Down

0 comments on commit 2da45f1

Please sign in to comment.