Browse Source

REPORT-14092 [FindBugs问题修复]

bugfix/10.0
kerry 6 years ago
parent
commit
de464beffa
  1. 7
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

7
designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

@ -9,6 +9,7 @@ import com.fr.design.utils.DesignUtils;
import com.fr.file.FILE;
import com.fr.file.FileNodeFILE;
import com.fr.general.GeneralUtils;
import com.fr.general.web.ParameterConstants;
import com.fr.stable.project.ProjectConstants;
import com.fr.stable.web.AbstractWebletCreator;
@ -26,7 +27,11 @@ public final class WebPreviewUtils {
@SuppressWarnings("unchecked")
public static void preview(JTemplate<?, ?> jt, PreviewProvider provider) {
String baseRoute = jt.route();
actionPerformed(jt, baseRoute, provider == null ? Collections.EMPTY_MAP : provider.parametersForPreview(), provider.getActionType());
if (provider == null) {
actionPerformed(jt, baseRoute, Collections.EMPTY_MAP, ParameterConstants.VIEWLET);
} else {
actionPerformed(jt, baseRoute, provider.parametersForPreview(), provider.getActionType());
}
}
private static void actionPerformed(JTemplate<?, ?> jt, String baseRoute, Map<String, Object> map, String actionType) {

Loading…
Cancel
Save