@@ -461,16 +461,15 @@ public Map<String, JdbcSession> findByIndexNameAndIndexValue(String indexName, f
461
461
462
462
private void insertSessionAttributes (JdbcSession session , List <String > attributeNames ) {
463
463
Assert .notEmpty (attributeNames , "attributeNames must not be null or empty" );
464
- try (LobCreator lobCreator = lobHandler .getLobCreator ()) {
464
+ try (LobCreator lobCreator = this . lobHandler .getLobCreator ()) {
465
465
if (attributeNames .size () > 1 ) {
466
466
this .jdbcOperations .batchUpdate (this .createSessionAttributeQuery , new BatchPreparedStatementSetter () {
467
467
468
468
@ Override
469
469
public void setValues (PreparedStatement ps , int i ) throws SQLException {
470
470
String attributeName = attributeNames .get (i );
471
471
ps .setString (1 , attributeName );
472
- lobCreator .setBlobAsBytes (ps , 2 ,
473
- serialize (session .getAttribute (attributeName )));
472
+ lobCreator .setBlobAsBytes (ps , 2 , serialize (session .getAttribute (attributeName )));
474
473
ps .setString (3 , session .getId ());
475
474
}
476
475
@@ -480,7 +479,8 @@ public int getBatchSize() {
480
479
}
481
480
482
481
});
483
- } else {
482
+ }
483
+ else {
484
484
this .jdbcOperations .update (this .createSessionAttributeQuery , (ps ) -> {
485
485
String attributeName = attributeNames .get (0 );
486
486
ps .setString (1 , attributeName );
@@ -493,15 +493,14 @@ public int getBatchSize() {
493
493
494
494
private void updateSessionAttributes (JdbcSession session , List <String > attributeNames ) {
495
495
Assert .notEmpty (attributeNames , "attributeNames must not be null or empty" );
496
- try (LobCreator lobCreator = lobHandler .getLobCreator ()) {
496
+ try (LobCreator lobCreator = this . lobHandler .getLobCreator ()) {
497
497
if (attributeNames .size () > 1 ) {
498
498
this .jdbcOperations .batchUpdate (this .updateSessionAttributeQuery , new BatchPreparedStatementSetter () {
499
499
500
500
@ Override
501
501
public void setValues (PreparedStatement ps , int i ) throws SQLException {
502
502
String attributeName = attributeNames .get (i );
503
- lobCreator .setBlobAsBytes (ps , 1 ,
504
- serialize (session .getAttribute (attributeName )));
503
+ lobCreator .setBlobAsBytes (ps , 1 , serialize (session .getAttribute (attributeName )));
505
504
ps .setString (2 , session .primaryKey );
506
505
ps .setString (3 , attributeName );
507
506
}
@@ -512,7 +511,8 @@ public int getBatchSize() {
512
511
}
513
512
514
513
});
515
- } else {
514
+ }
515
+ else {
516
516
this .jdbcOperations .update (this .updateSessionAttributeQuery , (ps ) -> {
517
517
String attributeName = attributeNames .get (0 );
518
518
lobCreator .setBlobAsBytes (ps , 1 , serialize (session .getAttribute (attributeName )));
0 commit comments