Skip to content

Commit ffb76f4

Browse files
committed
move code around to preserve closing order
1 parent f75d6e5 commit ffb76f4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

flight/flight-core/src/main/java/org/apache/arrow/flight/FlightServer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,17 +572,17 @@ public Builder producer(FlightProducer producer) {
572572
}
573573

574574
private void prepareTlsSettings() throws IOException {
575-
if (this.keyFile != null) {
576-
closeKey();
577-
this.key = new FileInputStream(this.keyFile);
575+
if (this.mTlsCACertFile != null) {
576+
closeMTlsCACert();
577+
this.mTlsCACert = new FileInputStream(this.mTlsCACertFile);
578578
}
579579
if (this.certChainFile != null) {
580580
closeCertChain();
581581
this.certChain = new FileInputStream(this.certChainFile);
582582
}
583-
if (this.mTlsCACertFile != null) {
584-
closeMTlsCACert();
585-
this.mTlsCACert = new FileInputStream(this.mTlsCACertFile);
583+
if (this.keyFile != null) {
584+
closeKey();
585+
this.key = new FileInputStream(this.keyFile);
586586
}
587587
}
588588
}

0 commit comments

Comments
 (0)