Simplify logic

This commit is contained in:
MattBDev 2021-05-11 20:16:53 -04:00
parent 4534154894
commit 6f2e4c0cf3

View File

@ -123,11 +123,7 @@ public class YAMLNode {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Object getProperty(String path) { public Object getProperty(String path) {
if (!path.contains(".")) { if (!path.contains(".")) {
Object val = root.get(path); return root.get(path);
if (val == null) {
return null;
}
return val;
} }
String[] parts = path.split("\\."); String[] parts = path.split("\\.");