This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 0817f7c  Configurable boolean properties should default to false.
0817f7c is described below

commit 0817f7c6da4effd1fa00a2cdffaa7a9dda6c78b1
Author: JamesBognar <[email protected]>
AuthorDate: Fri Nov 13 12:24:57 2020 -0500

    Configurable boolean properties should default to false.
---
 .../apache/juneau/dto/swagger/ui/SwaggerUI.java    |  2 +-
 .../36.RestBuiltInParameters.html                  |  2 +-
 .../07.MicroserviceJettyUiCustomization.html       |  2 +-
 .../juneau-examples-rest-jetty.cfg                 |  2 +-
 .../rest/annotation/RestAnnotation_Test.java       | 22 ++++----
 .../rest/annotation/Rest_AllowBodyParam_Test.java  | 10 ++--
 .../java/org/apache/juneau/rest/RestContext.java   | 59 +++++++++++-----------
 .../org/apache/juneau/rest/RestContextBuilder.java | 41 +++------------
 .../org/apache/juneau/rest/annotation/Rest.java    | 12 ++---
 .../juneau/rest/annotation/RestAnnotation.java     | 36 ++++++-------
 .../juneau-sc-server/juneau-server-config.cfg      |  2 +-
 11 files changed, 80 insertions(+), 110 deletions(-)

diff --git 
a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ui/SwaggerUI.java
 
b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ui/SwaggerUI.java
index c5ab2ee..dd9b361 100644
--- 
a/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ui/SwaggerUI.java
+++ 
b/juneau-core/juneau-dto/src/main/java/org/apache/juneau/dto/swagger/ui/SwaggerUI.java
@@ -70,7 +70,7 @@ public class SwaggerUI extends PojoSwap<Swagger,Div> {
        public static final String SWAGGERUI_resolveRefsMaxDepth = PREFIX + 
"resolveRefsMaxDepth.i";
 
 
-       static final ResourceManager RESOURCES = new 
ResourceManager(SwaggerUI.class, BasicResourceFinder.INSTANCE, 
Boolean.getBoolean("RestContext.useClasspathResourceCaching.b"));
+       static final ResourceManager RESOURCES = new 
ResourceManager(SwaggerUI.class, BasicResourceFinder.INSTANCE, ! 
Boolean.getBoolean("RestContext.disableClasspathResourceCaching.b"));
 
        private static final Set<String> STANDARD_METHODS = ASet.of("get", 
"put", "post", "delete", "options");
 
diff --git 
a/juneau-doc/docs/Topics/06.juneau-rest-server/36.RestBuiltInParameters.html 
b/juneau-doc/docs/Topics/06.juneau-rest-server/36.RestBuiltInParameters.html
index 7bdecf7..68b17fb 100644
--- a/juneau-doc/docs/Topics/06.juneau-rest-server/36.RestBuiltInParameters.html
+++ b/juneau-doc/docs/Topics/06.juneau-rest-server/36.RestBuiltInParameters.html
@@ -63,7 +63,7 @@ Built-in Parameters
                <td class='code'>&amp;body=X</td>
                <td>
                        Pass in the HTTP body content on PUT and POST methods 
as a UON-encoded GET parameter.
-                       <br>Must be enabled via {@link 
oajr.annotation.Rest#allowBodyParam() @Rest(allowBodyParam)} setting.
+                       <br>Can be disabled via {@link 
oajr.annotation.Rest#disableAllowBodyParam() @Rest(disableAllowBodyParam)} 
setting.
                </td>
        </tr>
        <tr>
diff --git 
a/juneau-doc/docs/Topics/12.juneau-microservice-jetty/07.MicroserviceJettyUiCustomization.html
 
b/juneau-doc/docs/Topics/12.juneau-microservice-jetty/07.MicroserviceJettyUiCustomization.html
index 9938d1d..00a8524 100644
--- 
a/juneau-doc/docs/Topics/12.juneau-microservice-jetty/07.MicroserviceJettyUiCustomization.html
+++ 
b/juneau-doc/docs/Topics/12.juneau-microservice-jetty/07.MicroserviceJettyUiCustomization.html
@@ -122,6 +122,6 @@ UI Customization
        
        <cc># Disable classpath resource caching.
        # Useful if you're attached using a debugger and you're modifying 
classpath resources while running.</cc>
-       <ck>RestContext.useClasspathResourceCaching.b</ck> = <cv>false</cv>
+       <ck>RestContext.disableClasspathResourceCaching.b</ck> = <cv>true</cv>
 
 </p>
diff --git 
a/juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg 
b/juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg
index 24c7561..366a923 100755
--- a/juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg
+++ b/juneau-examples/juneau-examples-rest-jetty/juneau-examples-rest-jetty.cfg
@@ -178,7 +178,7 @@ derby.stream.error.file = 
$C{Logging/logDir}/derby-errors.log
 
 # Disable classpath resource caching.
 # Useful if you're attached using a debugger and you're modifying classpath 
resources while running.
-RestContext.useClasspathResourceCaching.b = false
+RestContext.disableClasspathResourceCaching.b = true
 
 
#=======================================================================================================================
 # DockerRegistryResource properties
diff --git 
a/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
 
b/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
index c259b5e..04d2d80 100644
--- 
a/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
+++ 
b/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/RestAnnotation_Test.java
@@ -36,7 +36,7 @@ public class RestAnnotation_Test {
        
//------------------------------------------------------------------------------------------------------------------
 
        Rest a1 = RestAnnotation.create()
-               .allowBodyParam("allowBodyParam")
+               .disableAllowBodyParam("disableAllowBodyParam")
                .allowedHeaderParams("allowedHeaderParams")
                .allowedMethodHeaders("allowedMethodHeaders")
                .allowedMethodParams("allowedMethodParams")
@@ -89,11 +89,11 @@ public class RestAnnotation_Test {
                .uriContext("uriContext")
                .uriRelativity("uriRelativity")
                .uriResolution("uriResolution")
-               .useClasspathResourceCaching("useClasspathResourceCaching")
+               
.disableClasspathResourceCaching("disableClasspathResourceCaching")
                .build();
 
        Rest a2 = RestAnnotation.create()
-               .allowBodyParam("allowBodyParam")
+               .disableAllowBodyParam("disableAllowBodyParam")
                .allowedHeaderParams("allowedHeaderParams")
                .allowedMethodHeaders("allowedMethodHeaders")
                .allowedMethodParams("allowedMethodParams")
@@ -146,14 +146,13 @@ public class RestAnnotation_Test {
                .uriContext("uriContext")
                .uriRelativity("uriRelativity")
                .uriResolution("uriResolution")
-               .useClasspathResourceCaching("useClasspathResourceCaching")
+               
.disableClasspathResourceCaching("disableClasspathResourceCaching")
                .build();
 
        @Test
        public void a01_basic() {
                assertObject(a1).stderr().json().is(""
                        + "{"
-                               + "allowBodyParam:'allowBodyParam',"
                                + "allowedHeaderParams:'allowedHeaderParams',"
                                + "allowedMethodHeaders:'allowedMethodHeaders',"
                                + "allowedMethodParams:'allowedMethodParams',"
@@ -171,6 +170,8 @@ public class RestAnnotation_Test {
                                + "defaultCharset:'defaultCharset',"
                                + "defaultContentType:'defaultContentType',"
                                + "description:['description'],"
+                               + 
"disableAllowBodyParam:'disableAllowBodyParam',"
+                               + 
"disableClasspathResourceCaching:'disableClasspathResourceCaching',"
                                + 
"encoders:['org.apache.juneau.encoders.Encoder'],"
                                + "flags:['flags'],"
                                + "guards:['org.apache.juneau.rest.RestGuard'],"
@@ -205,8 +206,7 @@ public class RestAnnotation_Test {
                                + "uriAuthority:'uriAuthority',"
                                + "uriContext:'uriContext',"
                                + "uriRelativity:'uriRelativity',"
-                               + "uriResolution:'uriResolution',"
-                               + 
"useClasspathResourceCaching:'useClasspathResourceCaching'"
+                               + "uriResolution:'uriResolution'"
                        + "}"
                );
        }
@@ -255,7 +255,7 @@ public class RestAnnotation_Test {
        
//------------------------------------------------------------------------------------------------------------------
 
        @Rest(
-               allowBodyParam="allowBodyParam",
+               disableAllowBodyParam="disableAllowBodyParam",
                allowedHeaderParams="allowedHeaderParams",
                allowedMethodHeaders="allowedMethodHeaders",
                allowedMethodParams="allowedMethodParams",
@@ -308,13 +308,13 @@ public class RestAnnotation_Test {
                uriContext="uriContext",
                uriRelativity="uriRelativity",
                uriResolution="uriResolution",
-               useClasspathResourceCaching="useClasspathResourceCaching"
+               
disableClasspathResourceCaching="disableClasspathResourceCaching"
        )
        public static class D1 {}
        Rest d1 = D1.class.getAnnotationsByType(Rest.class)[0];
 
        @Rest(
-               allowBodyParam="allowBodyParam",
+               disableAllowBodyParam="disableAllowBodyParam",
                allowedHeaderParams="allowedHeaderParams",
                allowedMethodHeaders="allowedMethodHeaders",
                allowedMethodParams="allowedMethodParams",
@@ -367,7 +367,7 @@ public class RestAnnotation_Test {
                uriContext="uriContext",
                uriRelativity="uriRelativity",
                uriResolution="uriResolution",
-               useClasspathResourceCaching="useClasspathResourceCaching"
+               
disableClasspathResourceCaching="disableClasspathResourceCaching"
        )
        public static class D2 {}
        Rest d2 = D2.class.getAnnotationsByType(Rest.class)[0];
diff --git 
a/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_AllowBodyParam_Test.java
 
b/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_AllowBodyParam_Test.java
index 8b17d35..2bfa952 100644
--- 
a/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_AllowBodyParam_Test.java
+++ 
b/juneau-rest/juneau-rest-server-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_AllowBodyParam_Test.java
@@ -24,27 +24,27 @@ import org.junit.*;
 public class Rest_AllowBodyParam_Test {
 
        
//------------------------------------------------------------------------------------------------------------------
-       // @Rest(allowBodyParam)
+       // @Rest(disableAllowBodyParam)
        
//------------------------------------------------------------------------------------------------------------------
 
-       @Rest(allowBodyParam="true")
+       @Rest(disableAllowBodyParam="false")
        public static class A1 {
                @RestMethod
                public OMap put(@Body OMap body) {
                        return body;
                }
        }
-       @Rest(allowBodyParam="false")
+       @Rest(disableAllowBodyParam="true")
        public static class A2 {
                @RestMethod
                public OMap put(@Body OMap body) {
                        return body;
                }
        }
-       @Rest(allowBodyParam="false")
+       @Rest(disableAllowBodyParam="true")
        public static class A3 extends A1 {}
 
-       @Rest(allowBodyParam="true")
+       @Rest(disableAllowBodyParam="false")
        public static class A4 extends A2 {}
 
 
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 3d11f33..fca2f5f 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -104,25 +104,24 @@ public class RestContext extends BeanContext {
        static final String PREFIX = "RestContext";
 
        /**
-        * Configuration property:  Allow body URL parameter.
+        * Configuration property:  Disable allow body URL parameter.
         *
         * <h5 class='section'>Property:</h5>
         * <ul class='spaced-list'>
-        *      <li><b>ID:</b>  {@link 
org.apache.juneau.rest.RestContext#REST_allowBodyParam REST_allowBodyParam}
-        *      <li><b>Name:</b>  <js>"RestContext.allowBodyParam.b"</js>
+        *      <li><b>ID:</b>  {@link 
org.apache.juneau.rest.RestContext#REST_disableAllowBodyParam 
REST_disableAllowBodyParam}
+        *      <li><b>Name:</b>  <js>"RestContext.disableAllowBodyParam.b"</js>
         *      <li><b>Data type:</b>  <jk>boolean</jk>
-        *      <li><b>System property:</b>  <c>RestContext.allowBodyParam</c>
-        *      <li><b>Environment variable:</b>  
<c>RESTCONTEXT_ALLOWBODYPARAM</c>
-        *      <li><b>Default:</b>  <jk>true</jk>
+        *      <li><b>System property:</b>  
<c>RestContext.disableAllowBodyParam</c>
+        *      <li><b>Environment variable:</b>  
<c>RESTCONTEXT_DISABLEALLOWBODYPARAM</c>
+        *      <li><b>Default:</b>  <jk>false</jk>
         *      <li><b>Session property:</b>  <jk>false</jk>
         *      <li><b>Annotations:</b>
         *              <ul>
-        *                      <li class='ja'>{@link 
org.apache.juneau.rest.annotation.Rest#allowBodyParam()}
+        *                      <li class='ja'>{@link 
org.apache.juneau.rest.annotation.Rest#disableAllowBodyParam()}
         *              </ul>
         *      <li><b>Methods:</b>
         *              <ul>
-        *                      <li class='jm'>{@link 
org.apache.juneau.rest.RestContextBuilder#allowBodyParam(boolean)}
-        *                      <li class='jm'>{@link 
org.apache.juneau.rest.RestContextBuilder#dontAllowBodyParam()}
+        *                      <li class='jm'>{@link 
org.apache.juneau.rest.RestContextBuilder#disableAllowBodyParam()}
         *              </ul>
         * </ul>
         *
@@ -139,23 +138,23 @@ public class RestContext extends BeanContext {
         * <h5 class='section'>Example:</h5>
         * <p class='bcode w800'>
         *      <jc>// Option #1 - Defined via annotation resolving to a config 
file setting with default value.</jc>
-        *      
<ja>@Rest</ja>(allowBodyParam=<js>"$C{REST/allowBodyParam,false}"</js>)
+        *      
<ja>@Rest</ja>(disableAllowBodyParam=<js>"$C{REST/disableAllowBodyParam,true}"</js>)
         *      <jk>public class</jk> MyResource {
         *
         *              <jc>// Option #2 - Defined via builder passed in 
through resource constructor.</jc>
         *              <jk>public</jk> MyResource(RestContextBuilder builder) 
<jk>throws</jk> Exception {
         *
         *                      <jc>// Using method on builder.</jc>
-        *                      builder.allowBodyParam(<jk>false</jk>);
+        *                      builder.disableAllowBodyParam();
         *
         *                      <jc>// Same, but using property.</jc>
-        *                      builder.set(<jsf>REST_allowBodyParam</jsf>, 
<jk>false</jk>);
+        *                      
builder.set(<jsf>REST_disableAllowBodyParam</jsf>, <jk>true</jk>);
         *              }
         *
         *              <jc>// Option #3 - Defined via builder passed in 
through init method.</jc>
         *              <ja>@RestHook</ja>(<jsf>INIT</jsf>)
         *              <jk>public void</jk> init(RestContextBuilder builder) 
<jk>throws</jk> Exception {
-        *                      builder.allowBodyParam(<jk>false</jk>);
+        *                      builder.disableAllowBodyParam();
         *              }
         *      }
         * </p>
@@ -167,7 +166,7 @@ public class RestContext extends BeanContext {
         *              Useful for debugging PUT and POST methods using only a 
browser.
         * </ul>
         */
-       public static final String REST_allowBodyParam = PREFIX + 
".allowBodyParam.b";
+       public static final String REST_disableAllowBodyParam = PREFIX + 
".disableAllowBodyParam.b";
 
        /**
         * Configuration property:  Allowed header URL parameters.
@@ -2849,7 +2848,7 @@ public class RestContext extends BeanContext {
         *      <li class='jf'>{@link #REST_classpathResourceFinder} for 
configuring how classpath resources are located and retrieved.
         *      <li class='jf'>{@link #REST_mimeTypes} for configuring the 
media types based on file extension.
         *      <li class='jf'>{@link #REST_staticFileResponseHeaders} for 
configuring response headers on statically served files.
-        *      <li class='jf'>{@link #REST_useClasspathResourceCaching} for 
configuring static file caching.
+        *      <li class='jf'>{@link #REST_disableClasspathResourceCaching} 
for configuring static file caching.
         *      <li class='jm'>{@link 
RestContext#getClasspathResource(String,Locale)} for retrieving static files.
         * </ul>
         *
@@ -3109,20 +3108,20 @@ public class RestContext extends BeanContext {
         *
         * <h5 class='section'>Property:</h5>
         * <ul class='spaced-list'>
-        *      <li><b>ID:</b>  {@link 
org.apache.juneau.rest.RestContext#REST_useClasspathResourceCaching 
REST_useClasspathResourceCaching}
-        *      <li><b>Name:</b>  
<js>"RestContext.useClasspathResourceCaching.b"</js>
+        *      <li><b>ID:</b>  {@link 
org.apache.juneau.rest.RestContext#REST_disableClasspathResourceCaching 
REST_disableClasspathResourceCaching}
+        *      <li><b>Name:</b>  
<js>"RestContext.disableClasspathResourceCaching.b"</js>
         *      <li><b>Data type:</b>  <jk>boolean</jk>
-        *      <li><b>System property:</b>  
<c>RestContext.useClasspathResourceCaching</c>
-        *      <li><b>Environment variable:</b>  
<c>RESTCONTEXT_USECLASSPATHRESOURCECACHING</c>
-        *      <li><b>Default:</b>  <jk>true</jk>
+        *      <li><b>System property:</b>  
<c>RestContext.disableClasspathResourceCaching</c>
+        *      <li><b>Environment variable:</b>  
<c>RESTCONTEXT_DISABLECLASSPATHRESOURCECACHING</c>
+        *      <li><b>Default:</b>  <jk>false</jk>
         *      <li><b>Session property:</b>  <jk>false</jk>
         *      <li><b>Annotations:</b>
         *              <ul>
-        *                      <li class='ja'>{@link 
org.apache.juneau.rest.annotation.Rest#useClasspathResourceCaching()}
+        *                      <li class='ja'>{@link 
org.apache.juneau.rest.annotation.Rest#disableClasspathResourceCaching()}
         *              </ul>
         *      <li><b>Methods:</b>
         *              <ul>
-        *                      <li class='jm'>{@link 
org.apache.juneau.rest.RestContextBuilder#useClasspathResourceCaching(boolean)}
+        *                      <li class='jm'>{@link 
org.apache.juneau.rest.RestContextBuilder#disableClasspathResourceCaching()}
         *              </ul>
         * </ul>
         *
@@ -3134,23 +3133,23 @@ public class RestContext extends BeanContext {
         * <h5 class='section'>Example:</h5>
         * <p class='bcode w800'>
         *      <jc>// Option #1 - Defined via annotation resolving to a config 
file setting with default value.</jc>
-        *      
<ja>@Rest</ja>(useClasspathResourceCaching=<js>"$C{REST/useClasspathResourceCaching,false}"</js>)
+        *      
<ja>@Rest</ja>(disableClasspathResourceCaching=<js>"$C{REST/disableClasspathResourceCaching,false}"</js>)
         *      <jk>public class</jk> MyResource {
         *
         *              <jc>// Option #2 - Defined via builder passed in 
through resource constructor.</jc>
         *              <jk>public</jk> MyResource(RestContextBuilder builder) 
<jk>throws</jk> Exception {
         *
         *                      <jc>// Using method on builder.</jc>
-        *                      
builder.useClasspathResourceCaching(<jk>false</jk>)
+        *                      builder.disableClasspathResourceCaching()
         *
         *                      <jc>// Same, but using property.</jc>
-        *                      
builder.set(<jsf>REST_useClasspathResourceCaching</jsf>, <jk>false</jk>);
+        *                      
builder.set(<jsf>REST_disableClasspathResourceCaching</jsf>, <jk>true</jk>);
         *              }
         *
         *              <jc>// Option #3 - Defined via builder passed in 
through init method.</jc>
         *              <ja>@RestHook</ja>(<jsf>INIT</jsf>)
         *              <jk>public void</jk> init(RestContextBuilder builder) 
<jk>throws</jk> Exception {
-        *                      
builder.useClasspathResourceCaching(<jk>false</jk>)
+        *                      builder.disableClasspathResourceCaching()
         *              }
         *      }
         * </p>
@@ -3159,7 +3158,7 @@ public class RestContext extends BeanContext {
         *      <li class='jf'>{@link #REST_staticFiles} for information about 
static files.
         * </ul>
         */
-       public static final String REST_useClasspathResourceCaching = PREFIX + 
".useClasspathResourceCaching.b";
+       public static final String REST_disableClasspathResourceCaching = 
PREFIX + ".disableClasspathResourceCaching.b";
 
        /**
         * Configuration property:  Resource URI authority path.
@@ -3641,7 +3640,7 @@ public class RestContext extends BeanContext {
                        uriResolution = getProperty(REST_uriResolution, 
UriResolution.class, UriResolution.ROOT_RELATIVE);
                        uriRelativity = getProperty(REST_uriRelativity, 
UriRelativity.class, UriRelativity.RESOURCE);
 
-                       allowBodyParam = 
getBooleanProperty(REST_allowBodyParam, true);
+                       allowBodyParam = ! 
getBooleanProperty(REST_disableAllowBodyParam, false);
                        allowedHeaderParams = 
newUnmodifiableSortedCaseInsensitiveSet(getStringPropertyWithNone(REST_allowedHeaderParams,
 "Accept,Content-Type"));
                        allowedMethodParams = 
newUnmodifiableSortedCaseInsensitiveSet(getStringPropertyWithNone(REST_allowedMethodParams,
 "HEAD,OPTIONS"));
                        allowedMethodHeaders = 
newUnmodifiableSortedCaseInsensitiveSet(getStringPropertyWithNone(REST_allowedMethodHeaders,
 ""));
@@ -3730,7 +3729,7 @@ public class RestContext extends BeanContext {
                        Object defaultResourceFinder = resource instanceof 
ResourceFinder ? resource : BasicResourceFinder.class;
                        ResourceFinder rf = 
getInstanceProperty(REST_classpathResourceFinder, ResourceFinder.class, 
defaultResourceFinder, resourceResolver, this);
 
-                       useClasspathResourceCaching = 
getProperty(REST_useClasspathResourceCaching, boolean.class, true);
+                       useClasspathResourceCaching = ! 
getBooleanProperty(REST_disableClasspathResourceCaching, false);
                        staticResourceManager = new 
ResourceManager(rci.inner(), rf, useClasspathResourceCaching);
 
                        consumes = getListProperty(REST_consumes, 
MediaType.class, parsers.getSupportedMediaTypes());
@@ -4484,7 +4483,7 @@ public class RestContext extends BeanContext {
         * Returns whether it's safe to pass the HTTP body as a <js>"body"</js> 
GET parameter.
         *
         * <ul class='seealso'>
-        *      <li class='jf'>{@link RestContext#REST_allowBodyParam}
+        *      <li class='jf'>{@link RestContext#REST_disableAllowBodyParam}
         * </ul>
         *
         * @return <jk>true</jk> if setting is enabled.
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
index 9f486db..1400d88 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContextBuilder.java
@@ -412,40 +412,14 @@ public class RestContextBuilder extends 
BeanContextBuilder implements ServletCon
         * </p>
         *
         * <ul class='seealso'>
-        *      <li class='jf'>{@link RestContext#REST_allowBodyParam}
-        * </ul>
-        *
-        * @param value
-        *      The new value for this setting.
-        *      <br>The default is <jk>true</jk>.
-        * @return This object (for method chaining).
-        */
-       @FluentSetter
-       public RestContextBuilder allowBodyParam(boolean value) {
-               return set(REST_allowBodyParam, value);
-       }
-
-       /**
-        * <i><l>RestContext</l> configuration property:&emsp;</i>  Allow body 
URL parameter.
-        *
-        * <p>
-        * When enabled, the HTTP body content on PUT and POST requests can be 
passed in as text using the <js>"body"</js>
-        * URL parameter.
-        * <br>
-        * For example:
-        * <p class='bcode w800'>
-        *  ?body=(name='John%20Smith',age=45)
-        * </p>
-        *
-        * <ul class='seealso'>
-        *      <li class='jf'>{@link RestContext#REST_allowBodyParam}
+        *      <li class='jf'>{@link RestContext#REST_disableAllowBodyParam}
         * </ul>
         *
         * @return This object (for method chaining).
         */
        @FluentSetter
-       public RestContextBuilder dontAllowBodyParam() {
-               return set(REST_allowBodyParam, false);
+       public RestContextBuilder disableAllowBodyParam() {
+               return set(REST_disableAllowBodyParam, true);
        }
 
        /**
@@ -2247,17 +2221,14 @@ public class RestContextBuilder extends 
BeanContextBuilder implements ServletCon
         * methods) will be cached in memory to speed subsequent lookups.
         *
         * <ul class='seealso'>
-        *      <li class='jf'>{@link 
RestContext#REST_useClasspathResourceCaching}
+        *      <li class='jf'>{@link 
RestContext#REST_disableClasspathResourceCaching}
         * </ul>
         *
-        * @param value
-        *      The new value for this setting.
-        *      <br>The default is <jk>true</jk>.
         * @return This object (for method chaining).
         */
        @FluentSetter
-       public RestContextBuilder useClasspathResourceCaching(boolean value) {
-               return set(REST_useClasspathResourceCaching, value);
+       public RestContextBuilder disableClasspathResourceCaching() {
+               return set(REST_disableClasspathResourceCaching, true);
        }
 
        @Override /* ContextBuilder */
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
index 36100ab..2e8141f 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
@@ -45,7 +45,7 @@ import org.apache.juneau.rest.*;
 public @interface Rest {
 
        /**
-        * Allow body URL parameter.
+        * Disable allow body URL parameter.
         *
         * <p>
         * When enabled, the HTTP body content on PUT and POST requests can be 
passed in as text using the <js>"body"</js>
@@ -63,10 +63,10 @@ public @interface Rest {
         * </ul>
         *
         * <ul class='seealso'>
-        *      <li class='jf'>{@link RestContext#REST_allowBodyParam}
+        *      <li class='jf'>{@link RestContext#REST_disableAllowBodyParam}
         * </ul>
         */
-       String allowBodyParam() default "";
+       String disableAllowBodyParam() default "";
 
        /**
         * Configuration property:  Allowed header URL parameters.
@@ -1480,7 +1480,7 @@ public @interface Rest {
        String uriResolution() default "";
 
        /**
-        * Configuration property:  Use classpath resource caching.
+        * Configuration property:  Disable classpath resource caching.
         *
         * <p>
         * When enabled, resources retrieved via {@link 
RestRequest#getClasspathHttpResource(String, boolean)} (and related
@@ -1493,8 +1493,8 @@ public @interface Rest {
         * </ul>
         *
         * <ul class='seealso'>
-        *      <li class='jf'>{@link 
RestContext#REST_useClasspathResourceCaching}
+        *      <li class='jf'>{@link 
RestContext#REST_disableClasspathResourceCaching}
         * </ul>
         */
-       String useClasspathResourceCaching() default "";
+       String disableClasspathResourceCaching() default "";
 }
diff --git 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
index 797dec8..ef65649 100644
--- 
a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
+++ 
b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestAnnotation.java
@@ -101,7 +101,7 @@ public class RestAnnotation {
                Logging logging = LoggingAnnotation.DEFAULT;
                Property[] properties = {};
                ResourceSwagger swagger = ResourceSwaggerAnnotation.DEFAULT;
-               String allowBodyParam="", allowedHeaderParams="", 
allowedMethodHeaders="", allowedMethodParams="", clientVersionHeader="", 
config="", debug="", debugOn="", defaultAccept="", defaultCharset="", 
defaultContentType="", maxInput="", messages="", path="", 
renderResponseStackTraces="", roleGuard="", rolesDeclared="", siteName="", 
uriAuthority="", uriContext="", uriRelativity="", uriResolution="", 
useClasspathResourceCaching="";
+               String disableAllowBodyParam="", allowedHeaderParams="", 
allowedMethodHeaders="", allowedMethodParams="", clientVersionHeader="", 
config="", debug="", debugOn="", defaultAccept="", defaultCharset="", 
defaultContentType="", maxInput="", messages="", path="", 
renderResponseStackTraces="", roleGuard="", rolesDeclared="", siteName="", 
uriAuthority="", uriContext="", uriRelativity="", uriResolution="", 
disableClasspathResourceCaching="";
                String[] consumes={}, description={}, flags={}, mimeTypes={}, 
produces={}, reqAttrs={}, reqHeaders={}, resHeaders={}, 
staticFileResponseHeaders={}, staticFiles={}, title={};
 
                /**
@@ -121,13 +121,13 @@ public class RestAnnotation {
                }
 
                /**
-                * Sets the {@link Rest#allowBodyParam()} property on this 
annotation.
+                * Sets the {@link Rest#disableAllowBodyParam()} property on 
this annotation.
                 *
                 * @param value The new value for this property.
                 * @return This object (for method chaining).
                 */
-               public Builder allowBodyParam(String value) {
-                       this.allowBodyParam = value;
+               public Builder disableAllowBodyParam(String value) {
+                       this.disableAllowBodyParam = value;
                        return this;
                }
 
@@ -682,13 +682,13 @@ public class RestAnnotation {
                }
 
                /**
-                * Sets the {@link Rest#useClasspathResourceCaching()} property 
on this annotation.
+                * Sets the {@link Rest#disableClasspathResourceCaching()} 
property on this annotation.
                 *
                 * @param value The new value for this property.
                 * @return This object (for method chaining).
                 */
-               public Builder useClasspathResourceCaching(String value) {
-                       this.useClasspathResourceCaching = value;
+               public Builder disableClasspathResourceCaching(String value) {
+                       this.disableClasspathResourceCaching = value;
                        return this;
                }
 
@@ -733,12 +733,12 @@ public class RestAnnotation {
                private final Logging logging;
                private final Property[] properties;
                private final ResourceSwagger swagger;
-               private final String allowBodyParam, allowedHeaderParams, 
allowedMethodHeaders, allowedMethodParams, clientVersionHeader, config, debug, 
debugOn, defaultAccept, defaultCharset, defaultContentType, maxInput, messages, 
path, renderResponseStackTraces, roleGuard, rolesDeclared, siteName, 
uriAuthority, uriContext, uriRelativity, uriResolution, 
useClasspathResourceCaching;
+               private final String disableAllowBodyParam, 
allowedHeaderParams, allowedMethodHeaders, allowedMethodParams, 
clientVersionHeader, config, debug, debugOn, defaultAccept, defaultCharset, 
defaultContentType, maxInput, messages, path, renderResponseStackTraces, 
roleGuard, rolesDeclared, siteName, uriAuthority, uriContext, uriRelativity, 
uriResolution, disableClasspathResourceCaching;
                private final String[] consumes, description, flags, mimeTypes, 
produces, reqAttrs, reqHeaders, resHeaders, staticFileResponseHeaders, 
staticFiles, title;
 
                Impl(Builder b) {
                        super(b);
-                       this.allowBodyParam = b.allowBodyParam;
+                       this.disableAllowBodyParam = b.disableAllowBodyParam;
                        this.allowedHeaderParams = b.allowedHeaderParams;
                        this.allowedMethodHeaders = b.allowedMethodHeaders;
                        this.allowedMethodParams = b.allowedMethodParams;
@@ -789,13 +789,13 @@ public class RestAnnotation {
                        this.uriContext = b.uriContext;
                        this.uriRelativity = b.uriRelativity;
                        this.uriResolution = b.uriResolution;
-                       this.useClasspathResourceCaching = 
b.useClasspathResourceCaching;
+                       this.disableClasspathResourceCaching = 
b.disableClasspathResourceCaching;
                        postConstruct();
                }
 
                @Override /* Rest */
-               public String allowBodyParam() {
-                       return allowBodyParam;
+               public String disableAllowBodyParam() {
+                       return disableAllowBodyParam;
                }
 
                @Override /* Rest */
@@ -1049,8 +1049,8 @@ public class RestAnnotation {
                }
 
                @Override /* Rest */
-               public String useClasspathResourceCaching() {
-                       return useClasspathResourceCaching;
+               public String disableClasspathResourceCaching() {
+                       return disableClasspathResourceCaching;
                }
        }
 
@@ -1191,8 +1191,8 @@ public class RestAnnotation {
                                        
psb.putTo(REST_staticFileResponseHeaders, h[0], h[1]);
                        }
 
-                       if (! a.useClasspathResourceCaching().isEmpty())
-                               psb.set(REST_useClasspathResourceCaching, 
bool(a.useClasspathResourceCaching()));
+                       if (! a.disableClasspathResourceCaching().isEmpty())
+                               psb.set(REST_disableClasspathResourceCaching, 
bool(a.disableClasspathResourceCaching()));
 
                        if (a.classpathResourceFinder() != 
ResourceFinder.Null.class)
                                psb.set(REST_classpathResourceFinder, 
a.classpathResourceFinder());
@@ -1265,8 +1265,8 @@ public class RestAnnotation {
                        if (a.infoProvider() != RestInfoProvider.Null.class)
                                psb.set(REST_infoProvider, a.infoProvider());
 
-                       if (! a.allowBodyParam().isEmpty())
-                               psb.set(REST_allowBodyParam, 
bool(a.allowBodyParam()));
+                       if (! a.disableAllowBodyParam().isEmpty())
+                               psb.set(REST_disableAllowBodyParam, 
bool(a.disableAllowBodyParam()));
 
                        if (! a.allowedHeaderParams().isEmpty())
                                psb.set(REST_allowedHeaderParams, 
string(a.allowedHeaderParams()));
diff --git a/juneau-sc/juneau-sc-server/juneau-server-config.cfg 
b/juneau-sc/juneau-sc-server/juneau-server-config.cfg
index 493e3e6..954d59d 100755
--- a/juneau-sc/juneau-sc-server/juneau-server-config.cfg
+++ b/juneau-sc/juneau-sc-server/juneau-server-config.cfg
@@ -177,7 +177,7 @@ derby.stream.error.file = 
$C{Logging/logDir}/derby-errors.log
 
 # Disable classpath resource caching.
 # Useful if you're attached using a debugger and you're modifying classpath 
resources while running.
-RestContext.useClasspathResourceCaching.b = false
+RestContext.disableClasspathResourceCaching.b = true
 
 
#=======================================================================================================================
 # DockerRegistryResource properties

Reply via email to