File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
services-api/src/main/java/io/scalecube/services/api Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ public final class ServiceMessage {
2828 /** Error type header. */
2929 public static final String HEADER_ERROR_TYPE = "errorType" ;
3030
31- private Map <String , String > headers = new HashMap <>( 1 ) ;
31+ private final Map <String , String > headers ;
3232 private Object data ;
3333
3434 /** Instantiates empty message for deserialization purpose. */
35- ServiceMessage () {}
35+ ServiceMessage () {
36+ headers = new HashMap <>(2 );
37+ }
3638
3739 private ServiceMessage (Builder builder ) {
3840 this .data = builder .data ;
@@ -192,7 +194,7 @@ public String toString() {
192194
193195 public static class Builder {
194196
195- private Map <String , String > headers = new HashMap <>();
197+ private final Map <String , String > headers = new HashMap <>(2 );
196198 private Object data ;
197199
198200 private Builder () {}
You can’t perform that action at this time.
0 commit comments