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

Adam Litke alitke at redhat.com
Fri Nov 22 16:52:11 UTC 2013


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



More information about the Engine-devel mailing list