[Engine-devel] Java Newbie: Renaming some functions to fix findbugs warnings

Hello, I am working on resolving some warnings produced by findbugs and am looking for some advice on how to properly resolve the problem. The Frontend class has several pairs of methods where a capitalized version is a deprecated static form and the camelCase version is the instance method. For example: @Deprecated public static void RunQuery(...) - and - public void runQuery(...) In both cases the parameters are the same so simply renaming RunQuery to runQuery will result in a conflict. Since I am new to Java and the ovirt-engine project I am looking for some advice on how to fix the function name without breaking the code or people's sense of aesthetics. Since this is a deprecated function, would it be terrible to rename it to 'runQueryStatic' or 'runQueryDeprecated'? Since the language provides syntactic annotations for 'static' and 'deprecated', both of these names feel dirty but I am not sure what would be better. Thanks for helping out a newbie! --Adam

Adam, We are aware of this issue and we actually have a patch somewhat ready to solve the issue [1]. We made the RunQuery/RunAction/etc method deprecated to encourage people to no longer use them. We have patch ready to remove all current uses of RunQuery/RunAction/etc from the code base, but haven't gotten around to rebasing/merging the patch. Alexander [1] http://gerrit.ovirt.org/#/c/18413/ On Friday, November 22, 2013 11:52:11 AM Adam Litke wrote:
Hello,
I am working on resolving some warnings produced by findbugs and am looking for some advice on how to properly resolve the problem.
The Frontend class has several pairs of methods where a capitalized version is a deprecated static form and the camelCase version is the instance method.
For example:
@Deprecated public static void RunQuery(...)
- and -
public void runQuery(...)
In both cases the parameters are the same so simply renaming RunQuery to runQuery will result in a conflict. Since I am new to Java and the ovirt-engine project I am looking for some advice on how to fix the function name without breaking the code or people's sense of aesthetics. Since this is a deprecated function, would it be terrible to rename it to 'runQueryStatic' or 'runQueryDeprecated'? Since the language provides syntactic annotations for 'static' and 'deprecated', both of these names feel dirty but I am not sure what would be better. Thanks for helping out a newbie!
--Adam _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Adam,
We are aware of this issue and we actually have a patch somewhat ready to solve the issue [1]. We made the RunQuery/RunAction/etc method deprecated to encourage people to no longer use them. We have patch ready to remove all current uses of RunQuery/RunAction/etc from the code base, but haven't gotten around to rebasing/merging the patch.
Alexander
Thanks for the detail! Looks like fixing this properly is far from a beginner's task.
participants (2)
-
Adam Litke
-
Alexander Wels