Clarify WebContext.contextParams() 61/101761/3
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Jul 2022 16:30:01 +0000 (18:30 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Jul 2022 19:58:27 +0000 (21:58 +0200)
ServletContext's initial parameters can include any Object, but there
are implementation indirections, which limit these to Strings. Document
this fact.

Change-Id: Ie402ea1340584d1c0a008122d67fbeccb081b790
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
web/api/src/main/java/org/opendaylight/aaa/web/WebContext.java

index a6022aec577eb6af149b7bca99271f109f329f56..a8ca1a0963bf2d672b54de43b4d07dbd82c408b7 100644 (file)
@@ -120,9 +120,10 @@ public abstract class WebContext {
     public abstract List<ResourceDetails> resources();
 
     /**
-     * Context params. NB: These are the web context's wide parameters; contrary to
-     * individual {@link ServletDetails#initParams()} and
-     * {@link FilterDetails#initParams()}.
+     * Context params. These are the {@link ServletContext}s initial parameters; contrary to individual
+     * {@link ServletDetails#initParams()} and {@link FilterDetails#initParams()}. While a ServletContext accepts
+     * any Object as a parameter, that is not accepted in all implementations. Most notably OSGi HTTP Whiteboard
+     * specification allows only String values, hence we are enforcing that.
      */
     public abstract Map<String, String> contextParams();