1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17+
1718package org .apache .commons .beanutils .bugs ;
1819
19- import static org .junit .Assert .assertEquals ;
20+ import static org .junit .jupiter . api . Assertions .assertEquals ;
2021
2122import java .beans .BeanInfo ;
2223import java .beans .IndexedPropertyDescriptor ;
2627import java .util .List ;
2728
2829import org .apache .commons .beanutils .PropertyUtils ;
29- import org .junit .Assert ;
30- import org .junit .Assume ;
30+ import org .junit .jupiter . api . Assertions ;
31+ import org .junit .jupiter . api . Assumptions ;
3132import org .junit .jupiter .api .BeforeAll ;
3233import org .junit .jupiter .api .Test ;
3334
@@ -37,8 +38,7 @@ class FirstChildBean extends RootBean {
3738/**
3839 * getPropertyType return null on second descendant class
3940 * <p>
40- * This test only work in Java 7 or earlier (See BEANUTILS-492) - as
41- * a weaker alternative, see {@link Jira422bTestCase}.
41+ * This test only work in Java 7 or earlier (See BEANUTILS-492) - as a weaker alternative, see {@link Jira422bTestCase}.
4242 *
4343 *
4444 * @see <a href="https://issues.apache.org/jira/browse/BEANUTILS-422">https://issues.apache.org/jira/browse/BEANUTILS-422</a>
@@ -55,12 +55,12 @@ public static void assumeSupportsIndexedLists() throws IntrospectionException {
5555 final BeanInfo beanInfo = Introspector .getBeanInfo (RootBean .class );
5656 for (final PropertyDescriptor pd : beanInfo .getPropertyDescriptors ()) {
5757 if (pd .getName ().equals ("file" )) {
58- Assume .assumeTrue ("BEANUTILS-492: IndexedPropertyDescriptor no longer supported for java.util.List" ,
59- pd instanceof IndexedPropertyDescriptor );
58+ Assumptions .assumeTrue (pd instanceof IndexedPropertyDescriptor ,
59+ "BEANUTILS-492: IndexedPropertyDescriptor no longer supported for java.util.List" );
6060 return ;
6161 }
6262 }
63- Assert .fail ("Could not find PropertyDescriptor for 'file'" );
63+ Assertions .fail ("Could not find PropertyDescriptor for 'file'" );
6464 }
6565
6666 @ Test
@@ -76,7 +76,6 @@ public void testSecondChildBean() throws Exception {
7676 final Class <?> propertyType = PropertyUtils .getPropertyType (bean , "file[0]" );
7777 assertEquals (String .class .getName (), propertyType .getName ());
7878 }
79-
8079}
8180
8281@ SuppressWarnings ("rawtypes" )
@@ -100,7 +99,6 @@ public void setFile(final int i, final String file) {
10099 public void setFile (final List file ) {
101100 this .file = file ;
102101 }
103-
104102}
105103
106104class SecondChildBean extends RootBean {
0 commit comments