Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRené Purrio2018-01-18 11:25:08 -0500
committerRené Purrio2018-01-19 02:50:31 -0500
commit1e5b269d4753b4bc0049da48442577a6feb65194 (patch)
tree9e010c409777ed3acf04e57e14e98b93df304d21 /examples
parent28ac26e6643184b93e8db73d005effee3b3cb972 (diff)
downloadeclipse.platform.swt-1e5b269d4753b4bc0049da48442577a6feb65194.tar.gz
eclipse.platform.swt-1e5b269d4753b4bc0049da48442577a6feb65194.tar.xz
eclipse.platform.swt-1e5b269d4753b4bc0049da48442577a6feb65194.zip
Bug 529979 - [sonar] Resolve "Write to static field from instance meth."
Change-Id: I5d188d56aa3c916d15c6084769d8b23d2ad68486 Signed-off-by: René Purrio <rpurrio@itemis.de>
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.java3
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/AccessibleValueExample.java6
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.java b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.java
index 4914044894..a0896c25ef 100644
--- a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.java
+++ b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/PawnTab.java
@@ -60,7 +60,6 @@ public class PawnTab {
static Pawns ttr = null;
static int[] move = new int[2];
- static Menu menu = null;
public PawnTab(TabItem item) {
try {
@@ -72,7 +71,7 @@ public class PawnTab {
item.setText("Pawns");
item.setControl(browser);
- menu = new Menu(browser.getShell(), SWT.POP_UP);
+ Menu menu = new Menu(browser.getShell(), SWT.POP_UP);
MenuItem item2 = new MenuItem(menu, SWT.PUSH);
item2.setText("End Game");
item2.addListener(SWT.Selection, e -> {
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/AccessibleValueExample.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/AccessibleValueExample.java
index 584dbbe29e..e0a0ea0d5d 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/AccessibleValueExample.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/accessibility/AccessibleValueExample.java
@@ -31,9 +31,9 @@ import org.eclipse.swt.widgets.Shell;
* additional information to an AT.
*/
public class AccessibleValueExample {
- static int value = 40;
- static int min = 0;
- static int max = 100;
+ private static int value = 40;
+ private static int min = 0;
+ private static int max = 100;
public static void main(String[] args) {
Display display = new Display();

Back to the top