Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] JGit Client API

Hi,

> The point is just that reporting errors when possible is better than
> nothing.
> There are other techniques with better guarantees: you could lazily store
...

I agree that with your suggestions it may be technically possible to
detect missing calls to a "run()" method. But on the other hand I am
not sure whether it is ok to spent so much effort in  detecting
adpotential misusage of the API.
And is it really always an error when people don't call "run()". What
is if developers produce common commands in advance (e.g. a command
"git log HEAD..master") so they can fire it whenever they need it by
just calling "run()". They would like to call "run()" multiple times
without producing new commands. Then we would always have prebuild
command which has not been executed. Even if we don't allow multiple
"run()" calls to one command a developer could build a new command and
just before he wants to call run() an he decides not call this command
anymore (e.g. an exception occurs).

All this make me think that we as API developer should not try to
detect this possible error situation.

Ciao
 Chris


Back to the top