Bug 576340 - Non-API types exposed
Summary: Non-API types exposed
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-30 03:41 EDT by Thomas Wolf CLA
Modified: 2021-11-23 18:02 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wolf CLA 2021-09-30 03:41:15 EDT
* StoredObjectRepresentationNotAvailableException: ObjectToPack.
* BitmapIndex.BitmapBuilder.removeAllOrNone(): PackBitmapIndex.
* PackParser.parse(): PackLock.
* UploadPack.setCachedPackUriProvider(): CachedPackUriProvider.

Can we fix these for 6.0?
Comment 1 Thomas Wolf CLA 2021-11-06 20:18:46 EDT
PackParser.parse() returning PackLock: the only thing a user should do with the returned object is unlock it to make sure the pack is unlocked. Can we turn this into an interface, exposing only the unlock() method? Then have an internal PackLockImpl, and use that internally?
Comment 2 Thomas Wolf CLA 2021-11-07 13:05:21 EST
UploadPack.setCachedPackUriProvider(): none of the methods of CachePack appear to be pertinent to a CachedPackUriProvider.

So I'd make CachedPackUriProvider public, but replace CachedPack by an (empty) marker interface ICachedPack. CachedPack would implement ICachedPack, but itself remain internal.

Making CachedPack public would require also making ObjectToPack and StoredObjectRepresentation public...
Comment 3 Eclipse Genie CLA 2021-11-07 16:17:07 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/187491
Comment 4 Eclipse Genie CLA 2021-11-07 16:17:08 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/187492
Comment 5 Thomas Wolf CLA 2021-11-07 16:44:54 EST
BitmapIndex.BitmapBuilder.removeAllOrNone(): not quite clear to me what to do about the internal type PackBitmapIndex. Perhaps also a public interface; but would it make sense to expose some of the methods on the current abstract class, and if so, which ones? 

Or should this removeAllOrNone() methods not be public at all?