@@ -2479,8 +2479,8 @@ public void testNewFlushing() throws Exception {
2479
2479
public void testPersistCollections () throws Exception {
2480
2480
Session s = openSession ();
2481
2481
Transaction txn = s .beginTransaction ();
2482
- assertEquals ( 0 , ( ( Long ) s .createQuery ( "select count(*) from Bar" ).iterate ().next () ). longValue () );
2483
- assertTrue ( s .createQuery ( "select count(*) from Bar b" ).iterate ().next (). equals ( new Long ( 0 ) ) );
2482
+ assertEquals ( 0l , s .createQuery ( "select count(*) from Bar" ).iterate ().next () );
2483
+ assertEquals ( 0l , s .createQuery ( "select count(*) from Bar b" ).iterate ().next () );
2484
2484
assertFalse ( s .createQuery ( "from Glarch g" ).iterate ().hasNext () );
2485
2485
2486
2486
Baz baz = new Baz ();
@@ -2583,7 +2583,7 @@ public void testPersistCollections() throws Exception {
2583
2583
baz .setTopGlarchez ( new TreeMap () );
2584
2584
GlarchProxy g = new Glarch ();
2585
2585
s .save (g );
2586
- baz .getTopGlarchez ().put ( new Character ( 'G' ) , g );
2586
+ baz .getTopGlarchez ().put ( 'G' , g );
2587
2587
HashMap map = new HashMap ();
2588
2588
map .put (bar , g );
2589
2589
map .put (bar2 , g );
@@ -2633,9 +2633,9 @@ public void testPersistCollections() throws Exception {
2633
2633
);
2634
2634
Glarch g2 = new Glarch ();
2635
2635
s .save (g2 );
2636
- g = (GlarchProxy ) baz .getTopGlarchez ().get ( new Character ( 'G' ) );
2637
- baz .getTopGlarchez ().put ( new Character ( 'H' ) , g );
2638
- baz .getTopGlarchez ().put ( new Character ( 'G' ) , g2 );
2636
+ g = (GlarchProxy ) baz .getTopGlarchez ().get ( 'G' );
2637
+ baz .getTopGlarchez ().put ( 'H' , g );
2638
+ baz .getTopGlarchez ().put ( 'G' , g2 );
2639
2639
txn .commit ();
2640
2640
s .close ();
2641
2641
@@ -2662,8 +2662,8 @@ public void testPersistCollections() throws Exception {
2662
2662
baz = (Baz ) s3 .load (Baz .class , baz .getCode ());
2663
2663
assertEquals ( 3 , ((Long ) s3 .createQuery ( "select count(*) from Bar" ).iterate ().next ()).longValue () );
2664
2664
s3 .delete (baz );
2665
- s3 .delete ( baz .getTopGlarchez ().get ( Character . valueOf ( 'G' ) ) );
2666
- s3 .delete ( baz .getTopGlarchez ().get ( Character . valueOf ( 'H' ) ) );
2665
+ s3 .delete ( baz .getTopGlarchez ().get ( 'G' ) );
2666
+ s3 .delete ( baz .getTopGlarchez ().get ( 'H' ) );
2667
2667
int rows = s3 .doReturningWork (
2668
2668
new AbstractReturningWork <Integer >() {
2669
2669
@ Override
@@ -4312,10 +4312,10 @@ public void execute(Connection connection) throws SQLException {
4312
4312
);
4313
4313
s .refresh (foo );
4314
4314
assertEquals ( Long .valueOf ( -3l ), foo .getLong () );
4315
- assertEquals ( LockMode .READ , s .getCurrentLockMode (foo ) );
4315
+ assertEquals ( LockMode .READ , s .getCurrentLockMode ( foo ) );
4316
4316
s .refresh (foo , LockMode .UPGRADE );
4317
4317
if ( getDialect ().supportsOuterJoinForUpdate () ) {
4318
- assertEquals ( LockMode .UPGRADE , s .getCurrentLockMode (foo ) );
4318
+ assertEquals ( LockMode .UPGRADE , s .getCurrentLockMode ( foo ) );
4319
4319
}
4320
4320
s .delete (foo );
4321
4321
s .getTransaction ().commit ();
0 commit comments