Skip to content

Commit 779679b

Browse files
committed
No need to check the class type.
1 parent 3d4d149 commit 779679b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/main/java/org/apache/ibatis/scripting/LanguageDriverRegistry.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ public void register(Class<?> cls) {
3131
if (cls == null) {
3232
throw new IllegalArgumentException("null is not a valid Language Driver");
3333
}
34-
if (!LanguageDriver.class.isAssignableFrom(cls)) {
35-
throw new ScriptingException(cls.getName() + " does not implement " + LanguageDriver.class.getName());
36-
}
3734
LanguageDriver driver = LANGUAGE_DRIVER_MAP.get(cls);
3835
if (driver == null) {
3936
try {
@@ -49,9 +46,6 @@ public void register(LanguageDriver instance) {
4946
if (instance == null) {
5047
throw new IllegalArgumentException("null is not a valid Language Driver");
5148
}
52-
if (!LanguageDriver.class.isAssignableFrom(instance.getClass())) {
53-
throw new ScriptingException(instance.getClass().getName() + " does not implement " + LanguageDriver.class.getName());
54-
}
5549
LanguageDriver driver = LANGUAGE_DRIVER_MAP.get(instance.getClass());
5650
if (driver == null) {
5751
LANGUAGE_DRIVER_MAP.put(instance.getClass(), driver);

0 commit comments

Comments
 (0)