Browse Source

REPORT-12850 10.0mac公式不显示

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

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

@ -13,6 +13,7 @@ import com.fr.function.SUM;
import com.fr.function.TIME; import com.fr.function.TIME;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.ExtraClassManager; import com.fr.plugin.ExtraClassManager;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
@ -225,7 +226,14 @@ public abstract class FunctionConstants {
String pkgName = "com.fr.function"; String pkgName = "com.fr.function";
Class<Function> iface = Function.class; Class<Function> iface = Function.class;
ClassLoader classloader = iface.getClassLoader(); ClassLoader classloader = iface.getClassLoader();
URL url = classloader.getResource(pkgName.replace('.', '/')); Enumeration<URL> urlEnumeration = null;
try {
urlEnumeration = classloader.getResources(pkgName.replace('.', '/'));
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
while (urlEnumeration.hasMoreElements()) {
URL url = urlEnumeration.nextElement();
String classFilePath = url.getFile(); String classFilePath = url.getFile();
/* /*
@ -245,6 +253,7 @@ public abstract class FunctionConstants {
for (String fileName : findClassNamesUnderFilePath(classFilePath)) { for (String fileName : findClassNamesUnderFilePath(classFilePath)) {
try { try {
Class<?> cls = Class.forName(pkgName + "." + fileName.substring(0, fileName.length() - 6)); Class<?> cls = Class.forName(pkgName + "." + fileName.substring(0, fileName.length() - 6));
System.out.println(pkgName + "." + fileName.substring(0, fileName.length() - 6));
if (StableUtils.classInstanceOf(cls, iface)) { if (StableUtils.classInstanceOf(cls, iface)) {
Function inst; Function inst;
inst = (Function)cls.newInstance(); inst = (Function)cls.newInstance();
@ -261,4 +270,5 @@ public abstract class FunctionConstants {
} }
} }
} }
}
} }

Loading…
Cancel
Save