Community
Participate
Working Groups
As part of bug 356620 and bug 365446, users can specify the index file for a given jar. Users can specify the index file through UI (bug 364287). As part of this, an API is required to validate the index file.
Created attachment 209438 [details] Proposed patch Added new API JavaConventions.validateIndexFile(IPath jarLocation, URL indexURL) so that one can verify the index file is good.
Jay, Can you please review?
(In reply to comment #1) > Added new API JavaConventions.validateIndexFile(IPath jarLocation, URL > indexURL) so that one can verify the index file is good. Satyam, what sort of validation happens here.. - The API verifies that the indexURL indeed points to an index file? - Does the API also verify that the index file corresponds to the jar specified by jarLocation? If not, do you really need jarLocation ?
Satyam, some minor points/questions on the patch: 1. As Deepak mentioned, the jarLocation is not really used in this case. 2. The constant INDEX_FILE_NOT_ABLE_TO_READ can be better named, e.g. UNREADABLE_INDEX_FILE 3. In the javadoc of the constants, we should have an empty line before @since. I also noticed the previous two constants (one of them from me!) have the same problem. May be we can fix them too, now. 4. ClasspathEntry being internal, the @since tag is not required.
Since there is no UI, see bug 364287, there is no need for this API.