Code cleanups.

Made Violation public since it's used in method signatures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-10-20 17:20:17 +02:00
parent eb17b90924
commit 61b2f9870b
1 changed files with 4 additions and 5 deletions

View File

@ -34,7 +34,7 @@ import static java.util.EnumSet.noneOf;
*/ */
public class CookieCompliance implements ComplianceViolation.Mode public class CookieCompliance implements ComplianceViolation.Mode
{ {
enum Violation implements ComplianceViolation public enum Violation implements ComplianceViolation
{ {
COMMA_NOT_VALID_OCTET("https://tools.ietf.org/html/rfc6265#section-4.1.1", "Comma not valid as cookie-octet or separator"), COMMA_NOT_VALID_OCTET("https://tools.ietf.org/html/rfc6265#section-4.1.1", "Comma not valid as cookie-octet or separator"),
RESERVED_NAMES_NOT_DOLLAR_PREFIXED("https://tools.ietf.org/html/rfc6265#section-4.1.1", "Reserved names no longer use '$' prefix"); RESERVED_NAMES_NOT_DOLLAR_PREFIXED("https://tools.ietf.org/html/rfc6265#section-4.1.1", "Reserved names no longer use '$' prefix");
@ -57,13 +57,13 @@ public class CookieCompliance implements ComplianceViolation.Mode
@Override @Override
public String getURL() public String getURL()
{ {
return null; return url;
} }
@Override @Override
public String getDescription() public String getDescription()
{ {
return null; return description;
} }
} }
@ -87,9 +87,8 @@ public class CookieCompliance implements ComplianceViolation.Mode
private CookieCompliance(String name, Set<Violation> violations) private CookieCompliance(String name, Set<Violation> violations)
{ {
Objects.nonNull(violations);
_name = name; _name = name;
_violations = unmodifiableSet(copyOf(violations)); _violations = unmodifiableSet(copyOf(Objects.requireNonNull(violations)));
} }
@Override @Override