diff --git a/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java b/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java index 8501368..e6a76b6 100644 --- a/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java +++ b/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java @@ -993,6 +993,13 @@ default String getCurrentPath() { return path.toString(); } + /** + * Throw exception. + * + * @param path the path + * @param object the object + * @param e the e + */ default void throwException(String path, Object object, Throwable e) { if (e instanceof RuntimeException || e instanceof InvocationTargetException) e = e.getCause(); path = path == null ? "null" : path; @@ -1127,7 +1134,13 @@ else if (v instanceof List) { return treeMap; } - static String unquote(String string) { + /** + * Removes any quote from the given string. + * + * @param string the string + * @return the string + */ + static String unquote(@Nullable String string) { if (string == null) return null; while (string.length() > 2 && string.startsWith("\"") && string.endsWith("\"")) string = string.substring(1, string.length() - 1);