@@ -65,22 +65,23 @@ default void prepare(MappingModelCreationProcess mappingModelCreationProcess, Jd
65
65
if ( !createIdTables ) {
66
66
tableCreatedStage .complete ( null );
67
67
}
68
-
69
- LOG .debugf ( "Creating global-temp ID table : %s" , getTemporaryTable ().getTableExpression () );
70
-
71
- connectionStage ()
72
- .thenCompose ( this ::createTable )
73
- .whenComplete ( (connection , throwable ) -> releaseConnection ( connection )
74
- .thenAccept ( v -> {
75
- if ( throwable == null ) {
76
- setDropIdTables ( configService );
77
- tableCreatedStage .complete ( null );
78
- }
79
- else {
80
- tableCreatedStage .completeExceptionally ( throwable );
81
- }
82
- } )
83
- );
68
+ else {
69
+ LOG .debugf ( "Creating global-temp ID table : %s" , getTemporaryTable ().getTableExpression () );
70
+
71
+ connectionStage ()
72
+ .thenCompose ( this ::createTable )
73
+ .whenComplete ( (connection , throwable ) -> releaseConnection ( connection )
74
+ .thenAccept ( v -> {
75
+ if ( throwable == null ) {
76
+ setDropIdTables ( configService );
77
+ tableCreatedStage .complete ( null );
78
+ }
79
+ else {
80
+ tableCreatedStage .completeExceptionally ( throwable );
81
+ }
82
+ } )
83
+ );
84
+ }
84
85
}
85
86
86
87
private CompletionStage <Void > releaseConnection (ReactiveConnection connection ) {
@@ -147,24 +148,25 @@ default void release(
147
148
if ( !isDropIdTables () ) {
148
149
tableDroppedStage .complete ( null );
149
150
}
150
-
151
- setDropIdTables ( false );
152
-
153
- final TemporaryTable temporaryTable = getTemporaryTable ();
154
- LOG .debugf ( "Dropping global-tempk ID table : %s" , temporaryTable .getTableExpression () );
155
-
156
- connectionStage ()
157
- .thenCompose ( this ::dropTable )
158
- .whenComplete ( (connection , throwable ) -> releaseConnection ( connection )
159
- .thenAccept ( v -> {
160
- if ( throwable == null ) {
161
- tableDroppedStage .complete ( null );
162
- }
163
- else {
164
- tableDroppedStage .completeExceptionally ( throwable );
165
- }
166
- } )
167
- );
151
+ else {
152
+ setDropIdTables ( false );
153
+
154
+ final TemporaryTable temporaryTable = getTemporaryTable ();
155
+ LOG .debugf ( "Dropping global-tempk ID table : %s" , temporaryTable .getTableExpression () );
156
+
157
+ connectionStage ()
158
+ .thenCompose ( this ::dropTable )
159
+ .whenComplete ( (connection , throwable ) -> releaseConnection ( connection )
160
+ .thenAccept ( v -> {
161
+ if ( throwable == null ) {
162
+ tableDroppedStage .complete ( null );
163
+ }
164
+ else {
165
+ tableDroppedStage .completeExceptionally ( throwable );
166
+ }
167
+ } )
168
+ );
169
+ }
168
170
}
169
171
170
172
private CompletionStage <ReactiveConnection > dropTable (ReactiveConnection connection ) {
0 commit comments