Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 431353

Summary: Quotation marks around string literals should produce descriptive error messages in case of misleading usage
Product: [ECD] Orion Reporter: Maciej Bendkowski <maciej.bendkowski>
Component: DeploymentAssignee: Maciej Bendkowski <maciej.bendkowski>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne
Version: unspecified   
Target Milestone: 6.0 M1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Maciej Bendkowski CLA 2014-03-27 08:56:54 EDT
Cloud Foundry supports string literals surrounded with additional quotation marks, treating them as valid literals. This behaviour might confuse some users since my-application-name is not equal "my-application-name". Whenever possible, we should indicate misleading usage to the end user in form of descriptive error messages.
Comment 1 John Arthorne CLA 2014-03-27 14:49:37 EDT
Do we have JUnit tests for our manifest parsing and error reporting? This is the perfect kind of scenario for regression testing and making sure we handle the huge variety of errors users can make in their manifests.
Comment 2 Maciej Bendkowski CLA 2014-03-29 15:30:48 EDT
(In reply to John Arthorne from comment #1)
> Do we have JUnit tests for our manifest parsing and error reporting? This is
> the perfect kind of scenario for regression testing and making sure we
> handle the huge variety of errors users can make in their manifests.

Yes, we have. Each parser fix contains (and will contain) appropriate test cases.
Comment 4 John Arthorne CLA 2014-04-01 09:44:16 EDT
(In reply to Maciej Bendkowski from comment #2)
> Yes, we have. Each parser fix contains (and will contain) appropriate test
> cases.

Great! I'm a big fan of this approach as you may have learned from Szymon ;)
Comment 5 Maciej Bendkowski CLA 2014-04-01 12:12:13 EDT
(In reply to John Arthorne from comment #4)
> Great! I'm a big fan of this approach as you may have learned from Szymon ;)

I'm also very keen on having fine grained unit tests and further, functional tests wherever possible. They usually hinder developers (including myself) from introducing regressions. Never too late for good practice.