mirror of
https://github.com/eclipse/upm.git
synced 2025-07-05 03:11:15 +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,8 +24,11 @@
|
||||
|
||||
public class GroveButton_intr_Example {
|
||||
|
||||
public static int counter = 0;
|
||||
private static int counter = 0;
|
||||
|
||||
public static void incrementCounter() {
|
||||
counter++;
|
||||
}
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
// ! [Interesting]
|
||||
upm_grove.GroveButton b = new upm_grove.GroveButton(2);
|
||||
@ -47,7 +50,7 @@ class ButtonISR implements Runnable {
|
||||
}
|
||||
|
||||
public void run() {
|
||||
GroveButton_intr_Example.counter++;
|
||||
GroveButton_intr_Example.incrementCounter();
|
||||
System.out.println("Button pressed!");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user