Allon Mureinik has posted comments on this change.

Change subject: core: clean QueriesCommandBase.CreateRetuenValue
......................................................................


Patch Set 3: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/QueriesCommandBase.java
Line 34:         return new VdcQueryReturnValue();
It won't have any use.

If you don't want to override it, you'll have to always define your query as 
MyQuery<MyParametes,VdcQueryRetunValue>.

If you do want to override it, you'll just define the return type yourself - 
since java 5, return values are polymorphic - you can specialize your return 
value regardless of generics. 

Actually, now that you mention it - I can see a bug in this pacth. SearchQuery 
should override the return type.
Take a look after I upload a new patchset, and let me know if this isn't enough 
in your opinion.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SearchQuery.java
Line 57:     protected VdcQueryReturnValue CreateReturnValue() {
It's overriding a method of QueriesCommandBase - I'll see how much of a hassle 
it is to change the name accross the board.

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/SearchQueryTest.java
Line 420:                 new SearchQuery<SearchParameters>(new 
SearchParameters()).CreateReturnValue() instanceof SearchReturnValue);
It's a regression test to make sure that no functionallity was lost when the 
"if getClass().getName().endsWith("SearchQuery")" was removed from 
QueriesCommandBase.

However, I think you're correct. If SearchQuery was implemented properly, this 
would be redundant.

--
To view, visit http://gerrit.ovirt.org/4181
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I921a81ed50cb29abe2c824fcbf026f18c9da357e
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to