diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java index c4996d539e..c827a17ebe 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java @@ -251,7 +251,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener { private static Parameter[] processParameters(DBTableData tableData, Calculator calculator) { ParameterProvider[] parameters = tableData.getParameters(); if (parameters == null || parameters.length == 0) { - tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQuery(), false)); + tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQueryWithoutComments(), false)); return new Parameter[0]; } return Parameter.providers2Parameter(Calculator.processParameters(calculator, parameters)); diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java index a4ddfcd4e8..e2c94a8f10 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java @@ -88,8 +88,9 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { MessageRecorderFactory.getInstance().syncSubmit(message); } } - } catch (Exception ignore) { + } catch (Exception ex) { //埋点信息入库失败应该不能影响业务流程 + FineLoggerFactory.getLogger().debug("[Metric] failed to log message.", ex); } finally { sessionBinder.detachSession(); } @@ -113,7 +114,11 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { } public static void recordSQLDetail(String uuid) { - DBMeterFactory.getMeter().submit(uuid); + try { + DBMeterFactory.getMeter().submit(uuid); + } catch (Exception e) { + FineLoggerFactory.getLogger().debug("[Metric] failed to log sql detail.", e); + } } public static void recordSQL(Compute once, MeasureObject measureObject) { diff --git a/designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java b/designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java index bc4f3f41cc..f24fed4ba0 100644 --- a/designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/style/background/image/ImagePreviewPane.java @@ -9,6 +9,7 @@ import com.fr.base.Style; import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.general.ImageWithSuffix; +import com.fr.log.FineLoggerFactory; import com.fr.stable.CoreGraphHelper; import javax.swing.JComponent; @@ -92,9 +93,14 @@ public class ImagePreviewPane extends JComponent implements Scrollable, ImagePre isLoading = false; CoreGraphHelper.waitForImage(image); - imageWidth = image.getWidth(null); - imageHeight = image.getHeight(null); - + if (image.getFineImage() != null && image.getImage() != null) { + try { + imageWidth = image.getWidth(null); + imageHeight = image.getHeight(null); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } this.setToolTipText("Image Size: " + imageWidth + "x" + imageHeight + "px"); } fireChangeListener(); diff --git a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java index cab7037cd2..dd7617d95c 100644 --- a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java +++ b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java @@ -49,7 +49,7 @@ public class EnvChangeEntranceTest { EasyMock.expect(selectedEnv.getRemindTime()).andReturn(null); FunctionalHttpRequest request = EasyMock.mock(FunctionalHttpRequest.class); - EasyMock.expect(request.getServiceList()).andReturn(null); + EasyMock.expect(request.getServiceList(connectionInfo)).andReturn(null); PowerMock.expectNew(FunctionalHttpRequest.class, connectionInfo).andReturn(request).anyTimes(); EasyMock.expect(request.getServerBranch()).andReturn(remoteBranch); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java index 900072b7c0..583346868b 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java @@ -27,7 +27,7 @@ public class ComboBoxDefinePane extends DictEditorDefinePane { public Component[] createWaterMarkPane() { waterMarkField = new UITextField(); - return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_WaterMark")), waterMarkField}; + return new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_PlaceHolder")), waterMarkField}; } protected void populateSubDictionaryEditorBean(ComboBox ob){