From 55b437508acb80b4931a5d7f37b987adf367fa46 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 05 Jan 2012 17:37:33 +0000
Subject: [PATCH] Spring cleaning ! Fix minor issues and optimizations suggested by FindBugs and NetBeans.
---
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
index def6b50..774b34a 100644
--- a/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
+++ b/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011 ForgeRock AS
+ * Portions Copyright 2011-2012 ForgeRock AS
*/
package org.opends.server.workflowelement.localbackend;
@@ -84,7 +84,7 @@
// A string indicating the type of the workflow element.
- private final String BACKEND_WORKFLOW_ELEMENT = "Backend";
+ private static final String BACKEND_WORKFLOW_ELEMENT = "Backend";
/**
@@ -171,6 +171,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean isConfigurationChangeAcceptable(
LocalBackendWorkflowElementCfg configuration,
List<Message> unacceptableReasons
@@ -186,6 +187,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public ConfigChangeResult applyConfigurationChange(
LocalBackendWorkflowElementCfg configuration
)
@@ -275,10 +277,9 @@
String workflowElementID,
Backend backend)
{
- LocalBackendWorkflowElement localBackend = null;
-
// If the requested workflow element does not exist then create one.
- localBackend = registeredLocalBackends.get(workflowElementID);
+ LocalBackendWorkflowElement localBackend =
+ registeredLocalBackends.get(workflowElementID);
if (localBackend == null)
{
localBackend = new LocalBackendWorkflowElement();
@@ -532,6 +533,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void execute(Operation operation) throws CanceledOperationException {
switch (operation.getOperationType())
{
@@ -602,7 +604,7 @@
* operation
*/
@SuppressWarnings("unchecked")
- public static final <O extends Operation,L> void
+ public static <O extends Operation,L> void
attachLocalOperation (O globalOperation, L currentLocalOperation)
{
List<?> existingAttachment =
@@ -652,6 +654,7 @@
PersistentSearch.CancellationCallback callback =
new PersistentSearch.CancellationCallback()
{
+ @Override
public void persistentSearchCancelled(PersistentSearch psearch)
{
persistentSearches.remove(psearch);
--
Gitblit v1.10.0