This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.xss-1.0.10 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-xss.git
commit cb9c2a492b20bc476a6de5b98aa85f83bff75a04 Author: Radu Cotescu <[email protected]> AuthorDate: Wed Jul 29 15:42:14 2015 +0000 trivial: corrected JavaDoc for Java 1.8 git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/xss@1693299 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/sling/xss/JSONUtil.java | 2 +- src/main/java/org/apache/sling/xss/ProtectionContext.java | 2 +- src/main/java/org/apache/sling/xss/XSSAPI.java | 8 ++++---- src/main/java/org/apache/sling/xss/XSSFilter.java | 4 ++-- .../java/org/apache/sling/xss/impl/HtmlToHtmlContentContext.java | 2 +- src/main/java/org/apache/sling/xss/impl/PolicyHandler.java | 4 +++- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/apache/sling/xss/JSONUtil.java b/src/main/java/org/apache/sling/xss/JSONUtil.java index d2f516e..37552af 100644 --- a/src/main/java/org/apache/sling/xss/JSONUtil.java +++ b/src/main/java/org/apache/sling/xss/JSONUtil.java @@ -22,7 +22,7 @@ import org.apache.sling.commons.json.io.JSONWriter; /** * JSON utilities - * <p/> + * <p> * Support for handling xss protected values with JSON objects and JSON writers. */ public final class JSONUtil { diff --git a/src/main/java/org/apache/sling/xss/ProtectionContext.java b/src/main/java/org/apache/sling/xss/ProtectionContext.java index f48f158..3d9e2dd 100644 --- a/src/main/java/org/apache/sling/xss/ProtectionContext.java +++ b/src/main/java/org/apache/sling/xss/ProtectionContext.java @@ -19,7 +19,7 @@ package org.apache.sling.xss; /** * This enumeration defines the context for executing XSS protection. - * <p/> + * <p> * The specified rules refer to * http://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet */ diff --git a/src/main/java/org/apache/sling/xss/XSSAPI.java b/src/main/java/org/apache/sling/xss/XSSAPI.java index 0e3ea2c..50f2cd6 100644 --- a/src/main/java/org/apache/sling/xss/XSSAPI.java +++ b/src/main/java/org/apache/sling/xss/XSSAPI.java @@ -30,12 +30,12 @@ import aQute.bnd.annotation.ProviderType; /** * A service providing validators and encoders for XSS protection during the composition of HTML * pages. - * <p/> + * <p> * Note: in general, validators are safer than encoders. Encoding only ensures that content within * the encoded context cannot break out of said context. It requires that there be a context (for * instance, a string context in Javascript), and that damage cannot be done from within the context * (for instance, a javascript: URL within a href attribute. - * <p/> + * <p> * When in doubt, use a validator. */ @ProviderType @@ -122,8 +122,8 @@ public interface XSSAPI { String getValidCSSColor(@Nullable String color, @Nullable String defaultColor); /** - * Validate multi-line comment to be used inside a <script>...</script> or <style>...</style> block. Multi-line - * comment end block is disallowed + * Validate multi-line comment to be used inside a <script>...</script> or <style>...</style> block. Multi-line + * comment end block is disallowed. * * @param comment the comment to be used * @param defaultComment a default value to use if the comment is {@code null} or not valid. diff --git a/src/main/java/org/apache/sling/xss/XSSFilter.java b/src/main/java/org/apache/sling/xss/XSSFilter.java index 104328f..86c1409 100644 --- a/src/main/java/org/apache/sling/xss/XSSFilter.java +++ b/src/main/java/org/apache/sling/xss/XSSFilter.java @@ -42,7 +42,7 @@ public interface XSSFilter { /** * Prevents the given source string from containing XSS stuff. - * <p/> + * <p> * The default protection context is used for checking. * * @param src source string @@ -62,7 +62,7 @@ public interface XSSFilter { /** * Checks if the given URL is valid to be used for the <code>href</code> attribute in a <code>a</code> tag. - * <p/> + * <p> * The default protection context is used for checking. * * @param url the URL that should be validated diff --git a/src/main/java/org/apache/sling/xss/impl/HtmlToHtmlContentContext.java b/src/main/java/org/apache/sling/xss/impl/HtmlToHtmlContentContext.java index 758923c..a4ae93c 100644 --- a/src/main/java/org/apache/sling/xss/impl/HtmlToHtmlContentContext.java +++ b/src/main/java/org/apache/sling/xss/impl/HtmlToHtmlContentContext.java @@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory; /** * This class implements an escaping rule to be used for cleaning up existing HTML * content. The output will still be HTML. - * <p/> + * <p> * The cleanup is performed using the AntiSamy library found at * <a href="http://www.owasp.org/index.php/AntiSamy">http://www.owasp.org/index.php/AntiSamy</a> */ diff --git a/src/main/java/org/apache/sling/xss/impl/PolicyHandler.java b/src/main/java/org/apache/sling/xss/impl/PolicyHandler.java index b3cb4ff..de2f0c4 100644 --- a/src/main/java/org/apache/sling/xss/impl/PolicyHandler.java +++ b/src/main/java/org/apache/sling/xss/impl/PolicyHandler.java @@ -31,7 +31,9 @@ public class PolicyHandler { private AntiSamy antiSamy; /** - * Try to load a policy from the given relative path. + * Creates a {@code PolicyHandler} from an {@link InputStream}. + * + * @param policyStream the InputStream from which to read this handler's {@link Policy} */ public PolicyHandler(InputStream policyStream) throws Exception { // fix for classloader issue with IBM JVM: see bug #31946 -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
