File tree Expand file tree Collapse file tree 3 files changed +16
-18
lines changed
commons/src/main/java/org/restheart/utils
core/src/main/java/org/restheart/services Expand file tree Collapse file tree 3 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,4 @@ $RECYCLE.BIN/
286
286
# ## infer ###
287
287
# infer- http://fbinfer.com/
288
288
infer-out
289
- /commons /nbproject /
290
-
291
- rebel.xml
289
+ /commons /nbproject /
Original file line number Diff line number Diff line change 20
20
*/
21
21
package org .restheart .utils ;
22
22
23
- import static java .nio .file .StandardWatchEventKinds .ENTRY_CREATE ;
24
- import static java .nio .file .StandardWatchEventKinds .ENTRY_DELETE ;
25
- import static java .nio .file .StandardWatchEventKinds .ENTRY_MODIFY ;
26
-
27
23
import java .io .IOException ;
28
24
import java .nio .file .FileSystems ;
29
25
import java .nio .file .Files ;
30
26
import java .nio .file .Path ;
27
+ import static java .nio .file .StandardWatchEventKinds .ENTRY_CREATE ;
28
+ import static java .nio .file .StandardWatchEventKinds .ENTRY_DELETE ;
29
+ import static java .nio .file .StandardWatchEventKinds .ENTRY_MODIFY ;
31
30
import java .nio .file .WatchEvent ;
32
31
import java .nio .file .WatchEvent .Kind ;
33
32
import java .nio .file .WatchKey ;
@@ -78,6 +77,7 @@ private void registerDirectoryAndSubdirectories(Path dir) throws IOException {
78
77
}
79
78
80
79
@ Override
80
+ @ SuppressWarnings ("unchecked" )
81
81
public void run () {
82
82
while (true ) {
83
83
WatchKey key ;
Original file line number Diff line number Diff line change @@ -54,21 +54,21 @@ public void setup() {
54
54
@ Override
55
55
public void handle (final ByteArrayRequest request , final ByteArrayResponse response ) throws Exception {
56
56
if (request .isGet ()) {
57
- final StringBuilder pingMessageBuilder = new StringBuilder ();
57
+ final var pingMessageBuilder = new StringBuilder ();
58
58
if (this .isExtendedResponseEnabled ) {
59
59
pingMessageBuilder .append ("{\" message\" : \" " )
60
- .append (msg )
61
- .append ("\" , \" client_ip\" : \" " )
62
- .append (getClientIp (request .getExchange ()))
63
- .append ("\" , \" host\" : \" " )
64
- .append (getHostHeader (request .getExchange ()))
65
- .append ("\" , \" version\" : \" " )
66
- .append (VERSION )
67
- .append ("\" }" );
60
+ .append (msg )
61
+ .append ("\" , \" client_ip\" : \" " )
62
+ .append (getClientIp (request .getExchange ()))
63
+ .append ("\" , \" host\" : \" " )
64
+ .append (getHostHeader (request .getExchange ()))
65
+ .append ("\" , \" version\" : \" " )
66
+ .append (VERSION )
67
+ .append ("\" }" );
68
68
} else {
69
69
pingMessageBuilder .append ("{\" message\" : \" " )
70
- .append (msg )
71
- .append ("\" }" );
70
+ .append (msg )
71
+ .append ("\" }" );
72
72
}
73
73
74
74
final String pingMessage = pingMessageBuilder .toString ();
You can’t perform that action at this time.
0 commit comments