32
32
*/
33
33
public class XMLMapperEntityResolver implements EntityResolver {
34
34
35
- private static final String IBATIS_CONFIG_SYSTEM = "ibatis-3-config.dtd" . toUpperCase ( Locale . ENGLISH ) ;
36
- private static final String IBATIS_MAPPER_SYSTEM = "ibatis-3-mapper.dtd" . toUpperCase ( Locale . ENGLISH ) ;
37
- private static final String MYBATIS_CONFIG_SYSTEM = "mybatis-3-config.dtd" . toUpperCase ( Locale . ENGLISH ) ;
38
- private static final String MYBATIS_MAPPER_SYSTEM = "mybatis-3-mapper.dtd" . toUpperCase ( Locale . ENGLISH ) ;
35
+ private static final String IBATIS_CONFIG_SYSTEM = "ibatis-3-config.dtd" ;
36
+ private static final String IBATIS_MAPPER_SYSTEM = "ibatis-3-mapper.dtd" ;
37
+ private static final String MYBATIS_CONFIG_SYSTEM = "mybatis-3-config.dtd" ;
38
+ private static final String MYBATIS_MAPPER_SYSTEM = "mybatis-3-mapper.dtd" ;
39
39
40
40
private static final String MYBATIS_CONFIG_DTD = "org/apache/ibatis/builder/xml/mybatis-3-config.dtd" ;
41
41
private static final String MYBATIS_MAPPER_DTD = "org/apache/ibatis/builder/xml/mybatis-3-mapper.dtd" ;
@@ -53,10 +53,10 @@ public class XMLMapperEntityResolver implements EntityResolver {
53
53
public InputSource resolveEntity (String publicId , String systemId ) throws SAXException {
54
54
try {
55
55
if (systemId != null ) {
56
- systemId = systemId .toUpperCase (Locale .ENGLISH );
57
- if (systemId .contains (MYBATIS_CONFIG_SYSTEM ) || systemId .contains (IBATIS_CONFIG_SYSTEM )) {
56
+ String lowerCaseSystemId = systemId .toLowerCase (Locale .ENGLISH );
57
+ if (lowerCaseSystemId .contains (MYBATIS_CONFIG_SYSTEM ) || lowerCaseSystemId .contains (IBATIS_CONFIG_SYSTEM )) {
58
58
return getInputSource (MYBATIS_CONFIG_DTD , publicId , systemId );
59
- } else if (systemId .contains (MYBATIS_MAPPER_SYSTEM ) || systemId .contains (IBATIS_MAPPER_SYSTEM )) {
59
+ } else if (lowerCaseSystemId .contains (MYBATIS_MAPPER_SYSTEM ) || lowerCaseSystemId .contains (IBATIS_MAPPER_SYSTEM )) {
60
60
return getInputSource (MYBATIS_MAPPER_DTD , publicId , systemId );
61
61
}
62
62
}
0 commit comments