Skip to content

Commit 2626d2b

Browse files
committed
Polish SseParser
1 parent b57f54e commit 2626d2b

File tree

1 file changed

+5
-5
lines changed
  • independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl

1 file changed

+5
-5
lines changed

independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/SseParser.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public class SseParser implements Handler<Buffer> {
2727
/**
2828
* Holds the current event's comment data as we read them
2929
*/
30-
private StringBuffer commentBuffer = new StringBuffer();
30+
private final StringBuffer commentBuffer = new StringBuffer();
3131
/**
3232
* Holds the current event's field name as we read a field
3333
*/
34-
private StringBuffer nameBuffer = new StringBuffer();
34+
private final StringBuffer nameBuffer = new StringBuffer();
3535
/**
3636
* Holds the current event's field value as we read a field
3737
*/
38-
private StringBuffer valueBuffer = new StringBuffer();
38+
private final StringBuffer valueBuffer = new StringBuffer();
3939
/**
4040
* True if we're at the very beginning of the data stream and could see a BOM
4141
*/
@@ -60,7 +60,7 @@ public class SseParser implements Handler<Buffer> {
6060
/**
6161
* The event data we're reading. Defaults to "" and changes with "data" fields
6262
*/
63-
private StringBuffer dataBuffer = new StringBuffer();
63+
private final StringBuffer dataBuffer = new StringBuffer();
6464
/**
6565
* The event's last id we're reading. Defaults to null and changes with "id" fields (cannot be reset)
6666
*/
@@ -69,7 +69,7 @@ public class SseParser implements Handler<Buffer> {
6969
* The event connect time we're reading. Defaults to -1 and changes with "retry" fields (in ms)
7070
*/
7171
private long eventReconnectTime = SseEvent.RECONNECT_NOT_SET;
72-
private SseEventSourceImpl sseEventSource;
72+
private final SseEventSourceImpl sseEventSource;
7373

7474
public SseParser(SseEventSourceImpl sseEventSource, String defaultContentType) {
7575
this.sseEventSource = sseEventSource;

0 commit comments

Comments
 (0)