mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
java/io bugfixes and coverage; jni bugfixes; minor refactoring
This commit is contained in:
21
classpath/java-lang.cpp
Normal file
21
classpath/java-lang.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "string.h"
|
||||
#include "jni.h"
|
||||
|
||||
#undef JNIEXPORT
|
||||
#define JNIEXPORT __attribute__ ((visibility("default")))
|
||||
|
||||
extern "C" JNIEXPORT jstring JNICALL
|
||||
Java_java_lang_System_getProperty(JNIEnv* e, jclass, jstring key)
|
||||
{
|
||||
jstring value = 0;
|
||||
|
||||
const char* chars = e->GetStringUTFChars(key, 0);
|
||||
if (chars) {
|
||||
if (strcmp(chars, "line.separator") == 0) {
|
||||
value = e->NewStringUTF("\n");
|
||||
}
|
||||
e->ReleaseStringUTFChars(key, chars);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
Reference in New Issue
Block a user