From 1156192e506fd28c25b8e7a6882984b33cb813fa Mon Sep 17 00:00:00 2001 From: "Andrei Solntsev, Marek Kusmin" Date: Fri, 26 May 2017 14:27:14 +0300 Subject: [PATCH] finds classes in precompiled folder too --- .../src/play/classloading/ApplicationClassloader.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/framework/src/play/classloading/ApplicationClassloader.java b/framework/src/play/classloading/ApplicationClassloader.java index 920f59da24..baf572ab46 100644 --- a/framework/src/play/classloading/ApplicationClassloader.java +++ b/framework/src/play/classloading/ApplicationClassloader.java @@ -262,7 +262,13 @@ public URL getResource(String name) { return res.getRealFile().toURI().toURL(); } } - if (Play.configuration.getProperty("play.bytecodeCache", "true").equals("true")) { + if (Play.usePrecompiled) { + File file = Play.getFile("precompiled/java/" + name); + if (file.exists()) { + return file.toURI().toURL(); + } + } + else if ("true".equals(Play.configuration.getProperty("play.bytecodeCache", "true"))) { File f = new File(Play.tmpDir, "classes/" + name); if (f.exists()) { return f.toURI().toURL();