From fd16e0c71fd27a2c916bec7edfe85c919ffd3d5b Mon Sep 17 00:00:00 2001 From: xiqiu Date: Fri, 11 Jun 2021 16:16:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-53821=20=20driver=E5=8A=A0=E4=B8=8Atrim?= =?UTF-8?q?=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/JDBCDefPane.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 4331828238..c1afbe137f 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -5,10 +5,10 @@ import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.design.border.UITitledBorder; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -21,17 +21,13 @@ import com.fr.general.ComparatorUtils; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; -import java.awt.event.InputMethodEvent; -import java.awt.event.InputMethodListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.util.regex.Matcher; -import java.util.regex.Pattern; + import javax.swing.BorderFactory; import javax.swing.JFileChooser; import javax.swing.JPanel; import javax.swing.JPasswordField; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -39,13 +35,18 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.InputMethodEvent; +import java.awt.event.InputMethodListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; import java.io.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class JDBCDefPane extends JPanel { public static final String DRIVER_TYPE = "driver_type"; @@ -291,7 +292,7 @@ public class JDBCDefPane extends JPanel { jdbcDatabase = new JDBCDatabaseConnection(); } Object driveItem = this.driverComboBox.getSelectedItem(); - jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString()); + jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString().trim()); jdbcDatabase.setURL(this.urlTextField.getText().trim()); jdbcDatabase.setUser(this.userNameTextField.getText().trim()); jdbcDatabase.setPassword(new String(this.passwordTextField.getPassword()).trim());