Browse Source

Merge pull request #861 in BA/design from ~HZZZ/design:fix-REPORT-2600 to dev

* commit '8b8e30196ba1b8e8a7381db9b1b1d694fdef27c0':
  remove unused code
  fix
master
superman 8 years ago
parent
commit
1f72d549e9
  1. 10
      designer_base/src/com/fr/design/data/DesignTableDataManager.java

10
designer_base/src/com/fr/design/data/DesignTableDataManager.java

@ -381,9 +381,7 @@ public abstract class DesignTableDataManager {
Env currentEnv = FRContext.getCurrentEnv(); Env currentEnv = FRContext.getCurrentEnv();
ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata); ParameterProvider[] parameters = currentEnv.getTableDataParameters(tabledata);
if (ArrayUtils.isEmpty(parameters)) { if (ArrayUtils.isEmpty(parameters)) {
ParameterProvider[] tableDataParameter = tabledata.getParameters(Calculator.createCalculator()); parameters = tabledata.getParameters(Calculator.createCalculator());
checkArgument(!ArrayUtils.isEmpty(tableDataParameter), "both parameters and tableDataParameter are empty");
parameters = tableDataParameter;
} }
boolean hasValue = true; boolean hasValue = true;
for (ParameterProvider parameter : parameters) { for (ParameterProvider parameter : parameters) {
@ -493,10 +491,4 @@ public abstract class DesignTableDataManager {
public static void setThreadLocal(String value) { public static void setThreadLocal(String value) {
threadLocal.set(value); threadLocal.set(value);
} }
private static void checkArgument(boolean expression, String errorMessage) {
if (!expression) {
throw new IllegalArgumentException(errorMessage);
}
}
} }
Loading…
Cancel
Save