Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-04-22 11:49:51 +0000
committerUwe Stieber2012-04-22 11:49:51 +0000
commitbcfab58eafff418aee762e04e65c37a73b1ef431 (patch)
treeb5ffc7430182827bd31781a685e9334e8696fa92 /target_explorer
parent19011d4c47bf0f4af2e75999056ae7aa7f2f23fa (diff)
downloadorg.eclipse.tcf-bcfab58eafff418aee762e04e65c37a73b1ef431.tar.gz
org.eclipse.tcf-bcfab58eafff418aee762e04e65c37a73b1ef431.tar.xz
org.eclipse.tcf-bcfab58eafff418aee762e04e65c37a73b1ef431.zip
Target Explorer: Fix FindBugs warning: LI_LAZY_INIT_STATIC
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java30
8 files changed, 25 insertions, 25 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
index d8025439b..1d898aa9b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/activator/CoreBundleActivator.java
@@ -21,7 +21,7 @@ public class CoreBundleActivator implements BundleActivator {
// The bundle context
private static BundleContext context;
// The scoped preferences instance
- private static ScopedEclipsePreferences scopedPreferences = null;
+ private static volatile ScopedEclipsePreferences scopedPreferences;
// The trace handler instance
private static volatile TraceHandler traceHandler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java
index 1fb00f631..beae63ed5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.runtime/src/org/eclipse/tcf/te/runtime/utils/Host.java
@@ -19,10 +19,10 @@ import java.io.IOException;
* Determine the current host environment.
*/
public final class Host {
- private static Boolean isWindowsHost = null;
- private static Boolean isInteractive = null;
- private static Boolean isHeadless = null;
- private static Boolean isLinuxHost = null;
+ private static volatile Boolean isWindowsHost = null;
+ private static volatile Boolean isInteractive = null;
+ private static volatile Boolean isHeadless = null;
+ private static volatile Boolean isLinuxHost = null;
/**
* Method looking up the current host (once) and returning a boolean indicating whether the host
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java
index f93657a8b..7576e1fb9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/model/Model.java
@@ -20,7 +20,7 @@ import org.eclipse.tcf.te.tcf.locator.nodes.LocatorModel;
*/
public final class Model {
// Reference to the locator model
- /* default */ static ILocatorModel locatorModel;
+ /* default */ static volatile ILocatorModel locatorModel;
/**
* Returns the shared locator model instance.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java
index 6065ba4e1..bcaf47b18 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/activator/CoreBundleActivator.java
@@ -21,7 +21,7 @@ public class CoreBundleActivator extends Plugin {
// The shared instance
private static CoreBundleActivator plugin;
// The scoped preferences instance
- private static ScopedEclipsePreferences scopedPreferences = null;
+ private static volatile ScopedEclipsePreferences scopedPreferences;
// The trace handler instance
private static volatile TraceHandler traceHandler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java
index 9af61be60..de59f25a1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.console/src/org/eclipse/tcf/te/tcf/ui/console/activator/UIPlugin.java
@@ -24,7 +24,7 @@ public class UIPlugin extends AbstractUIPlugin {
// The shared instance
private static UIPlugin plugin;
// The scoped preferences instance
- private static ScopedEclipsePreferences scopedPreferences = null;
+ private static volatile ScopedEclipsePreferences scopedPreferences;
/**
* The constructor
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java
index 47f486f7b..a0428e7ec 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui.views/src/org/eclipse/tcf/te/tcf/ui/views/scriptpad/console/Factory.java
@@ -20,7 +20,7 @@ import org.eclipse.ui.console.IConsoleManager;
*/
public class Factory implements IConsoleFactory {
// Reference to the console
- private static Console console;
+ private static volatile Console console;
/* (non-Javadoc)
* @see org.eclipse.ui.console.IConsoleFactory#openConsole()
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java
index 9f378da5c..6f3d889b1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/activator/UIPlugin.java
@@ -30,7 +30,7 @@ public class UIPlugin extends AbstractUIPlugin {
// The shared instance
private static UIPlugin plugin;
// The scoped preferences instance
- private static ScopedEclipsePreferences scopedPreferences = null;
+ private static volatile ScopedEclipsePreferences scopedPreferences;
// The trace handler instance
private static volatile TraceHandler traceHandler;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
index 6c5d8b7af..67173fa40 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ViewerStateManager.java
@@ -41,11 +41,11 @@ import org.eclipse.ui.XMLMemento;
*/
public class ViewerStateManager {
// The single instance to provide the management.
- private static ViewerStateManager instance;
+ private static volatile ViewerStateManager instance;
/**
* Get the single instance of the manager.
- *
+ *
* @return The single instance of the viewer state manager.
*/
public static ViewerStateManager getInstance() {
@@ -60,7 +60,7 @@ public class ViewerStateManager {
/**
* Get the viewer state for the specified input id.
- *
+ *
* @param inputId
* @return
*/
@@ -70,7 +70,7 @@ public class ViewerStateManager {
/**
* Get the filter descriptor for the specified viewer and input.
- *
+ *
* @param viewerId The viewer's id.
* @param input The input.
* @return The enabled filter descriptors.
@@ -94,13 +94,13 @@ public class ViewerStateManager {
}
return null;
}
-
+
/***
* Get the viewer input from the input of the tree viewer.
* If the input is an instance of IViewerInput, then return
* the input. If the input can be adapted to a IViewerInput,
* then return the adapted object.
- *
+ *
* @param input The input of the tree viewer.
* @return A viewer input or null.
*/
@@ -121,10 +121,10 @@ public class ViewerStateManager {
}
return viewerInput;
}
-
+
/**
* Put the viewer state with its input id into the map.
- *
+ *
* @param inputId The id of the input.
* @param viewerState The viewer's state.
*/
@@ -169,7 +169,7 @@ public class ViewerStateManager {
/**
* Load the viewer states from the memento root.
- *
+ *
* @param root The memento's root.
*/
void loadViewerState(IMemento root) {
@@ -183,7 +183,7 @@ public class ViewerStateManager {
/**
* Create a viewer state instance using the specified memento element.
- *
+ *
* @param mViewerState The memento element.
*/
void createViewerState(IMemento mViewerState) {
@@ -195,10 +195,10 @@ public class ViewerStateManager {
}
/**
- * Get the viewer state files. The default location is a file named "viewerstates.xml"
- * under the plugin's state cache. If it is not available, default it to the ".tcf"
+ * Get the viewer state files. The default location is a file named "viewerstates.xml"
+ * under the plugin's state cache. If it is not available, default it to the ".tcf"
* directory under the user's home.
- *
+ *
* @return The viewer state file.
*/
private File getViewerStateFile() {
@@ -260,7 +260,7 @@ public class ViewerStateManager {
/**
* Store the viewer's state to a memento element.
- *
+ *
* @param root The memento element.
*/
void storeViewerStates(IMemento root) {
@@ -274,7 +274,7 @@ public class ViewerStateManager {
/**
* Create a viewer state instance using the column descriptors and the filter descriptors specified.
- *
+ *
* @param columns The column descriptors.
* @param filters The filter descriptors.
* @return The tree viewer state instance.

Back to the top