mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 18:01:18 +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 RPR220_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]
|
||||
// This example uses an interrupt handler to increment a counter
|
||||
@ -49,6 +52,6 @@ class RPRISR implements Runnable {
|
||||
super();
|
||||
}
|
||||
public void run() {
|
||||
RPR220_intr_Example.counter++;
|
||||
RPR220_intr_Example.incrementCounter();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user