* Bug #13008 fixed - 'help $' now opens the 'Symbols' help page.
+* Bug #13010 fixed - Wrong class was returned by jcompile (with ecj).
+
* Bug #13011 fixed - ilib_compile failed under MacOS X 10.9.
* Bug #13012 fixed - Vectorial export of rotated strings was wrong.
if (isFile) {
return -1;
} else {
- return ScilabClassLoader.loadJavaClass(manager.className, true);
+ if (manager.className != null && !manager.className.isEmpty()) {
+ return ScilabClassLoader.loadJavaClass(manager.className, true);
+ } else {
+ return -1;
+ }
}
} else {
if (!isECJ) {
@Override
public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException {
- if (sibling instanceof SourceString) {
+ if (sibling instanceof SourceString && className != null && className.indexOf('$') == -1) {
this.className = className.replace('/', '.');
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+compiledClass = jcompile("Test", ["public class Test {";
+"public enum foo { ONE, TWO, THREE; }";
+"public static double bar(foo x) { return (double) x.ordinal(); }}"]);
+classObj = compiledClass.class;
+className = classObj.getName(jvoid);
+assert_checkequal(className, "Test");
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+compiledClass = jcompile("Test", ["public class Test {";
+"public enum foo { ONE, TWO, THREE; }";
+"public static double bar(foo x) { return (double) x.ordinal(); }}"]);
+
+classObj = compiledClass.class;
+className = classObj.getName(jvoid);
+assert_checkequal(className, "Test");