Skip to content

Commit 606592f

Browse files
committed
[chore] Drop undocumented & deprecated config properties from jruby-rack 1.0
1 parent e57318b commit 606592f

File tree

3 files changed

+7
-30
lines changed

3 files changed

+7
-30
lines changed

History.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Drop deprecated `RackLogger` string (level) constants
99
- Drop `jruby.rack.jruby.version` and `jruby.rack.rack.release` keys from rack `env` Hash
1010
- Drop deprecated `Rack::Handler::Servlet::Env` and `Rack::Handler::Servlet::LazyEnv` types (replaced by `DefaultEnv`)
11+
- Drop undocumented and deprecated jruby-rack 1.0 backwards compat properties `jruby.runtime.timeout.sec`, `jruby.runtime.initializer.threads`, `jruby.init.serial`, `jruby.rack.request.size.threshold.bytes`
1112
- Change context listener to throw, in case of an exception during initialization, by default
1213
- Change rails context listener to assume a thread-safe application by default
1314
- update (bundled) rack to 2.2.17

src/main/java/org/jruby/rack/DefaultRackConfig.java

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ public String getRackupPath() {
8686

8787
@Override
8888
public Integer getRuntimeTimeoutSeconds() {
89-
Integer timeout = getPositiveInteger("jruby.runtime.acquire.timeout");
90-
if (timeout == null) { // backwards compatibility with 1.0.x :
91-
timeout = getPositiveInteger("jruby.runtime.timeout.sec");
92-
}
93-
return timeout;
89+
return getPositiveInteger("jruby.runtime.acquire.timeout");
9490
}
9591

9692
@Override
@@ -102,27 +98,15 @@ public String[] getRuntimeArguments() {
10298
@Override
10399
public Integer getNumInitializerThreads() {
104100
Number threads = getNumberProperty("jruby.runtime.init.threads");
105-
if (threads == null) { // backwards compatibility with 1.0.x :
106-
threads = getNumberProperty("jruby.runtime.initializer.threads");
107-
}
108101
return threads != null ? threads.intValue() : null;
109102
}
110103

111104
@Override
112105
public boolean isSerialInitialization() {
113106
Boolean serial = getBooleanProperty("jruby.runtime.init.serial");
114-
if (serial == null) { // backwards compatibility with 1.0.x :
115-
serial = getBooleanProperty("jruby.init.serial");
116-
117-
if (serial == null) { // if initializer threads set to <= 0
118-
Integer threads = getNumInitializerThreads();
119-
if ( threads != null && threads < 0 ) {
120-
serial = Boolean.TRUE;
121-
}
122-
else {
123-
serial = Boolean.FALSE;
124-
}
125-
}
107+
if (serial == null) { // if initializer threads set to <= 0
108+
Integer threads = getNumInitializerThreads();
109+
serial = threads != null && threads < 0 ? Boolean.TRUE : Boolean.FALSE;
126110
}
127111
return serial;
128112
}
@@ -232,11 +216,7 @@ public Integer getInitialMemoryBufferSize() {
232216

233217
@Override
234218
public Integer getMaximumMemoryBufferSize() {
235-
Integer max = getPositiveInteger("jruby.rack.request.size.maximum.bytes");
236-
if (max == null) { // backwards compatibility with 1.0.x :
237-
max = getPositiveInteger("jruby.rack.request.size.threshold.bytes");
238-
}
239-
return max;
219+
return getPositiveInteger("jruby.rack.request.size.maximum.bytes");
240220
}
241221

242222
@Override

src/main/java/org/jruby/rack/PoolingRackApplicationFactory.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,7 @@ protected void doInit() throws Exception {
114114
super.doInit();
115115
final RackConfig config = getConfig();
116116
// TODO until config.getRuntimeTimeoutSeconds returns an integer :
117-
Number timeout = config.getNumberProperty("jruby.runtime.acquire.timeout");
118-
if (timeout == null) { // backwards compatibility with 1.0.x :
119-
timeout = config.getNumberProperty("jruby.runtime.timeout.sec");
120-
}
121-
setAcquireTimeout( timeout );
117+
setAcquireTimeout( config.getNumberProperty("jruby.runtime.acquire.timeout") );
122118

123119
setInitialSize( config.getInitialRuntimes() );
124120
setMaximumSize( config.getMaximumRuntimes() );

0 commit comments

Comments
 (0)