Browse Source

REPORT-13402 【阻塞】【10.0.2回归】公式面板点不开=>调整代码

bugfix/10.0
plough 6 years ago
parent
commit
8ec239644f
  1. 13
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

13
designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

@ -102,8 +102,15 @@ public final class FunctionConstants {
} }
private static boolean isCustomFormulaPath(String classFilePath) { private static boolean isCustomFormulaPath(String classFilePath) {
// 除非是代码启动,否则不读取 WEB-INF/classes/com/fr/function 目录下的类 return !isJarPath(classFilePath) && isDebugMode();
return !classFilePath.contains("!/") && GeneralUtils.readBuildNO().contains("-"); }
private static boolean isDebugMode() {
return !GeneralUtils.readBuildNO().contains("-");
}
private static boolean isJarPath(String classFilePath) {
return classFilePath.contains("!/");
} }
/** /**
@ -152,7 +159,7 @@ public final class FunctionConstants {
* alex:如果是jar包中的class文件 * alex:如果是jar包中的class文件
* file:/D:/opt/FineReport6.5/WebReport/WEB-INF/lib/fr-server-6.5.jar!/com/fr/rpt/script/function * file:/D:/opt/FineReport6.5/WebReport/WEB-INF/lib/fr-server-6.5.jar!/com/fr/rpt/script/function
*/ */
if (filePath.contains("!/")) { if (isJarPath(filePath)) {
String[] arr = filePath.split("!/"); String[] arr = filePath.split("!/");
String jarPath = arr[0].substring(6); // alex:substring(6)去掉前面的file:/这六个字符 String jarPath = arr[0].substring(6); // alex:substring(6)去掉前面的file:/这六个字符
String classPath = arr[1]; String classPath = arr[1];

Loading…
Cancel
Save