mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
java-examples: fix reported minor vulnerabilities
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
@ -24,9 +24,12 @@
|
||||
|
||||
public class Button_intr_Example {
|
||||
|
||||
public static int counter = 0;
|
||||
private static int counter = 0;
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
public static void incrementCounter() {
|
||||
counter++;
|
||||
}
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_button.Button b = new upm_button.Button(2);
|
||||
|
||||
@ -47,7 +50,7 @@ class ButtonISR implements Runnable {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
Button_intr_Example.counter++;
|
||||
Button_intr_Example.incrementCounter();
|
||||
System.out.println("Button pressed!");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user