Skip to content

Commit 8ee444a

Browse files
author
jan
committed
stop reentrancy when applying the workaround
1 parent f1853b7 commit 8ee444a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

io.sloeber.core/src/io/sloeber/core/managers/WorkAround.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class WorkAround {
4444
*
4545
* @param platform
4646
*/
47-
static public void applyKnownWorkArounds(ArduinoPlatform platform) {
47+
static synchronized public void applyKnownWorkArounds(ArduinoPlatform platform) {
4848

4949
/*
5050
* for STM32 V1.8 and later #include "SrcWrapper.h" to Arduino.h remove the
@@ -79,7 +79,7 @@ static public void applyKnownWorkArounds(ArduinoPlatform platform) {
7979
*
8080
* @return the worked around file or requestedFileToWorkAround is it does not exist or error
8181
*/
82-
static public File MakeBoardsSloeberTxt(File requestedFileToWorkAround) {
82+
static synchronized public File MakeBoardsSloeberTxt(File requestedFileToWorkAround) {
8383
if(!requestedFileToWorkAround.exists()) {
8484
return requestedFileToWorkAround;
8585
}
@@ -137,7 +137,7 @@ static public File MakeBoardsSloeberTxt(File requestedFileToWorkAround) {
137137
*
138138
* @return the worked around file or requestedFileToWorkAround is it does not exist or error
139139
*/
140-
public static File MakePlatformSloeberTXT(File requestedFileToWorkAround) {
140+
public synchronized static File MakePlatformSloeberTXT(File requestedFileToWorkAround) {
141141
if(!requestedFileToWorkAround.exists()) {
142142
return requestedFileToWorkAround;
143143
}

0 commit comments

Comments
 (0)