On Tue, 2010-04-20 at 15:14 +0100, Mark McLoughlin wrote:
- Is there no longer a problem with multiple DummyApplication
instances being created?
Yeah, I'm gonna follow that issue up separately on the RESTeasy list. It
doesn't do any harm for now, but obviously we wouldn't want a real
stateful resource to be duplicated in this way.
- Can we move the Application class into the common api package?
Well, it has a dependency on the concrete Dummy* resource types so if I
put it in the api package, we'd have to adopt some sort of scanning
strategy to discover the resource classes to instantiate.
At which point we'd probably have strayed into territory that's more the
business of the JAX-RS framework than an individual application. It'd be
kinda nice to extend RESTeasy with a new @Singleton annotation or
some-such in the Jersey style, so as to avoid the need for an
Application class in the first place.
- Are you using the fully qualified name for
DummyTestBase.VmsResource
just for clarity?
- private VmResource getService() {
+ private DummyTestBase.VmsResource getService() {
Makes sense, just checking
Yeah, sorry ... I was slightly confused initially as to why the test
wasn't explicitly passing a UriInfo param, so I went off on tangent
mocking this up before realising it wasn't needed at all. So yeah, it
was purely intended to emphasise that its not the top-level interface
that's passed to the ProxyFactory.
None of that is a big deal, though - feel fee to push to master
Cool, will do.
Whatever happened to 'The first rule of code style is: you do not
talk
about code style.' ? :)
LoL. Normally I'd just go with the flow on coding style, but mixed
spaces & tabs are a bridge too far :)
Seriously, you're a java guy and I'm not - so, you should
decide on the
coding style and write it up. If you give me the appropriate settings
for eclipse, I'll be happy to follow it (after converting it to emacs
settings :)
I'm just using the default Eclipse formatter with one addition:
Windows->Preferences->Java->Code Style->Formatter ... Edit
General settings->Tab policy: Spaces Only
Rename the profile and hit OK
To put my oar in - in your PowerShellVmsResource.java a blank line
between the methods would make me feel better.
Yep, my bad, I had some further edits to that file that I hadn't saved
before committing. The bunched together methods were just a result of
sloppy copy'n'paste, and most of that code was eventually removed in any
case to avoid duplication with the corresponding VmResource. The correct
version is now on the branch:
http://git.fedorahosted.org/git/?p=rhevm-api.git;a=commit;h=f506c92
Also, if we can at all, it'd be nice to ban "trailing
whitespace" from
the project from the start[1] - it doesn't seem to be easy to do in
eclipse, so if you think it'd be too much of a pain, nevermind
Yeah, I'm not particularly fond of Eclipse's insistence on dumping
trailing spaces all over the place.
Cheers,
Eoghan