Skip to content

Commit 5bf451a

Browse files
author
kevin.w.wall@gmail.com
committed
Changes / improvements to comments, including one additional TODO task.
1 parent d48e5a6 commit 5bf451a

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

‎src/main/java/org/owasp/esapi/ESAPI.java‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ public static Validator validator() {
200200
// The purpose of this method is to replace the functionality provided by the setSecurityConfiguration
201201
// method that is no longer on this class, and allow the context configuration of the ESAPI
202202
// to be modified at Runtime.
203+
// TODO: This method needs some JavaDoc if we are going to keep it, or at least if we are
204+
// going to keep it 'public'. It is not currently used--even in any JUnit tests!
205+
/**
206+
* This method is meant to be <i>only</i> used for testing and should be
207+
* avoided for production deployments as it has global affect across your
208+
* application and thus can result in unintended consequences.
209+
*
210+
* @deprecated To be replaced by some yet-to-be-determined interface in a
211+
* future release, or possibly completely removed.
212+
*/
203213
public static String initialize( String impl ) {
204214
String oldImpl = securityConfigurationImplName;
205215
securityConfigurationImplName = impl;
@@ -210,13 +220,17 @@ public static String initialize( String impl ) {
210220
* Overrides the current security configuration with a new implementation. This is meant
211221
* to be used as a temporary means to alter the behavior of the ESAPI and should *NEVER*
212222
* be used in a production environment as it will affect the behavior and configuration of
213-
* the ESAPI *GLOBALLY*.
223+
* the ESAPI <b>GLOBALLY</b>.
214224
*
215-
* To clear an overridden Configuration, simple call this method with null for the config
216-
* parameter.
225+
* To clear an overridden {@code SecurityConfiguration}, simply call this
226+
* method with {@code null} for the {@code config} parameter.
227+
*
228+
* Note: This method is generally used for JUnit tests.
217229
*
218-
* @param config
219-
* @return
230+
* @param config A new security configuration to (temporarily) use.
231+
*
232+
* @deprecated To be replaced by some yet-to-be-determined interface in a
233+
* future release, or possibly completely removed.
220234
*/
221235
public static void override( SecurityConfiguration config ) {
222236
overrideConfig = config;

0 commit comments

Comments
 (0)