[ZBX-11745] Wrong newline character reported by Coverity (java gateway) Created: 2017 Jan 26  Updated: 2024 Apr 10  Resolved: 2017 Feb 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Java gateway (J)
Affects Version/s: 3.4.0alpha1
Fix Version/s: 3.4.0alpha1

Type: Incident report Priority: Minor
Reporter: Sergejs Paskevics Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: codequality
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Sprint: Sprint 1

 Description   

(CID 155655)

System.out.printf("%s v%s (revision %s) (%s)\n", APPLICATION_NAME, VERSION, REVISION, REVISION_DATE);

This format string include a newline character (\n). In format strings, it is generally preferable better to use %n, which will produce the platform-specific line separator.



 Comments   
Comment by Sergejs Paskevics [ 2017 Jan 26 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-11745

Comment by Vjaceslavs Bogdanovs [ 2017 Feb 01 ]

Successfully tested. Minor coding style changes made.

Comment by Sergejs Paskevics [ 2017 Feb 02 ]

Fixed in pre-3.3.0 (trunk) r65495.

Generated at Sat Mar 15 07:22:03 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.