-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8-pool, 11, 17, 19, 20
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
JNI headers generator maps classnames to headers names by replasing all dots (.) to underscores (_) in full classname.
Compiler doesn't handle case when several classes mapped into same header.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
File example.java:
package com;
class example { native void x(); }
File com_example.java
// no package
class com_example { native void y(); }
run: javac -h include example.java com_example.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
File com_example.h:
JNIEXPORT void JNICALL Java_com_example_x(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_1example_y(JNIEnv *, jobject);
ACTUAL -
File com_example.h:
// functions only from last file in list
JNIEXPORT void JNICALL Java_com_1example_y(JNIEnv *, jobject);
FREQUENCY : always
JNI headers generator maps classnames to headers names by replasing all dots (.) to underscores (_) in full classname.
Compiler doesn't handle case when several classes mapped into same header.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
File example.java:
package com;
class example { native void x(); }
File com_example.java
// no package
class com_example { native void y(); }
run: javac -h include example.java com_example.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
File com_example.h:
JNIEXPORT void JNICALL Java_com_example_x(JNIEnv *, jobject);
JNIEXPORT void JNICALL Java_com_1example_y(JNIEnv *, jobject);
ACTUAL -
File com_example.h:
// functions only from last file in list
JNIEXPORT void JNICALL Java_com_1example_y(JNIEnv *, jobject);
FREQUENCY : always
- duplicates
-
JDK-7016187 `javac -h` could generate conflict .h for inner class and class name with '_'
-
- Resolved
-