581 |
|
TreeMap c = map5(); |
582 |
|
c.get(null); |
583 |
|
shouldThrow(); |
584 |
< |
} catch(NullPointerException e){} |
584 |
> |
} catch (NullPointerException e){} |
585 |
|
} |
586 |
|
|
587 |
|
/** |
592 |
|
TreeMap c = map5(); |
593 |
|
c.containsKey(null); |
594 |
|
shouldThrow(); |
595 |
< |
} catch(NullPointerException e){} |
595 |
> |
} catch (NullPointerException e){} |
596 |
|
} |
597 |
|
|
598 |
|
/** |
604 |
|
c.put("sadsdf", "asdads"); |
605 |
|
c.remove(null); |
606 |
|
shouldThrow(); |
607 |
< |
} catch(NullPointerException e){} |
607 |
> |
} catch (NullPointerException e){} |
608 |
|
} |
609 |
|
|
610 |
|
/** |
625 |
|
assertEquals(q.size(), r.size()); |
626 |
|
assertTrue(q.equals(r)); |
627 |
|
assertTrue(r.equals(q)); |
628 |
< |
} catch(Exception e){ |
628 |
> |
} catch (Exception e){ |
629 |
|
e.printStackTrace(); |
630 |
|
unexpectedException(); |
631 |
|
} |
816 |
|
NavigableMap<Integer, Integer> result = null; |
817 |
|
try { |
818 |
|
result = (NavigableMap<Integer, Integer>) cl.newInstance(); |
819 |
< |
} catch(Exception e) { |
819 |
> |
} catch (Exception e) { |
820 |
|
fail(); |
821 |
|
} |
822 |
|
assertEquals(result.size(), 0); |
841 |
|
} |
842 |
|
|
843 |
|
// Remove a bunch of entries with iterator |
844 |
< |
for(Iterator<Integer> it = map.keySet().iterator(); it.hasNext(); ) { |
844 |
> |
for (Iterator<Integer> it = map.keySet().iterator(); it.hasNext(); ) { |
845 |
|
if (rnd.nextBoolean()) { |
846 |
|
bs.clear(it.next()); |
847 |
|
it.remove(); |
866 |
|
} |
867 |
|
|
868 |
|
// Remove a bunch of entries with iterator |
869 |
< |
for(Iterator<Integer> it = map.keySet().iterator(); it.hasNext(); ) { |
869 |
> |
for (Iterator<Integer> it = map.keySet().iterator(); it.hasNext(); ) { |
870 |
|
if (rnd.nextBoolean()) { |
871 |
|
bs.clear(it.next()); |
872 |
|
it.remove(); |
882 |
|
try { |
883 |
|
map.put(key, 2 * key); |
884 |
|
fail(); |
885 |
< |
} catch(IllegalArgumentException e) { |
885 |
> |
} catch (IllegalArgumentException e) { |
886 |
|
// expected |
887 |
|
} |
888 |
|
} |
1080 |
|
try { |
1081 |
|
map.firstKey(); |
1082 |
|
fail(); |
1083 |
< |
} catch(NoSuchElementException e) { |
1083 |
> |
} catch (NoSuchElementException e) { |
1084 |
|
// expected |
1085 |
|
} |
1086 |
|
try { |
1087 |
|
map.lastKey(); |
1088 |
|
fail(); |
1089 |
< |
} catch(NoSuchElementException e) { |
1089 |
> |
} catch (NoSuchElementException e) { |
1090 |
|
// expected |
1091 |
|
} |
1092 |
|
} |