Skip to content

Commit

Permalink
Merge pull request #228 from alex-dorokhov/fix-hotswapper-watcher
Browse files Browse the repository at this point in the history
HotswapperPlugin: listen also to FileEvent.CREATE
  • Loading branch information
skybber authored Mar 8, 2018
2 parents 500a30f + c7aa505 commit 9e47552
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class HotswapperPlugin {
/**
* For each changed class create a reload command.
*/
@OnClassFileEvent(classNameRegexp = ".*", events = {FileEvent.MODIFY})
@OnClassFileEvent(classNameRegexp = ".*", events = {FileEvent.MODIFY, FileEvent.CREATE})
public void watchReload(CtClass ctClass, ClassLoader appClassLoader, URL url) throws IOException, CannotCompileException {
if (!ClassLoaderHelper.isClassLoaded(appClassLoader, ctClass.getName())) {
LOGGER.trace("Class {} not loaded yet, no need for autoHotswap, skipped URL {}", ctClass.getName(), url);
Expand Down

0 comments on commit 9e47552

Please sign in to comment.