Skip to content

Commit 8767cd5

Browse files
author
Federico Fissore
committed
Returning a copy of installed libraries list, so clients can deal with it without incurring in concurrent list changes. See #3814
1 parent 5340806 commit 8767cd5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public LibrariesIndex getIndex() {
216216
}
217217

218218
public LibraryList getInstalledLibraries() {
219-
return installedLibraries;
219+
return new LibraryList(installedLibraries);
220220
}
221221

222222
// Same as getInstalledLibraries(), but allow duplicates between
@@ -236,8 +236,6 @@ public File getStagingFolder() {
236236
* Set the sketchbook library folder. <br />
237237
* New libraries will be installed here. <br />
238238
* Libraries not found on this folder will be marked as read-only.
239-
*
240-
* @param folder
241239
*/
242240
public void setSketchbookLibrariesFolder(File folder) {
243241
this.sketchbookLibrariesFolder = folder;

0 commit comments

Comments
 (0)