Version 1.1.1

This commit is contained in:
Erik C. Thauvin 2024-06-07 17:34:21 -07:00
parent 1c4b20e11c
commit 71467db442
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 26 additions and 17 deletions

View file

@ -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";

View file

@ -99,23 +99,23 @@ public final class Reasons {
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());
}
}