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

Bug 334705

Summary: setRuntimeDefaultName suffix incorrectly starts at 3 instead of 2
Product: [WebTools] WTP ServerTools Reporter: Steven Hung <sghung>
Component: wst.serverAssignee: Elson Yuen <eyuen7>
Status: RESOLVED FIXED QA Contact: Elson Yuen <eyuen7>
Severity: normal    
Priority: P3 CC: deboer, dimitar.giormov, eyuen7
Version: 3.2   
Target Milestone: 3.2.5   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/109067
Whiteboard:
Attachments:
Description Flags
v1.0 none

Description Steven Hung CLA 2011-01-18 15:59:47 EST
Build Identifier: 

In org.eclipse.wst.server.core.ServerUtil.setRuntimeDefaultName(IRuntimeWorkingCopy, int)

The suffix should start at 1 instead of 2 because in the case where the runtime name is in use, it will increment in the while loop, causing it to start at 3 instead of 2.

Setting to Normal, since the user will see <Server name> (3) instead of <Server name> (2), which can be confusing as to why it starts at 3.

Reproducible: Always
Comment 1 Steven Hung CLA 2011-01-18 16:00:59 EST
I had not included the build id, since I had checked out the code from the eclipse CVS repository
Comment 2 Angel Vera CLA 2011-01-18 16:22:53 EST
It seems that the changes were caused because the suffix++ was moved up before the NLS.bind occurs. This was introduced by the changes in bug# 300255
Comment 3 Angel Vera CLA 2011-04-06 17:05:16 EDT
Created attachment 192674 [details]
v1.0

Can you test the patch attached? You will need to check out the plugin from the 32M branch.
Comment 4 Angel Vera CLA 2011-04-21 10:05:57 EDT
*** Bug 343457 has been marked as a duplicate of this bug. ***
Comment 5 Elson Yuen CLA 2011-08-16 17:11:51 EDT
*** Bug 353573 has been marked as a duplicate of this bug. ***
Comment 6 Elson Yuen CLA 2011-08-16 17:23:58 EDT
Changes looks good.

Code released to 32M, 33M and HEAD.
Comment 7 Eclipse Genie CLA 2017-10-11 16:37:13 EDT
New Gerrit change created: https://git.eclipse.org/r/109067