Browse Source

Merge pull request #1043 in DESIGN/design from ~ZACK/design:feature/10.0 to feature/10.0

* commit 'd142338abffcc1e63221e5819032b97b9525ca75':
  REPORT-20318 sonar问题修复
persist/11.0
zack 5 years ago
parent
commit
c44a5d5029
  1. 9
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  2. 1
      designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
  3. 14
      designer-base/src/main/java/com/fr/design/formula/VariableResolverAdapter.java

9
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -5,17 +5,15 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.CloudCenter;
import com.fr.general.CommonIOUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.PluginStoreConstants;
import com.fr.plugin.PluginVerifyException;
import com.fr.stable.CommonUtils;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
@ -280,7 +278,10 @@ public class WebViewDlgHelper {
PluginStoreConstants.refreshProps(); // 下载完刷新一下版本号等
JOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Plugin_Shop_Installed"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.INFORMATION_MESSAGE);
}
} catch (InterruptedException | ExecutionException e) {
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
Thread.currentThread().interrupt();
} catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

1
designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java

@ -194,6 +194,7 @@ public class JavaEditorPane extends BasicPane {
JOptionPane.showMessageDialog(null, message);
} catch (InterruptedException e1) {
FineLoggerFactory.getLogger().error(e1.getMessage(), e1);
Thread.currentThread().interrupt();
} catch (ExecutionException e1) {
FineLoggerFactory.getLogger().error(e1.getMessage(), e1);
}

14
designer-base/src/main/java/com/fr/design/formula/VariableResolverAdapter.java

@ -23,6 +23,7 @@ public abstract class VariableResolverAdapter implements VariableResolver {
*
* @return 内置参数
*/
@Override
public String[] resolveCurReportVariables() {
String[] variables = new String[]{
ScriptConstants.SUMMARY_TAG + "page_number",
@ -38,10 +39,10 @@ public abstract class VariableResolverAdapter implements VariableResolver {
CalculatorProvider.SERVER_PORT, CalculatorProvider.SERVER_URL, CalculatorProvider.CONTEXT_PATH, CalculatorProvider.SESSION_ID
};
Set<BuiltInParametersProvider> set = ExtraClassManager.getInstance().getArray(BuiltInParametersProvider.XML_TAG);
for (BuiltInParametersProvider provider : set) {
return (String[]) ArrayUtils.addAll(variables, new String[]{
ScriptConstants.DETAIL_TAG + provider.getParametersName()
});
for (BuiltInParametersProvider provider : set) {
ArrayUtils.addAll(variables, new String[]{
ScriptConstants.DETAIL_TAG + provider.getParametersName()
});
}
return variables;
}
@ -65,6 +66,8 @@ public abstract class VariableResolverAdapter implements VariableResolver {
*
* @return 所有参数
*/
@Override
@SuppressWarnings("squid:S2259")
public String[] resolveTableDataParameterVariables() {
Parameter[] parameters = getCurrentModeParameters(TABLE_DATA_PARA);
String[] parameterNames = new String[parameters.length];
@ -79,6 +82,8 @@ public abstract class VariableResolverAdapter implements VariableResolver {
*
* @return 所有参数
*/
@Override
@SuppressWarnings("squid:S2259")
public String[] resolveReportParameterVariables() {
Parameter[] parameters = getCurrentModeParameters(REPORT_DATA_PARA);
String[] parameterNames = new String[parameters.length];
@ -93,6 +98,7 @@ public abstract class VariableResolverAdapter implements VariableResolver {
*
* @return 所有参数
*/
@Override
public String[] resolveGlobalParameterVariables() {
// 加上全局的参数
Parameter[] globalParameters = ParameterConfig.getInstance().getGlobalParameters();

Loading…
Cancel
Save