File tree 1 file changed +5
-5
lines changed
src/test/java/org/apache/commons/net 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public void testAddresses() {
51
51
SubnetUtils utils = new SubnetUtils ("192.168.0.1/29" );
52
52
SubnetInfo info = utils .getInfo ();
53
53
assertTrue (info .isInRange ("192.168.0.1" ));
54
- // We dont count the broadcast address as usable
54
+ // We don't count the broadcast address as usable
55
55
assertFalse (info .isInRange ("192.168.0.7" ));
56
56
assertFalse (info .isInRange ("192.168.0.8" ));
57
57
assertFalse (info .isInRange ("10.10.2.1" ));
@@ -61,11 +61,11 @@ public void testAddresses() {
61
61
62
62
public void testZeroNetmaskBits () {
63
63
try {
64
- SubnetUtils utils = new SubnetUtils ("192.168.0.1/0" );
65
- assertTrue ("/0 should be an invalid mask" , false );
64
+ @ SuppressWarnings ("unused" )
65
+ SubnetUtils utils = new SubnetUtils ("192.168.0.1/0" );
66
+ fail ("Mask /0 should have generated an IllegalArgumentException" );
66
67
}
67
- catch (Exception e ) {
68
- ;
68
+ catch (IllegalArgumentException expected ) {
69
69
}
70
70
}
71
71
}
You can’t perform that action at this time.
0 commit comments