diff --git a/framework/src/play/vfs/VirtualFile.java b/framework/src/play/vfs/VirtualFile.java index add54421a3..d8b165146b 100644 --- a/framework/src/play/vfs/VirtualFile.java +++ b/framework/src/play/vfs/VirtualFile.java @@ -230,6 +230,9 @@ public static VirtualFile search(Collection roots, String path) { } public static VirtualFile fromRelativePath(String relativePath) { + if (relativePath == null) { // avoid NPE in pattern.matcher(relativePath) + return null; + } Pattern pattern = Pattern.compile("^(\\{(.+?)\\})?(.*)$"); Matcher matcher = pattern.matcher(relativePath);