1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-30 19:52:13 +01:00

Ignore empty "includes" field in library.properties

This allows to avoid empty include lines like:

   #include <>

for libraries declaring:

   includes=

in their library.properties file.

Fix #7854
This commit is contained in:
Cristian Maglie 2018-08-08 14:49:49 +02:00
parent b5f759bdca
commit 3a3bc5be84

View File

@ -141,7 +141,7 @@ public class UserLibrary {
}
List<String> includes = null;
if (properties.containsKey("includes")) {
if (properties.containsKey("includes") && !properties.get("includes").trim().isEmpty()) {
includes = new ArrayList<>();
for (String i : properties.get("includes").split(","))
includes.add(i.trim());