private void compile(AssetInfo asset, File source, File target) throws ServiceException {
        File watched = watchedAssets.get(asset);
        if (watched == null) {
            if (isDevMode()) {
                new Thread(() -> {
                    try {
                        // avoid recursive compiles
                        if (isDevMode())
                            watchedAssets.put(asset, target);
                        doCompile(asset, source, target);
                    }
                    catch (Exception ex) {
                        logger.severeException(ex.getMessage(), ex);
                    }
                }).start();
            }
            else {
                doCompile(asset, source, target);
            }
        }
    }
private void compile ( AssetInfo asset , File source , File target ) throws ServiceException { File watched = watchedAssets . get ( asset ) ; if ( watched == null ) { if ( isDevMode ( ) ) { new Thread ( ( ) -> { try { if ( isDevMode ( ) ) watchedAssets . put ( asset , target ) ; doCompile ( asset , source , target ) ; } catch ( Exception ex ) { logger . severeException ( ex . getMessage ( ) , ex ) ; } } ) . start ( ) ; } else { doCompile ( asset , source , target ) ; } } }
Returns null except in dev mode.