File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
tc-server/src/main/java/com/tc/config Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,7 @@ public ProductInfo getProductInfo() {
77
77
}
78
78
79
79
public void initialize () throws ConfigurationException {
80
- Lock lock = this .configurationProvider .lockAndInitialize (this .startUpArgs );
81
-
82
- try {
83
- Configuration configuration = configurationProvider .getConfiguration ();
80
+ try (LockedConfiguration configuration = this .configurationProvider .lockAndInitialize (this .startUpArgs )) {
84
81
if (configuration == null ) {
85
82
throw new ConfigurationException ("unable to determine server configuration" );
86
83
}
@@ -92,8 +89,6 @@ public void initialize() throws ConfigurationException {
92
89
thisServer = new StableServerConfiguration (base );
93
90
94
91
processTcProperties (configuration .getTcProperties ());
95
- } finally {
96
- lock .unlock ();
97
92
}
98
93
}
99
94
@@ -267,10 +262,10 @@ List<ServerConfiguration> getStableServerConfigurations() {
267
262
}
268
263
}
269
264
270
- Lock lockAndInitialize (List <String > configurationParams ) throws ConfigurationException {
265
+ LockedConfiguration lockAndInitialize (List <String > configurationParams ) throws ConfigurationException {
271
266
lock .lock ();
272
267
initialize (configurationParams );
273
- return lock ;
268
+ return new LockedConfiguration ( delegateProvider . getConfiguration (), lock ) ;
274
269
}
275
270
276
271
@ Override
You can’t perform that action at this time.
0 commit comments