Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-08-10 09:19:11 +0000
committerLars Vogel2021-08-10 09:19:11 +0000
commit9030e6fe684ddced591ccaa2d80124e60962984b (patch)
treeef5a3bd409fc26afc1c76e5440148c3a8ca024a1 /examples/org.eclipse.swt.snippets
parent702f5c7c0b10298cb76f18ceb4cfec6d2411566e (diff)
downloadeclipse.platform.swt-9030e6fe684ddced591ccaa2d80124e60962984b.tar.gz
eclipse.platform.swt-9030e6fe684ddced591ccaa2d80124e60962984b.tar.xz
eclipse.platform.swt-9030e6fe684ddced591ccaa2d80124e60962984b.zip
[Minor] Updating Snippet245 to use var for local variables
This shortens the code a little bit and removes SonarLint warnings. Change-Id: Ib85fd27decf56799fe94706ffc02f3ae014ff39e Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'examples/org.eclipse.swt.snippets')
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java
index 08d6cecceb..df6484fb66 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet245.java
@@ -26,8 +26,8 @@ import org.eclipse.swt.widgets.*;
public class Snippet245 {
public static void main(String [] args) {
- final Display display = new Display();
- final Shell shell = new Shell(display);
+ var display = new Display();
+ var shell = new Shell(display);
shell.setText("Snippet 245");
shell.addPaintListener(event -> {
Rectangle rect = shell.getClientArea();

Back to the top