-
Notifications
You must be signed in to change notification settings - Fork 9
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
Can't reuse SimpleCollection returned by SimpleService #7
Comments
@purejava, @overheadhunter this is what I currently have: develop-2.x.x. Can you both give me feedback on the API? The The new interface is under:
Lately I did not find much time for this project, but tomorrow I have some spare time and like to solve this issue for good. |
I took a quick look at your commits / browsed over them. This raised a couple of questions in my head. What is the new API? Is the API change making the connection stuff optional? Anything else? And I run your So, my next question would be, how finished is your code? You write, the API is done, but state below, that there are still issues and the design will change. This confuses me. I doubt that a review at this time makes sense.
I am sorry, but I won't find the time to do that.
Good luck. Honestly. To be honest, personally I don't feel any motivation to review an API change to develop the whole lib further, while a ready to merge contribution to current problems for the nowadays API gets ignored, but somehow re-used here. I'd suggest and prefer to discuss and fix issues raised for this lib in the past, before moving on to new goals. |
Good to hear you find some time for this lib again! Before looking at the API or code, I would like to suggest merging #40, because its huge changeset (due to the package renaming) poisons the diff of #32, now that you rebased it upon the former. This makes reviewing it unnecessarily complicated. I would propose to move forward in smaller increments, e.g. like this: %%{init: { 'gitGraph': {'showBranches': true, 'showCommitLabel':false,'mainBranchName': 'develop'}} }%%
gitGraph
commit
branch 40-modularization order: 3
branch 2.0.0-develop order: 1
checkout 40-modularization
commit
commit
checkout 2.0.0-develop
merge 40-modularization tag: "v2.0.0-beta1"
branch 32-new-api order: 2
commit
commit
checkout 32-new-api
commit
commit
checkout 2.0.0-develop
merge 32-new-api tag: "v2.0.0-beta2"
|
SimpleCollection is AutoCloseable i.e. it should either be used in a try-with-resource statement or wrapped in a class that is itself AutoCloseable.
SimpleService returns a single instance of SimpleCollection here:
secret-service/src/main/java/org/freedesktop/secret/simple/SimpleService.java
Lines 12 to 23 in 0630ae4
During your unit tests you only use such instances once and dispose them afterwards, thus they work. But the API suggests reusability, which is not provided.
I.e. the following code does
close()
the SimpleCollection twice:I suggest to design the API that can be used like this:
The text was updated successfully, but these errors were encountered: