-
Notifications
You must be signed in to change notification settings - Fork 77
add getBlobStore method #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
64cb425
add getBlobStore method
mawinter69 2614cfd
add default implementation for getBlobStore()
mawinter69 444c42f
more places where to replace getContext() with getBlobStore()
mawinter69 32e83ab
remove unneeded override
mawinter69 d27837b
cleanup imports
mawinter69 4b931eb
revert changes to files where only whitespace has changed
mawinter69 da40ea1
remove unused import
mawinter69 88916d4
Merge branch 'master' of https://github.com/jenkinsci/artifact-manage…
mawinter69 060e8e7
Merge branch 'master' of github.com:jenkinsci/artifact-manager-s3-plugin
mawinter69 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could perhaps be made non
abstract(throwing anAbstractMethodErrorat runtime if neither method is overridden, to avoid aStackOverflowError), since in the other direction there is aBlobStore.getContext()(used in this plugin only toclosethe context for tests…which is likely a bug).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where
BlobStore.getContext()is used. In the testBlobStoreProvider.getContext()is used and on this context theclose()is called.I think it should stay abstract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, to clarify: I think we could write something along the lines of:
where the modifiers could be uncommented and the code simplified if we did not care to retain backward compatibility for hypothetical external implementations (none are known).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this might work as well, when speaking of not retaining backward compatibility one could also consider removing the
getContext()method completely.The getBlobStore should always be abstract I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you could just inline it in that case.
Then calls to this method against a (hypothetical) existing external implementation, which overrode/implemented
getContext, would fail with anAbstractMethodError.The above paired method idiom is common in Jenkins sources, by the way, when we change our minds about what methods an implementation of some interface (or abstract class) should define. Somewhat cleaner is to just deprecate the whole “interface” and introduce, say, a
BlobStoreProvider2while having callers (anything enumerating thisExtensionList) convert from the old implementation.Again, any of these tricks may just be overkill—the only other implementation of JEP-202 I know about is
azure-artifact-manager, which uses the Azure APIs directly rather than via this plugin and jclouds.