diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml
deleted file mode 100644
index 95c433c..0000000
--- a/.idea/checkstyle-idea.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 63787bb..60682bf 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -1,15 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9d92aa6..2ce963b 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,8 +1,5 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/.idea/modules/httpstatus.iml b/.idea/modules/httpstatus.iml
deleted file mode 100644
index 24d0b52..0000000
--- a/.idea/modules/httpstatus.iml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 49e611e..35eb1dd 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -1,7 +1,6 @@
-
-
+
\ No newline at end of file
diff --git a/HttpStatus.ipr b/HttpStatus.ipr
deleted file mode 100644
index 7e19236..0000000
--- a/HttpStatus.ipr
+++ /dev/null
@@ -1,686 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1.8.x
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index eea5bf9..9b02669 100644
--- a/build.gradle
+++ b/build.gradle
@@ -17,15 +17,15 @@ import org.apache.tools.ant.taskdefs.condition.Os
defaultTasks 'deploy'
-def deployDir = 'deploy'
+final def deployDir = 'deploy'
-def mavenName = 'HttpStatus'
-def mavenDescription = 'HttpStatus JSP Tag Library'
-def mavenUrl = 'https://github.com/ethauvin/HttpStatus'
-def mavenLicense = 'The BSD 3-Clause License'
-def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
-def mavenScmCon = 'https://github.com/ethauvin/HttpStatus.git'
-def mavenScmDevCon = 'git@github.com:ethauvin/HttpStatus.git'
+final def mavenName = 'HttpStatus'
+final def mavenDescription = 'HttpStatus JSP Tag Library'
+final def mavenUrl = 'https://github.com/ethauvin/HttpStatus'
+final def mavenLicense = 'The BSD 3-Clause License'
+final def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
+final def mavenScmCon = 'https://github.com/ethauvin/HttpStatus.git'
+final def mavenScmDevCon = 'git@github.com:ethauvin/HttpStatus.git'
group = 'net.thauvin.erik.httpstatus'
@@ -49,7 +49,7 @@ dependencies {
compileOnly 'javax.servlet.jsp:jsp-api:2.2.1-b03'
compileOnly 'javax.el:javax.el-api:3.0.1-b06'
- spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
+ spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0'
spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.4.7'
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
@@ -115,8 +115,8 @@ pmd {
tasks.withType(SpotBugsTask) {
reports {
- xml.enabled = false
- html.enabled = true
+ xml.required = false
+ html.required = true
}
}
@@ -196,7 +196,7 @@ task release {
task pandoc(type: Exec) {
group = 'Documentation'
- def pandoc_args = ['--from', 'gfm',
+ final def pandoc_args = ['--from', 'gfm',
'--to', 'html5',
'--metadata', "pagetitle=$mavenDescription",
'-s',
@@ -216,7 +216,7 @@ task pandoc(type: Exec) {
}
jacoco {
- toolVersion = '0.8.8-SNAPSHOT'
+ toolVersion = '0.8.9-SNAPSHOT'
}
jacocoTestReport {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 00e33ed..aa991fc 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/src/main/java/net/thauvin/erik/httpstatus/Reasons.java b/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
index db59093..44b5283 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
@@ -42,7 +42,7 @@ import java.util.concurrent.ConcurrentHashMap;
* Populates the {@link #REASON_PHRASES reason phrases} map from {@link #BUNDLE_BASENAME bundle properties}, and
* implements accessor methods.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-02
* @since 1.0
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/StatusCode.java b/src/main/java/net/thauvin/erik/httpstatus/StatusCode.java
index e8221ce..526331f 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/StatusCode.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/StatusCode.java
@@ -37,7 +37,7 @@ import java.io.Serializable;
/**
* The StatusCode
bean implements methods to check the class of an HTTP status code.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
*/
public class StatusCode implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/net/thauvin/erik/httpstatus/Utils.java b/src/main/java/net/thauvin/erik/httpstatus/Utils.java
index e7b97fd..b40967a 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/Utils.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/Utils.java
@@ -38,7 +38,7 @@ import java.io.Writer;
/**
* The Utils
class implements a collection of utility methods used throughout this project.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/taglibs/CauseTag.java b/src/main/java/net/thauvin/erik/httpstatus/taglibs/CauseTag.java
index a5078b0..df4f7e8 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/taglibs/CauseTag.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/taglibs/CauseTag.java
@@ -41,7 +41,7 @@ import java.io.IOException;
/**
* The <hs:cause>
tag returns the cause (if any) for the current HTTP Status Error Code.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/taglibs/CodeTag.java b/src/main/java/net/thauvin/erik/httpstatus/taglibs/CodeTag.java
index 079e551..0e17111 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/taglibs/CodeTag.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/taglibs/CodeTag.java
@@ -40,7 +40,7 @@ import java.io.IOException;
/**
* The <hs:code>
tag returns the HTTP Status Error Code.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/taglibs/MessageTag.java b/src/main/java/net/thauvin/erik/httpstatus/taglibs/MessageTag.java
index ae81a96..12d4e7b 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/taglibs/MessageTag.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/taglibs/MessageTag.java
@@ -41,7 +41,7 @@ import java.io.IOException;
/**
* The <hs:message>
tag returns the message (if any) for the current error.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2022-03-16
* @since 1.0.5
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/taglibs/ReasonTag.java b/src/main/java/net/thauvin/erik/httpstatus/taglibs/ReasonTag.java
index 1720752..04fd948 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/taglibs/ReasonTag.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/taglibs/ReasonTag.java
@@ -43,7 +43,7 @@ import java.io.IOException;
* The <hs:reason>
tag returns the Reason Phrase for the current (or specified) HTTP Status Error
* Code.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-02
* @since 1.0
*/
diff --git a/src/main/java/net/thauvin/erik/httpstatus/taglibs/XmlSupport.java b/src/main/java/net/thauvin/erik/httpstatus/taglibs/XmlSupport.java
index 83083b7..ecf0ed6 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/taglibs/XmlSupport.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/taglibs/XmlSupport.java
@@ -37,7 +37,7 @@ import javax.servlet.jsp.tagext.SimpleTagSupport;
/**
* Adds support for the default
and escapeXml
tag attributes.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/
diff --git a/src/test/java/net/thauvin/erik/httpstatus/ReasonsMainTest.java b/src/test/java/net/thauvin/erik/httpstatus/ReasonsMainTest.java
index 94eb207..5eedc85 100644
--- a/src/test/java/net/thauvin/erik/httpstatus/ReasonsMainTest.java
+++ b/src/test/java/net/thauvin/erik/httpstatus/ReasonsMainTest.java
@@ -47,7 +47,7 @@ import static org.testng.Assert.assertTrue;
/**
* Main Class Tests.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2019-05-06
* @since 1.0
*/
diff --git a/src/test/java/net/thauvin/erik/httpstatus/ReasonsTest.java b/src/test/java/net/thauvin/erik/httpstatus/ReasonsTest.java
index 8ca1c39..6409642 100644
--- a/src/test/java/net/thauvin/erik/httpstatus/ReasonsTest.java
+++ b/src/test/java/net/thauvin/erik/httpstatus/ReasonsTest.java
@@ -41,7 +41,7 @@ import static org.testng.Assert.assertEquals;
/**
* Reasons Tests.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/
diff --git a/src/test/java/net/thauvin/erik/httpstatus/StatusCodeTest.java b/src/test/java/net/thauvin/erik/httpstatus/StatusCodeTest.java
index d814eca..cf11aeb 100644
--- a/src/test/java/net/thauvin/erik/httpstatus/StatusCodeTest.java
+++ b/src/test/java/net/thauvin/erik/httpstatus/StatusCodeTest.java
@@ -42,7 +42,7 @@ import static org.testng.Assert.*;
/**
* StatusCode Tests.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
*/
@SuppressFBWarnings("CE_CLASS_ENVY")
public class StatusCodeTest {
@@ -50,9 +50,8 @@ public class StatusCodeTest {
void testStatusCode() {
final ResourceBundle bundle = ResourceBundle.getBundle(Reasons.BUNDLE_BASENAME);
StatusCode statusCode = new StatusCode();
- int code;
for (final String key : bundle.keySet()) {
- code = Integer.parseInt(key);
+ final int code = Integer.parseInt(key);
statusCode.setCode(code);
assertEquals(statusCode.getCode(), code, "is not " + code);
assertEquals(statusCode.isInfo(), code >= 100 && code < 200, code + " is info");
@@ -66,15 +65,21 @@ public class StatusCodeTest {
assertEquals(statusCode.getReason(), Reasons.getReasonPhrase(code), code + "reason phrase is not valid");
}
- code = 600;
- statusCode = new StatusCode(code);
- assertEquals(statusCode.getCode(), 600, "is not " + code);
- assertFalse(statusCode.isInfo(), code + " is info");
- assertFalse(statusCode.isSuccess(), code + " is ok");
- assertFalse(statusCode.isRedirect(), code + " is redirect");
- assertFalse(statusCode.isClientError(), code + " is client error");
- assertFalse(statusCode.isServerError(), code + " is server error");
- assertFalse(statusCode.isError(), code + " is error");
- assertFalse(statusCode.isValid(), "600 is invalid");
+ final int[] unknowns = {0, 99, 600};
+ for (final int code : unknowns) {
+ statusCode.setCode(code);
+ assertEquals(statusCode.getCode(), code, "is not " + code);
+ assertFalse(statusCode.isInfo(), code + " is info");
+ assertFalse(statusCode.isSuccess(), code + " is ok");
+ assertFalse(statusCode.isRedirect(), code + " is redirect");
+ assertFalse(statusCode.isClientError(), code + " is client error");
+ assertFalse(statusCode.isServerError(), code + " is server error");
+ assertFalse(statusCode.isError(), code + " is error");
+ assertFalse(statusCode.isValid(), "600 is invalid");
+ assertNull(statusCode.getReason(), code + "reason phrase is not null.");
+ }
+
+ statusCode = new StatusCode(900);
+ assertEquals(statusCode.getCode(), 900, "is not 900");
}
}
diff --git a/src/test/java/net/thauvin/erik/httpstatus/UtilsTest.java b/src/test/java/net/thauvin/erik/httpstatus/UtilsTest.java
index d0af31d..8636fee 100644
--- a/src/test/java/net/thauvin/erik/httpstatus/UtilsTest.java
+++ b/src/test/java/net/thauvin/erik/httpstatus/UtilsTest.java
@@ -43,7 +43,7 @@ import static org.testng.Assert.assertEquals;
/**
* Utils Tests.
*
- * @author Erik C. Thauvin
+ * @author Erik C. Thauvin
* @created 2015-12-03
* @since 1.0
*/