diff --git a/.github_changelog_generator b/.github_changelog_generator
index 19e45d2..9410c34 100644
--- a/.github_changelog_generator
+++ b/.github_changelog_generator
@@ -1 +1 @@
-future-release=1.1.0
+future-release=1.1.2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a090c2..159135a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## [1.1.1](https://github.com/ethauvin/httpstatus/tree/1.1.1) (2024-06-07)
+
+[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.1.0...1.1.1)
+
+**Implemented enhancements:**
+
+- Sort command line output [\#10](https://github.com/ethauvin/HttpStatus/issues/10)
+- Update reasons properties status codes [\#9](https://github.com/ethauvin/HttpStatus/issues/9)
+
## [1.1.0](https://github.com/ethauvin/httpstatus/tree/1.1.0) (2023-09-29)
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.0.5...1.1.0)
diff --git a/README.md b/README.md
index 0ba1b45..64870d5 100644
--- a/README.md
+++ b/README.md
@@ -72,7 +72,7 @@ repositories {
}
dependencies {
- implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.0'
+ implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.1'
}
```
@@ -94,7 +94,7 @@ As a `Maven` artifact:
net.thauvin.erik.httpstatus
httpstatus
- 1.1.0
+ 1.1.1
```
@@ -315,7 +315,7 @@ The reasons are defined in a [ResourceBundle](https://docs.oracle.com/en/java/ja
You can query the reason phrase for status codes as follows:
```console
-$ java -jar httpstatus-1.1.0.jar 404 500
+$ java -jar httpstatus-1.1.1.jar 404 500
404: Not Found
500: Internal Server Error
```
@@ -323,7 +323,7 @@ $ java -jar httpstatus-1.1.0.jar 404 500
If no status code is specified, all will be printed:
```console
-$ java -jar httpstatus-1.1.0.jar
+$ java -jar httpstatus-1.1.1.jar
100: Continue
101: Switching Protocols
102: Processing
@@ -343,7 +343,7 @@ $ java -jar httpstatus-1.1.0.jar
You can also print status codes by [response classes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes):
```console
-$ java -jar httpstatus-1.1.0.jar 2xx
+$ java -jar httpstatus-1.1.1.jar 2xx
200: OK
201: Created
202: Accepted
diff --git a/pom.xml b/pom.xml
index a847a0e..80d44f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
net.thauvin.erik.httpstatus
httpstatus
- 1.1.1-SNAPSHOT
+ 1.1.1
HttpStatus
Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages
https://github.com/ethauvin/HttpStatus
diff --git a/src/bld/java/net/thauvin/erik/httpstatus/HttpStatusBuild.java b/src/bld/java/net/thauvin/erik/httpstatus/HttpStatusBuild.java
index ee382f9..23993e6 100644
--- a/src/bld/java/net/thauvin/erik/httpstatus/HttpStatusBuild.java
+++ b/src/bld/java/net/thauvin/erik/httpstatus/HttpStatusBuild.java
@@ -58,7 +58,7 @@ public class HttpStatusBuild extends Project {
public HttpStatusBuild() {
pkg = "net.thauvin.erik.httpstatus";
name = "HttpStatus";
- version = version(1, 1, 1, "SNAPSHOT");
+ version = version(1, 1, 1);
var description = "Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages";
var url = "https://github.com/ethauvin/HttpStatus";
diff --git a/src/main/java/net/thauvin/erik/httpstatus/Reasons.java b/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
index 7447603..0b206fd 100644
--- a/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
+++ b/src/main/java/net/thauvin/erik/httpstatus/Reasons.java
@@ -99,23 +99,23 @@ public static String getReasonPhrase(String statusCode) {
public static void main(String... args) {
var keys = new TreeSet<>(REASON_PHRASES.keySet());
if (args.length >= 1) {
- for (var key : args) {
- if (key.endsWith("xx")) {
- var responseClass = key.charAt(0);
- keys.forEach((k) -> {
+ for (var arg : args) {
+ if (arg.endsWith("xx")) { // e.g.: 2xx
+ var responseClass = arg.charAt(0);
+ keys.forEach(k -> {
if (k.charAt(0) == responseClass) {
System.out.println(k + ": " + REASON_PHRASES.get(k));
}
});
- } else {
- var value = REASON_PHRASES.get(key);
+ } else { // e.g.: 404
+ var value = REASON_PHRASES.get(arg);
if (value != null) {
- System.out.println(key + ": " + value);
+ System.out.println(arg + ": " + value);
}
}
}
- } else {
- keys.forEach((k) -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
+ } else { // Print all
+ keys.forEach(k -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
System.out.println("Total: " + REASON_PHRASES.size());
}
}