Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363804 - Several string variables in properties files not OK
Summary: Several string variables in properties files not OK
Status: VERIFIED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 07:01 EST by Dani Megert CLA
Modified: 2012-11-06 03:45 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-11-15 07:01:22 EST
1.2.

Variables inside strings should be in single quotes.

There are several mistakes in the JGit properties files:
- some variables have no quotes at all
- some variables use double quotes
- some variables use ' which is not OK because single quotes need to be escaped 
  by '. This is also true for all other single quotes on the same line.

==> use ''{0}'' at all places and '' for single quotes on lines with variables
Comment 1 Dani Megert CLA 2011-11-15 07:07:07 EST
Note that there might be rare situations where no quotes are needed but those are rare.
Comment 2 Kevin Sawicki CLA 2011-11-15 16:11:01 EST
I pushed a fix that corrects the third case where a single ' was being used: http://egit.eclipse.org/r/#change,4624
Comment 3 Dani Megert CLA 2011-11-17 05:24:03 EST
>==> use ''{0}'' at all places and '' for single quotes on lines with variables

Just to clarify: this is mostly when you refer to resource or other named entities. If it's e.g. a number or something else then no quotes are needed.
Comment 4 Dani Megert CLA 2012-11-06 03:45:44 EST
This has been merged some time ago:
http://git.eclipse.org/c/jgit/jgit.git/commit/?id=1b472a7954f2614698f1e7295172a97a63050c46