diff options
author | fhuya <fhuya@google.com> | 2020-03-06 17:22:04 -0800 |
---|---|---|
committer | fhuya <fhuya@google.com> | 2020-03-06 17:22:04 -0800 |
commit | 7dea2ad1de6ec778472611c76a5833cfb848b378 (patch) | |
tree | 4963f93e5f670289c3b7f6abc4194bffde80fc14 /platform/android/java/lib/src | |
parent | d4b31c698056e7b835d49d6700371ca18ca94f8c (diff) |
Trim the whitespace around the plugins names.
Diffstat (limited to 'platform/android/java/lib/src')
-rw-r--r-- | platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java index 3562920182..b6d949b7bf 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/GodotPluginRegistry.java @@ -139,7 +139,10 @@ public final class GodotPluginRegistry { return; } - enabledPluginsSet = new HashSet<>(Arrays.asList(enabledPluginsList)); + enabledPluginsSet = new HashSet<>(); + for (String enabledPlugin : enabledPluginsList) { + enabledPluginsSet.add(enabledPlugin.trim()); + } } else { enabledPluginsSet = null; } @@ -148,7 +151,7 @@ public final class GodotPluginRegistry { for (String metaDataName : metaData.keySet()) { // Parse the meta-data looking for entry with the Godot plugin name prefix. if (metaDataName.startsWith(GODOT_PLUGIN_V1_NAME_PREFIX)) { - String pluginName = metaDataName.substring(godotPluginV1NamePrefixLength); + String pluginName = metaDataName.substring(godotPluginV1NamePrefixLength).trim(); if (enabledPluginsSet != null && !enabledPluginsSet.contains(pluginName)) { Log.w(TAG, "Plugin " + pluginName + " is listed in the dependencies but is not enabled."); continue; |