Permalink
Browse files

Version 0.5.2 - Add additional search call to look for properties fil…

…es within jars they are enclosed in + Add some better debug logging for why the actual analysis is run
  • Loading branch information...
1 parent 5e9a496 commit ebf36c51ee5fa88adc7dce8561c4837c2e55fdf5 @rbackhouse rbackhouse committed Feb 2, 2013
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Compressor
Bundle-SymbolicName: org.dojotoolkit.compressor
-Bundle-Version: 0.4.9
+Bundle-Version: 0.5.2
Import-Package: org.dojotoolkit.server.util.resource,
org.osgi.framework;version="1.3.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -34,6 +34,9 @@ public JSCompressorFactoryImpl() {
try {
Class<JSCompressor> jsCompressorClass = null;
URL propsURL = getClass().getClassLoader().getResource("/org_dojotoolkit_compressor.properties");
+ if (propsURL == null) {
+ propsURL = getClass().getResource("/org_dojotoolkit_compressor.properties");
+ }
if (propsURL != null) {
logger.logp(Level.FINE, getClass().getName(), "JSCompressorFactoryImpl", "org_dojotoolkit_compressor.properties is available");
InputStream is = null;
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Optimizer
Bundle-SymbolicName: org.dojotoolkit.optimizer
-Bundle-Version: 0.4.8
+Bundle-Version: 0.5.2
Import-Package: org.dojotoolkit.json,
org.dojotoolkit.server.util.resource,
org.dojotoolkit.server.util.rhino
@@ -65,6 +65,22 @@ public JSAnalysisData getAnalysisData(String[] modules, JSAnalysisData[] exclude
}
}
if (jsAnalysisData == null || jsAnalysisData.isStale()) {
+ if (logger.isLoggable(Level.FINE)) {
+ boolean stale = jsAnalysisData == null ? false : jsAnalysisData.isStale();
+ StringBuffer moduleList = new StringBuffer();
+ for (String module: modules) {
+ moduleList.append(module);
+ moduleList.append(" ");
+ }
+ StringBuffer excludeList = new StringBuffer();
+ for (JSAnalysisData excluded: exclude) {
+ for (String excludeModule : excluded.getDependencies()) {
+ excludeList.append(excludeModule);
+ excludeList.append(" ");
+ }
+ }
+ logger.logp(Level.FINE, getClass().getName(), "getAnalysisData", "creating Analysis Data for modules["+moduleList+"] stale["+stale+"] key["+key+"] excluded["+excludeList+"]");
+ }
jsAnalysisData = _getAnalysisData(modules, exclude, pageConfig);
jsAnalysisData.save(tempDir);
cache.put(key, jsAnalysisData);
@@ -20,14 +20,17 @@
public class JSOptimizerFactoryImpl implements JSOptimizerFactory {
private static Logger logger = Logger.getLogger("org.dojotoolkit.optimizer");
- private static final String DEFAULT_JS_OPTIMIZER_CLASS = "org.dojotoolkit.optimizer.rhinoast.RhinoJSOptimizer";
+ private static final String DEFAULT_JS_OPTIMIZER_CLASS = "org.dojotoolkit.optimizer.rhinoast.AMDJSOptimizer";
private Constructor<JSOptimizer> jsOptimizerConstructor = null;
@SuppressWarnings("unchecked")
public JSOptimizerFactoryImpl() {
try {
Class<JSOptimizer> jsOptimizerClass = null;
URL propsURL = getClass().getClassLoader().getResource("/org_dojotoolkit_optimizer.properties");
+ if (propsURL == null) {
+ propsURL = getClass().getResource("/org_dojotoolkit_optimizer.properties");
+ }
if (propsURL != null) {
logger.logp(Level.FINE, getClass().getName(), "JSOptimizerFactoryImpl", "org_dojotoolkit_optimizer.properties is available");
InputStream is = null;

0 comments on commit ebf36c5

Please sign in to comment.