Shahar Havivi has uploaded a new change for review. Change subject: findbugs: Consider making the field static ......................................................................
findbugs: Consider making the field static This class contains an instance final field that is initialized to a compile-time static value. SS: Unread field: should this field be static? (SS_SHOULD_BE_STATIC) Change-Id: I8c2a7b2265966d426520880c102074c6e7bfddea Signed-off-by: Shahar Havivi <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java M backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/PasswordDomainsConfigurationEntry.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/SliderBar.java M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java 8 files changed, 13 insertions(+), 13 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/85/15385/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java index 9f652ca..15f78cc 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddExternalEventCommand.java @@ -13,7 +13,7 @@ import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase; public class AddExternalEventCommand<T extends AddExternalEventParameters> extends ExternalEventCommandBase<T> { - private final String OVIRT="oVirt"; + private static final String OVIRT="oVirt"; public AddExternalEventCommand(T parameters) { super(parameters); diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java index 0fb4a55..9ffc2da 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java @@ -38,7 +38,7 @@ import org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil; public abstract class FenceVdsBaseCommand<T extends FenceVdsActionParameters> extends VdsCommand<T> { - private final int SLEEP_BEFORE_FIRST_ATTEMPT = 5000; + private static final int SLEEP_BEFORE_FIRST_ATTEMPT = 5000; private static final String INTERNAL_FENCE_USER = "Engine"; protected FenceExecutor executor; protected List<VM> mVmList = null; diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java index 8413b5f..358dad1 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveExternalEventCommand.java @@ -11,7 +11,7 @@ public class RemoveExternalEventCommand <T extends RemoveExternalEventParameters> extends ExternalEventCommandBase<T> { - private final String OVIRT="oVirt"; + private static final String OVIRT="oVirt"; public RemoveExternalEventCommand(T parameters) { super(parameters); diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java index e9c7b80..2d070fb 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java @@ -23,7 +23,7 @@ * use this member to determine if fence failed but vms moved to unknown mode (for the audit log type) */ private boolean _vmsMovedToUnknown; - private final String RESTART = "Restart"; + private static final String RESTART = "Restart"; public VdsNotRespondingTreatmentCommand(T parameters) { super(parameters); diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java index 42adfc1..decd3aa 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/customprop/CustomPropertiesUtils.java @@ -22,22 +22,22 @@ */ public abstract class CustomPropertiesUtils { protected final Pattern SEMICOLON_PATTERN = Pattern.compile(";"); - protected final String PROPERTIES_DELIMETER = ";"; - protected final String KEY_VALUE_DELIMETER = "="; + protected final static String PROPERTIES_DELIMETER = ";"; + protected final static String KEY_VALUE_DELIMETER = "="; - protected final String LEGITIMATE_CHARACTER_FOR_KEY = "[a-z_A-Z0-9]"; - protected final String LEGITIMATE_CHARACTER_FOR_VALUE = "[^" + PROPERTIES_DELIMETER + "]"; // all characters + protected final static String LEGITIMATE_CHARACTER_FOR_KEY = "[a-z_A-Z0-9]"; + protected final static String LEGITIMATE_CHARACTER_FOR_VALUE = "[^" + PROPERTIES_DELIMETER + "]"; // all characters // but the delimiter // are allowed protected final Pattern VALUE_PATTERN = Pattern.compile("(" + LEGITIMATE_CHARACTER_FOR_VALUE + ")+"); // properties are in form of key1=val1;key2=val2; .... key and include alpha numeric characters and _ - protected final String KEY_VALUE_REGEX_STR = "((" + LEGITIMATE_CHARACTER_FOR_KEY + ")+)=((" + protected static final String KEY_VALUE_REGEX_STR = "((" + LEGITIMATE_CHARACTER_FOR_KEY + ")+)=((" + LEGITIMATE_CHARACTER_FOR_VALUE + ")+)"; // frontend can pass custom values in the form of "key=value" or "key1=value1;... key-n=value_n" (if there is only // one key-value, no ; is attached to it - protected final String VALIDATION_STR = KEY_VALUE_REGEX_STR + "(;" + KEY_VALUE_REGEX_STR + ")*;?"; + protected static final String VALIDATION_STR = KEY_VALUE_REGEX_STR + "(;" + KEY_VALUE_REGEX_STR + ")*;?"; protected final Pattern VALIDATION_PATTERN = Pattern.compile(VALIDATION_STR); protected final List<ValidationError> invalidSyntaxValidationError = diff --git a/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/PasswordDomainsConfigurationEntry.java b/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/PasswordDomainsConfigurationEntry.java index 8e66b56..73d570f 100644 --- a/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/PasswordDomainsConfigurationEntry.java +++ b/backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/PasswordDomainsConfigurationEntry.java @@ -3,7 +3,7 @@ import java.util.Map.Entry; public class PasswordDomainsConfigurationEntry extends DomainsConfigurationEntry { - private final String LOGGING_PASSWORD = "********"; + private static final String LOGGING_PASSWORD = "********"; public PasswordDomainsConfigurationEntry(String entry, String domainSeperator, String valueSeperator) { super(entry, domainSeperator, valueSeperator); } diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/SliderBar.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/SliderBar.java index db41f2b..7f98e1d 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/SliderBar.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/SliderBar.java @@ -132,7 +132,7 @@ * The delay between shifts, which shortens as the user holds down the * button. */ - private final int repeatDelay = 30; + private static final int repeatDelay = 30; /** * A bit indicating whether we are shifting to a higher or lower value. diff --git a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java index b152d89..f4c772e 100644 --- a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java +++ b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/tree/AbstractSubTabTree.java @@ -61,7 +61,7 @@ protected final CommonApplicationTemplates templates; - protected final String NODE_HEADER = "nodeHeader"; //$NON-NLS-1$ + protected static final String NODE_HEADER = "nodeHeader"; //$NON-NLS-1$ public AbstractSubTabTree(CommonApplicationResources resources, CommonApplicationConstants constants, CommonApplicationTemplates templates) { this.resources = resources; -- To view, visit http://gerrit.ovirt.org/15385 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c2a7b2265966d426520880c102074c6e7bfddea Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
