Bug 225507 - [api][breaking] RSE dstore API leaks non-API types
Summary: [api][breaking] RSE dstore API leaks non-API types
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P1 enhancement (vote)
Target Milestone: 3.0 M6   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-04-03 05:35 EDT by Martin Oberhuber CLA
Modified: 2008-04-03 12:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-04-03 05:35:47 EDT
Here is the list of affected plugins, with number of leakage problems detected:
 5  org.eclipse.dstore.core
 1  org.eclipse.rse.services.dstore
Comment 1 David McKnight CLA 2008-04-03 09:13:48 EDT
For the rse.services.dstore one, I notice that the complaint is that we're overriding a deprecated method from IFileService.  Should we be getting all deprecated methods now?
Comment 2 Martin Oberhuber CLA 2008-04-03 09:16:53 EDT
No, the deprecated thing is not a problem, you can keep it in.

You're looking at the wrong complaint. The right one is:

UniversalFileSystemMiner.java  line  109
Leaks non-API type org.eclipse.rse.internal.dstore.universal.miners.filesystem.FileClassifier via return type

Please ensure that you do Problems View > LocalMenu > Configure Contents, and enable the "API Tools" Problems. What I did was even create a new problems view config that ONLY shows API Tools problems.
Comment 3 David McKnight CLA 2008-04-03 10:12:21 EDT
I've changed a few methods to use the proper interface rather than the implementation:
DomainNotifier -> IDomainNotifier
ExternalLoader -> IExternalLoader

I've made the following API:
CommandGenerator
Receiver

I've created IDataStoreTrustManager to be used as the interface for DataStoreTrustManager.

For the FileClassifier stuff in UniversalFileSystemMiner, we don't need to expose it since we don't use the C_QUERY_FILE_CLASSIFICATION and C_QUERY_FILE_CLASSIFICATIONS operations anymore.  I've also removed those constants.

Comment 4 Martin Oberhuber CLA 2008-04-03 11:50:59 EDT
So, what if an IBM RSE 7 client would want to use C_QUERY_FILE_CLASSIFICATION on an openRSE server?
Comment 5 David McKnight CLA 2008-04-03 12:17:46 EDT
(In reply to comment #4)
> So, what if an IBM RSE 7 client would want to use C_QUERY_FILE_CLASSIFICATION
> on an openRSE server?

Well, first thing is, the IBM RSE 7 client never used that command.  Second, if it were used, the client would be responsible to make sure the command descriptor exists before trying to send the command.