Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad practice (FB.VA_FORMAT_STRING_USES_NEWLINE) in RelpEventOpen.java: 78 #222

Open
StrongestNumber9 opened this issue Jul 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@StrongestNumber9
Copy link
Contributor

Describe the bug

** CID 464526:  SpotBugs: Bad practice  (FB.VA_FORMAT_STRING_USES_NEWLINE)
/src/main/java/com/teragrep/rlp_03/frame/delegate/event/RelpEventOpen.java: 78 in com.teragrep.rlp_03.frame.delegate.event.RelpEventOpen.<init>(com.teragrep.rlp_03.version.Version)()


________________________________________________________________________________________________________
*** CID 464526:  SpotBugs: Bad practice  (FB.VA_FORMAT_STRING_USES_NEWLINE)
/src/main/java/com/teragrep/rlp_03/frame/delegate/event/RelpEventOpen.java: 78 in com.teragrep.rlp_03.frame.delegate.event.RelpEventOpen.<init>(com.teragrep.rlp_03.version.Version)()
72             this.fragmentFactory = new FragmentFactory();
73             this.version = version;
74     
75             Fragment txn = new FragmentStub();
76             Fragment command = fragmentFactory.create("rsp");
77             String payloadContent = String
>>>     CID 464526:  SpotBugs: Bad practice  (FB.VA_FORMAT_STRING_USES_NEWLINE)
>>>     Format string should use %n rather than \n.
78                     .format(
79                        "200 OK\nrelp_version=0\nrelp_software=rlp_03,%s,https://teragrep.com\ncommands=syslog\n",
80                             this.version.version()
81                     );
82             Fragment payload = fragmentFactory.create(payloadContent);
83             long payloadSize = payload.size();

Expected behavior

No warnings

Software version

Current

@StrongestNumber9 StrongestNumber9 added the bug Something isn't working label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants