Skip to content

Commit 7edf8ac

Browse files
committed
Drop DefaultNamespaceHandlerResolverTests.testResolveInvalidHandler
Closes gh-22994
1 parent 52e02de commit 7edf8ac

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

spring-beans/src/test/java/org/springframework/beans/factory/xml/support/DefaultNamespaceHandlerResolverTests.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ public void testResolvedMappedHandlerWithNoArgCtor() {
4949
}
5050

5151
@Test
52-
public void testNonExistentHandlerClass() throws Exception {
52+
public void testNonExistentHandlerClass() {
5353
String mappingPath = "org/springframework/beans/factory/xml/support/nonExistent.properties";
5454
try {
5555
new DefaultNamespaceHandlerResolver(getClass().getClassLoader(), mappingPath);
@@ -61,29 +61,18 @@ public void testNonExistentHandlerClass() throws Exception {
6161
}
6262

6363
@Test
64-
public void testResolveInvalidHandler() throws Exception {
65-
String mappingPath = "org/springframework/beans/factory/xml/support/invalid.properties";
66-
try {
67-
new DefaultNamespaceHandlerResolver(getClass().getClassLoader(), mappingPath);
68-
fail("Should not be able to map a class that doesn't implement NamespaceHandler");
69-
}
70-
catch (Throwable expected) {
71-
}
72-
}
73-
74-
@Test
75-
public void testCtorWithNullClassLoaderArgument() throws Exception {
64+
public void testCtorWithNullClassLoaderArgument() {
7665
// simply must not bail...
7766
new DefaultNamespaceHandlerResolver(null);
7867
}
7968

8069
@Test(expected = IllegalArgumentException.class)
81-
public void testCtorWithNullClassLoaderArgumentAndNullMappingLocationArgument() throws Exception {
70+
public void testCtorWithNullClassLoaderArgumentAndNullMappingLocationArgument() {
8271
new DefaultNamespaceHandlerResolver(null, null);
8372
}
8473

8574
@Test
86-
public void testCtorWithNonExistentMappingLocationArgument() throws Exception {
75+
public void testCtorWithNonExistentMappingLocationArgument() {
8776
// simply must not bail; we don't want non-existent resources to result in an Exception
8877
new DefaultNamespaceHandlerResolver(null, "738trbc bobabloobop871");
8978
}

0 commit comments

Comments
 (0)