Skip to content

Commit 71467db

Browse files
committed
Version 1.1.1
1 parent 1c4b20e commit 71467db

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.github_changelog_generator

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
future-release=1.1.0
1+
future-release=1.1.2

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## [1.1.1](https://github.com/ethauvin/httpstatus/tree/1.1.1) (2024-06-07)
4+
5+
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.1.0...1.1.1)
6+
7+
**Implemented enhancements:**
8+
9+
- Sort command line output [\#10](https://github.com/ethauvin/HttpStatus/issues/10)
10+
- Update reasons properties status codes [\#9](https://github.com/ethauvin/HttpStatus/issues/9)
11+
312
## [1.1.0](https://github.com/ethauvin/httpstatus/tree/1.1.0) (2023-09-29)
413

514
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.0.5...1.1.0)

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ repositories {
7272
}
7373
7474
dependencies {
75-
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.0'
75+
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.1'
7676
}
7777
```
7878

@@ -94,7 +94,7 @@ As a `Maven` artifact:
9494
<dependency>
9595
<groupId>net.thauvin.erik.httpstatus</groupId>
9696
<artifactId>httpstatus</artifactId>
97-
<version>1.1.0</version>
97+
<version>1.1.1</version>
9898
</dependency>
9999
```
100100

@@ -315,15 +315,15 @@ The reasons are defined in a [ResourceBundle](https://docs.oracle.com/en/java/ja
315315
You can query the reason phrase for status codes as follows:
316316

317317
```console
318-
$ java -jar httpstatus-1.1.0.jar 404 500
318+
$ java -jar httpstatus-1.1.1.jar 404 500
319319
404: Not Found
320320
500: Internal Server Error
321321
```
322322

323323
If no status code is specified, all will be printed:
324324

325325
```console
326-
$ java -jar httpstatus-1.1.0.jar
326+
$ java -jar httpstatus-1.1.1.jar
327327
100: Continue
328328
101: Switching Protocols
329329
102: Processing
@@ -343,7 +343,7 @@ $ java -jar httpstatus-1.1.0.jar
343343
You can also print status codes by [response classes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes):
344344

345345
```console
346-
$ java -jar httpstatus-1.1.0.jar 2xx
346+
$ java -jar httpstatus-1.1.1.jar 2xx
347347
200: OK
348348
201: Created
349349
202: Accepted

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>net.thauvin.erik.httpstatus</groupId>
66
<artifactId>httpstatus</artifactId>
7-
<version>1.1.1-SNAPSHOT</version>
7+
<version>1.1.1</version>
88
<name>HttpStatus</name>
99
<description>Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages</description>
1010
<url>https://github.com/ethauvin/HttpStatus</url>

src/bld/java/net/thauvin/erik/httpstatus/HttpStatusBuild.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class HttpStatusBuild extends Project {
5858
public HttpStatusBuild() {
5959
pkg = "net.thauvin.erik.httpstatus";
6060
name = "HttpStatus";
61-
version = version(1, 1, 1, "SNAPSHOT");
61+
version = version(1, 1, 1);
6262

6363
var description = "Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages";
6464
var url = "https://github.com/ethauvin/HttpStatus";

src/main/java/net/thauvin/erik/httpstatus/Reasons.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,23 @@ public static String getReasonPhrase(String statusCode) {
9999
public static void main(String... args) {
100100
var keys = new TreeSet<>(REASON_PHRASES.keySet());
101101
if (args.length >= 1) {
102-
for (var key : args) {
103-
if (key.endsWith("xx")) {
104-
var responseClass = key.charAt(0);
105-
keys.forEach((k) -> {
102+
for (var arg : args) {
103+
if (arg.endsWith("xx")) { // e.g.: 2xx
104+
var responseClass = arg.charAt(0);
105+
keys.forEach(k -> {
106106
if (k.charAt(0) == responseClass) {
107107
System.out.println(k + ": " + REASON_PHRASES.get(k));
108108
}
109109
});
110-
} else {
111-
var value = REASON_PHRASES.get(key);
110+
} else { // e.g.: 404
111+
var value = REASON_PHRASES.get(arg);
112112
if (value != null) {
113-
System.out.println(key + ": " + value);
113+
System.out.println(arg + ": " + value);
114114
}
115115
}
116116
}
117-
} else {
118-
keys.forEach((k) -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
117+
} else { // Print all
118+
keys.forEach(k -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
119119
System.out.println("Total: " + REASON_PHRASES.size());
120120
}
121121
}

0 commit comments

Comments
 (0)