ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ConcurrentHashMapTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ConcurrentHashMapTest.java (file contents):
Revision 1.14 by jsr166, Mon Nov 2 20:28:31 2009 UTC vs.
Revision 1.15 by jsr166, Mon Nov 16 04:57:10 2009 UTC

# Line 93 | Line 93 | public class ConcurrentHashMapTest exten
93          ConcurrentHashMap map = map5();
94          Enumeration e = map.elements();
95          int count = 0;
96 <        while(e.hasMoreElements()){
96 >        while (e.hasMoreElements()){
97              count++;
98              e.nextElement();
99          }
# Line 128 | Line 128 | public class ConcurrentHashMapTest exten
128          ConcurrentHashMap map = map5();
129          Enumeration e = map.keys();
130          int count = 0;
131 <        while(e.hasMoreElements()){
131 >        while (e.hasMoreElements()){
132              count++;
133              e.nextElement();
134          }
# Line 351 | Line 351 | public class ConcurrentHashMapTest exten
351          try {
352              new ConcurrentHashMap(-1,0,1);
353              shouldThrow();
354 <        } catch(IllegalArgumentException e){}
354 >        } catch (IllegalArgumentException e){}
355      }
356  
357      /**
# Line 361 | Line 361 | public class ConcurrentHashMapTest exten
361          try {
362              new ConcurrentHashMap(1,0,-1);
363              shouldThrow();
364 <        } catch(IllegalArgumentException e){}
364 >        } catch (IllegalArgumentException e){}
365      }
366  
367      /**
# Line 371 | Line 371 | public class ConcurrentHashMapTest exten
371          try {
372              new ConcurrentHashMap(-1);
373              shouldThrow();
374 <        } catch(IllegalArgumentException e){}
374 >        } catch (IllegalArgumentException e){}
375      }
376  
377      /**
# Line 382 | Line 382 | public class ConcurrentHashMapTest exten
382              ConcurrentHashMap c = new ConcurrentHashMap(5);
383              c.get(null);
384              shouldThrow();
385 <        } catch(NullPointerException e){}
385 >        } catch (NullPointerException e){}
386      }
387  
388      /**
# Line 393 | Line 393 | public class ConcurrentHashMapTest exten
393              ConcurrentHashMap c = new ConcurrentHashMap(5);
394              c.containsKey(null);
395              shouldThrow();
396 <        } catch(NullPointerException e){}
396 >        } catch (NullPointerException e){}
397      }
398  
399      /**
# Line 404 | Line 404 | public class ConcurrentHashMapTest exten
404              ConcurrentHashMap c = new ConcurrentHashMap(5);
405              c.containsValue(null);
406              shouldThrow();
407 <        } catch(NullPointerException e){}
407 >        } catch (NullPointerException e){}
408      }
409  
410      /**
# Line 415 | Line 415 | public class ConcurrentHashMapTest exten
415              ConcurrentHashMap c = new ConcurrentHashMap(5);
416              c.contains(null);
417              shouldThrow();
418 <        } catch(NullPointerException e){}
418 >        } catch (NullPointerException e){}
419      }
420  
421      /**
# Line 426 | Line 426 | public class ConcurrentHashMapTest exten
426              ConcurrentHashMap c = new ConcurrentHashMap(5);
427              c.put(null, "whatever");
428              shouldThrow();
429 <        } catch(NullPointerException e){}
429 >        } catch (NullPointerException e){}
430      }
431  
432      /**
# Line 437 | Line 437 | public class ConcurrentHashMapTest exten
437              ConcurrentHashMap c = new ConcurrentHashMap(5);
438              c.put("whatever", null);
439              shouldThrow();
440 <        } catch(NullPointerException e){}
440 >        } catch (NullPointerException e){}
441      }
442  
443      /**
# Line 448 | Line 448 | public class ConcurrentHashMapTest exten
448              ConcurrentHashMap c = new ConcurrentHashMap(5);
449              c.putIfAbsent(null, "whatever");
450              shouldThrow();
451 <        } catch(NullPointerException e){}
451 >        } catch (NullPointerException e){}
452      }
453  
454      /**
# Line 459 | Line 459 | public class ConcurrentHashMapTest exten
459              ConcurrentHashMap c = new ConcurrentHashMap(5);
460              c.replace(null, "whatever");
461              shouldThrow();
462 <        } catch(NullPointerException e){}
462 >        } catch (NullPointerException e){}
463      }
464  
465      /**
# Line 470 | Line 470 | public class ConcurrentHashMapTest exten
470              ConcurrentHashMap c = new ConcurrentHashMap(5);
471              c.replace(null, one, "whatever");
472              shouldThrow();
473 <        } catch(NullPointerException e){}
473 >        } catch (NullPointerException e){}
474      }
475  
476      /**
# Line 481 | Line 481 | public class ConcurrentHashMapTest exten
481              ConcurrentHashMap c = new ConcurrentHashMap(5);
482              c.putIfAbsent("whatever", null);
483              shouldThrow();
484 <        } catch(NullPointerException e){}
484 >        } catch (NullPointerException e){}
485      }
486  
487  
# Line 493 | Line 493 | public class ConcurrentHashMapTest exten
493              ConcurrentHashMap c = new ConcurrentHashMap(5);
494              c.replace("whatever", null);
495              shouldThrow();
496 <        } catch(NullPointerException e){}
496 >        } catch (NullPointerException e){}
497      }
498  
499      /**
# Line 504 | Line 504 | public class ConcurrentHashMapTest exten
504              ConcurrentHashMap c = new ConcurrentHashMap(5);
505              c.replace("whatever", null, "A");
506              shouldThrow();
507 <        } catch(NullPointerException e){}
507 >        } catch (NullPointerException e){}
508      }
509  
510      /**
# Line 515 | Line 515 | public class ConcurrentHashMapTest exten
515              ConcurrentHashMap c = new ConcurrentHashMap(5);
516              c.replace("whatever", one, null);
517              shouldThrow();
518 <        } catch(NullPointerException e){}
518 >        } catch (NullPointerException e){}
519      }
520  
521  
# Line 528 | Line 528 | public class ConcurrentHashMapTest exten
528              c.put("sadsdf", "asdads");
529              c.remove(null);
530              shouldThrow();
531 <        } catch(NullPointerException e){}
531 >        } catch (NullPointerException e){}
532      }
533  
534      /**
# Line 540 | Line 540 | public class ConcurrentHashMapTest exten
540              c.put("sadsdf", "asdads");
541              c.remove(null, "whatever");
542              shouldThrow();
543 <        } catch(NullPointerException e){}
543 >        } catch (NullPointerException e){}
544      }
545  
546      /**
# Line 551 | Line 551 | public class ConcurrentHashMapTest exten
551              ConcurrentHashMap c = new ConcurrentHashMap(5);
552              c.put("sadsdf", "asdads");
553              assertFalse(c.remove("sadsdf", null));
554 <        } catch(NullPointerException e){
554 >        } catch (NullPointerException e){
555              fail();
556          }
557      }
# Line 574 | Line 574 | public class ConcurrentHashMapTest exten
574              assertEquals(q.size(), r.size());
575              assertTrue(q.equals(r));
576              assertTrue(r.equals(q));
577 <        } catch(Exception e){
577 >        } catch (Exception e){
578              e.printStackTrace();
579              unexpectedException();
580          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines