Permalink
Browse files

Fixing a bug whereby a compiled library file would not be found if th…

…e case study name had an underscore in it
  • Loading branch information...
philmcminn committed Jan 22, 2017
1 parent 9621094 commit b5fd8e12b56840353b3411113d7171cbd7be2fc8
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/main/java/org/iguanatool/testobject/JNILibrary.java
@@ -80,9 +80,14 @@ private File getLibraryTemplateFile() {
private String getJNIFunctionName() {
JavaWrapper javaWrapper = new JavaWrapper(caseStudy, testObjectName);
- String packageName = javaWrapper.getTestObjectsPackageName().replace(".", "_");
- String safeClassName = testObjectName.replace("_", "_1");
- return "Java_" + packageName + "_" + safeClassName + "_call";
+ // make the underscores safe
+ String packageName = javaWrapper.getTestObjectsPackageName().replace("_", "_1");
+ packageName = packageName.replace(".", "_");
+
+ // make the underscores safe
+ String className = testObjectName.replace("_", "_1");
+
+ return "Java_" + packageName + "_" + className + "_call";
}
public boolean makeLibraryHeaderFile() throws IOException, SystemCommandException {

0 comments on commit b5fd8e1

Please sign in to comment.