|
26 | 26 | import org.apache.ibatis.executor.ErrorContext;
|
27 | 27 | import org.apache.ibatis.executor.loader.ProxyFactory;
|
28 | 28 | import org.apache.ibatis.io.Resources;
|
| 29 | +import org.apache.ibatis.io.VFS; |
| 30 | +import org.apache.ibatis.logging.Log; |
29 | 31 | import org.apache.ibatis.mapping.DatabaseIdProvider;
|
30 | 32 | import org.apache.ibatis.mapping.Environment;
|
31 | 33 | import org.apache.ibatis.parsing.XNode;
|
@@ -139,7 +141,9 @@ private void loadCustomVfs(Properties props) throws ClassNotFoundException {
|
139 | 141 | String[] clazzes = value.split(",");
|
140 | 142 | for (String clazz : clazzes) {
|
141 | 143 | if (!clazz.isEmpty()) {
|
142 |
| - configuration.setVfsImpl(Resources.classForName(clazz)); |
| 144 | + @SuppressWarnings("unchecked") |
| 145 | + Class<? extends VFS> vfsImpl = (Class<? extends VFS>)Resources.classForName(clazz); |
| 146 | + configuration.setVfsImpl(vfsImpl); |
143 | 147 | }
|
144 | 148 | }
|
145 | 149 | }
|
@@ -251,7 +255,9 @@ private void settingsElement(Properties props) throws Exception {
|
251 | 255 | configuration.setDefaultScriptingLanguage(resolveClass(props.getProperty("defaultScriptingLanguage")));
|
252 | 256 | configuration.setCallSettersOnNulls(booleanValueOf(props.getProperty("callSettersOnNulls"), false));
|
253 | 257 | configuration.setLogPrefix(props.getProperty("logPrefix"));
|
254 |
| - configuration.setLogImpl(resolveClass(props.getProperty("logImpl"))); |
| 258 | + @SuppressWarnings("unchecked") |
| 259 | + Class<? extends Log> logImpl = (Class<? extends Log>)resolveClass(props.getProperty("logImpl")); |
| 260 | + configuration.setLogImpl(logImpl); |
255 | 261 | configuration.setConfigurationFactory(resolveClass(props.getProperty("configurationFactory")));
|
256 | 262 | }
|
257 | 263 |
|
|
0 commit comments