|
8 | 8 | import hudson.util.Secret;
|
9 | 9 | import org.jenkinsci.plugins.database.AbstractRemoteDatabase;
|
10 | 10 | import org.jenkinsci.plugins.database.AbstractRemoteDatabaseDescriptor;
|
11 |
| -import org.jenkinsci.plugins.database.BasicDataSource2; |
12 |
| -import org.jenkinsci.plugins.database.Database; |
13 |
| -import org.jenkinsci.plugins.database.DatabaseDescriptor; |
14 | 11 | import org.kohsuke.stapler.DataBoundConstructor;
|
15 | 12 | import org.kohsuke.stapler.QueryParameter;
|
16 | 13 |
|
17 |
| -import javax.sql.DataSource; |
18 | 14 | import java.io.IOException;
|
19 | 15 | import java.io.InputStreamReader;
|
20 |
| -import java.sql.Connection; |
21 |
| -import java.sql.SQLException; |
| 16 | +import java.nio.charset.Charset; |
22 | 17 | import java.util.Map;
|
23 | 18 | import java.util.Properties;
|
24 | 19 | import java.util.Set;
|
@@ -57,7 +52,8 @@ public FormValidation doCheckProperties(@QueryParameter String properties) throw
|
57 | 52 | if (validPropertyNames==null) {
|
58 | 53 | // this computation depends on the implementation details of MySQL JDBC connector
|
59 | 54 | GroovyShell gs = new GroovyShell(getClass().getClassLoader());
|
60 |
| - validPropertyNames = (Set<String>)gs.evaluate(new InputStreamReader(MySQLDatabase.class.getResourceAsStream("validate.groovy"))); |
| 55 | + validPropertyNames = (Set<String>) gs.evaluate ( new InputStreamReader ( MySQLDatabase.class.getResourceAsStream ( "validate.groovy" ), |
| 56 | + Charset.forName ( "UTF-8" ) ) ); |
61 | 57 | }
|
62 | 58 | Properties props = Util.loadProperties(properties);
|
63 | 59 | for (Map.Entry e : props.entrySet()) {
|
|
0 commit comments