Bug 183870 - Wrong Error Message Displayed for DStore Connections when File Exists
Summary: Wrong Error Message Displayed for DStore Connections when File Exists
Status: VERIFIED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC All
: P3 minor (vote)
Target Milestone: 2.0   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
: 183839 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-24 17:18 EDT by Kevin Doyle CLA
Modified: 2011-05-25 10:17 EDT (History)
2 users (show)

See Also:


Attachments
Fix for displaying file exists error message (2.00 KB, patch)
2007-04-24 17:22 EDT, Kevin Doyle CLA
no flags Details | Diff
Changed exception thrown for folder exists (2.00 KB, patch)
2007-04-26 09:36 EDT, Kevin Doyle CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-04-24 17:18:02 EDT
When creating a new file the error message displayed when the file already exists is:

"No authority or file name not valid"  -- RSEF1302

When creating a folder the error message displayed when the folder already exists is:

"Creation of the folder failed" -- RSEF1304

The error message that should be displayed is that the file already exists.

The reason this is happening is in DStoreFileService the createFile and createFolder functions do a check for success and return the file or else throw the error message.

It should do the check for success then do a check if the status is IServiceConstants.FAILED_WITH_EXIST and throws the appropriate exception, else throws the exception that is being thrown now.

-----------Enter bugs above this line-----------
installation : eclipse-SDK-3.3M6
RSE install  : RSE2.0M6a
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Kevin Doyle CLA 2007-04-24 17:22:47 EDT
Created attachment 64792 [details]
Fix for displaying file exists error message

Simple fix that just checks the status if it's IServiceConstants.FAILED_WITH_EXIST and throws the appropriate File Exists exception.

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 2 Kevin Doyle CLA 2007-04-26 09:36:43 EDT
Created attachment 65032 [details]
Changed exception thrown for folder exists

Changed the message thrown with SystemMessageException to be "Folder already exists" instead of "File already exists" when creating a new folder.
Comment 3 Martin Oberhuber CLA 2007-04-27 03:56:25 EDT
The patch looks good to me. Dave do you want to apply it?
Please remember editing www-tm-dev/tm-log.cvs
Comment 4 Martin Oberhuber CLA 2007-04-27 05:09:35 EDT
*** Bug 183839 has been marked as a duplicate of this bug. ***
Comment 5 David McKnight CLA 2007-04-27 09:41:31 EDT
I've applied the patch.
Comment 6 Martin Oberhuber CLA 2008-08-13 13:18:42 EDT
[target cleanup] 2.0 M7 was the original target milestone for this bug