summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2009-01-09 11:04:14 (EST)
committerCarsten Drossel2009-01-09 11:04:14 (EST)
commitc6b06c531b1cf05454312b9d2da9f8309602f68d (patch)
tree8b1ee49d4983508a5eaef77bea115bc81bd15852
parent124a9ab5f59ecf8767eda722d0f1fc477a8a6fec (diff)
downloadorg.eclipse.riena-c6b06c531b1cf05454312b9d2da9f8309602f68d.zip
org.eclipse.riena-c6b06c531b1cf05454312b9d2da9f8309602f68d.tar.gz
org.eclipse.riena-c6b06c531b1cf05454312b9d2da9f8309602f68d.tar.bz2
fixed findbugs warnings
-rw-r--r--org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java9
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/BlockingSubModuleController.java2
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterExampleSubModuleController.java2
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java2
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ListSubModuleController.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/SystemPropertiesSubModuleController.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TableSubModuleController.java4
-rw-r--r--org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TreeTableSubModuleController.java4
9 files changed, 22 insertions, 13 deletions
diff --git a/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java b/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
index f1b24b9..409235b 100644
--- a/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
+++ b/org.eclipse.riena.example.client/src/com/swtdesigner/SWTResourceManager.java
@@ -12,6 +12,7 @@ package com.swtdesigner;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
@@ -191,7 +192,7 @@ public final class SWTResourceManager {
image = getImage(fis);
classImageMap.put(key, image);
fis.close();
- } catch (Exception e) {
+ } catch (IOException e) {
image = getMissingImage();
classImageMap.put(key, image);
}
@@ -411,10 +412,10 @@ public final class SWTResourceManager {
Object logFont = FontData.class.getField("data").get(fontData); //$NON-NLS-1$
if (logFont != null && logFontClass != null) {
if (strikeout) {
- logFontClass.getField("lfStrikeOut").set(logFont, new Byte((byte) 1)); //$NON-NLS-1$
+ logFontClass.getField("lfStrikeOut").set(logFont, Byte.valueOf((byte) 1)); //$NON-NLS-1$
}
if (underline) {
- logFontClass.getField("lfUnderline").set(logFont, new Byte((byte) 1)); //$NON-NLS-1$
+ logFontClass.getField("lfUnderline").set(logFont, Byte.valueOf((byte) 1)); //$NON-NLS-1$
}
}
} catch (Throwable e) {
@@ -513,7 +514,7 @@ public final class SWTResourceManager {
* @return Cursor The system cursor matching the specific ID
*/
public static Cursor getCursor(int id) {
- Integer key = new Integer(id);
+ Integer key = Integer.valueOf(id);
Cursor cursor = idToCursorMap.get(key);
if (cursor == null) {
cursor = new Cursor(Display.getDefault(), id);
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
index bc28422..5b2d27f 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/communication/ServiceProgressVisualizer.java
@@ -51,7 +51,7 @@ public class ServiceProgressVisualizer extends AbstractRemoteProgressMonitor {
/**
* describes the progress and total work of a {@link CommunicationDirection}
*/
- class CommunicationChannel {
+ private static class CommunicationChannel {
private int actualTotalWork = 0;
private int actualWorkedUnits = 0;
@@ -137,7 +137,7 @@ public class ServiceProgressVisualizer extends AbstractRemoteProgressMonitor {
return null;
}
- class RemoteServiceCancelListener implements PropertyChangeListener {
+ private static class RemoteServiceCancelListener implements PropertyChangeListener {
public void propertyChange(PropertyChangeEvent evt) {
if (ProcessInfo.PROPERTY_CANCELED.equals(evt.getPropertyName())) {
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/BlockingSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/BlockingSubModuleController.java
index c3dcbe5..284c792 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/BlockingSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/BlockingSubModuleController.java
@@ -56,7 +56,7 @@ public class BlockingSubModuleController extends SubModuleController {
new BlockerUIProcess(node).start();
}
- private class BlockerUIProcess extends UIProcess {
+ private static class BlockerUIProcess extends UIProcess {
private INavigationNode<?> toBlock;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterExampleSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterExampleSubModuleController.java
index 7ae0f87..88905ef 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterExampleSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterExampleSubModuleController.java
@@ -155,7 +155,7 @@ public class FilterExampleSubModuleController extends SubModuleController {
}
- private class MySampleBean {
+ private static class MySampleBean {
private String text = ""; //$NON-NLS-1$
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
index 1d4eab0..2371b49 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/FilterSubModuleController.java
@@ -462,7 +462,7 @@ public class FilterSubModuleController extends SubModuleController {
/**
* Wrapper for IMarker with an own {@code toString()} method.
*/
- private class MarkerWrapper {
+ private static class MarkerWrapper {
private IMarker marker;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ListSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ListSubModuleController.java
index 8ae11e3..2b4bc3a 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ListSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/ListSubModuleController.java
@@ -12,6 +12,7 @@ package org.eclipse.riena.example.client.controllers;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.io.Serializable;
import java.util.Comparator;
import org.eclipse.riena.example.client.model.Person;
@@ -135,7 +136,8 @@ public class ListSubModuleController extends SubModuleController {
/**
* Compares two strings.
*/
- private static final class StringComparator implements Comparator<Object> {
+ @SuppressWarnings("serial")
+ private static final class StringComparator implements Comparator<Object>, Serializable {
public int compare(Object o1, Object o2) {
String s1 = (String) o1;
String s2 = (String) o2;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/SystemPropertiesSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/SystemPropertiesSubModuleController.java
index 067e93e..09bd4ae 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/SystemPropertiesSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/SystemPropertiesSubModuleController.java
@@ -12,6 +12,7 @@ package org.eclipse.riena.example.client.controllers;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@@ -198,7 +199,8 @@ public class SystemPropertiesSubModuleController extends SubModuleController {
/**
* Compares two strings.
*/
- private static final class StringComparator implements Comparator<Object> {
+ @SuppressWarnings("serial")
+ private static final class StringComparator implements Comparator<Object>, Serializable {
public int compare(Object o1, Object o2) {
String s1 = (String) o1;
String s2 = (String) o2;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TableSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TableSubModuleController.java
index e7fbdea..11e9ba6 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TableSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TableSubModuleController.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.riena.example.client.controllers;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
@@ -180,7 +181,8 @@ public class TableSubModuleController extends SubModuleController {
/**
* Compares two strings.
*/
- private static final class StringComparator implements Comparator<Object> {
+ @SuppressWarnings("serial")
+ private static final class StringComparator implements Comparator<Object>, Serializable {
public int compare(Object o1, Object o2) {
String s1 = (String) o1;
String s2 = (String) o2;
diff --git a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TreeTableSubModuleController.java b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TreeTableSubModuleController.java
index d8d53fb..91ddda9 100644
--- a/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TreeTableSubModuleController.java
+++ b/org.eclipse.riena.example.client/src/org/eclipse/riena/example/client/controllers/TreeTableSubModuleController.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.riena.example.client.controllers;
+import java.io.Serializable;
import java.util.Comparator;
import java.util.List;
@@ -255,7 +256,8 @@ public class TreeTableSubModuleController extends SubModuleController {
/**
* Compares two strings.
*/
- private static final class StringComparator implements Comparator<Object> {
+ @SuppressWarnings("serial")
+ private static final class StringComparator implements Comparator<Object>, Serializable {
public int compare(Object o1, Object o2) {
String s1 = (String) o1;
String s2 = (String) o2;