File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
smb/src/main/java/ch/cyberduck/core/smb Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -111,16 +111,19 @@ public String toString() {
111111 }
112112 }
113113
114+ private static final GenericObjectPoolConfig <DiskShareWrapper > config = new GenericObjectPoolConfig <>();
115+
116+ static {
117+ config .setJmxEnabled (false );
118+ config .setBlockWhenExhausted (true );
119+ config .setMaxIdle (1 );
120+ config .setMaxTotal (Integer .MAX_VALUE );
121+ config .setTestOnBorrow (true );
122+ }
123+
114124 private final class DiskSharePool extends GenericObjectPool <DiskShareWrapper > {
115125 public DiskSharePool (final String shareName ) {
116- super (new DiskSharePoolObjectFactory (shareName ));
117- final GenericObjectPoolConfig <DiskShareWrapper > config = new GenericObjectPoolConfig <>();
118- config .setJmxEnabled (false );
119- config .setBlockWhenExhausted (true );
120- config .setMaxIdle (1 );
121- config .setMaxTotal (Integer .MAX_VALUE );
122- config .setTestOnBorrow (true );
123- this .setConfig (config );
126+ super (new DiskSharePoolObjectFactory (shareName ), config );
124127 this .setSwallowedExceptionListener (new SwallowedExceptionListener () {
125128 @ Override
126129 public void onSwallowException (final Exception e ) {
You can’t perform that action at this time.
0 commit comments