Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334705 - setRuntimeDefaultName suffix incorrectly starts at 3 instead of 2
Summary: setRuntimeDefaultName suffix incorrectly starts at 3 instead of 2
Status: RESOLVED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.5   Edit
Assignee: Elson Yuen CLA
QA Contact: Elson Yuen CLA
URL:
Whiteboard:
Keywords:
: 343457 353573 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-18 15:59 EST by Steven Hung CLA
Modified: 2017-10-11 16:37 EDT (History)
3 users (show)

See Also:


Attachments
v1.0 (851 bytes, patch)
2011-04-06 17:05 EDT, Angel Vera CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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