Skip to content
Browse files

Fixing issue with newly added ability to configure cfStatic to store …

…it's compilers in either the Server or Application scopes
  • Loading branch information...
1 parent 8de7898 commit b11bc634ef90e07b206e70f1a7b1d4a7e865fc1d @mattlevine mattlevine committed May 8, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 org/cfstatic/CfStatic.cfc
View
7 org/cfstatic/CfStatic.cfc
@@ -309,7 +309,7 @@
<cfscript>
// put javaloader instances in server scope due to memory leak issues
if(arguments.compilerScope eq "application"){
- if( not StructKeyExists(server, '_cfstaticJavaloaders') ){
+ if( not StructKeyExists(application, '_cfstaticJavaloaders') ){
application['_cfstaticJavaloaders'] = _loadJavaLoaders();
}
@@ -324,7 +324,6 @@
_setYuiCompressor ( CreateObject('component','org.cfstatic.util.YuiCompressor' ).init( server['_cfstaticJavaloaders'].yui ) );
_setLessCompiler ( CreateObject('component','org.cfstatic.util.LessCompiler' ).init( server['_cfstaticJavaloaders'].less ) );
_setCssImageParser( CreateObject('component','org.cfstatic.util.CssImageParser').init( _getCssUrl(), $listAppend(_getRootDirectory(), _getCssDirectory(), '/' ) ) );
-
}
</cfscript>
</cffunction>
@@ -334,15 +333,15 @@
var jarsForYui = ArrayNew(1);
var jarsForLess = ArrayNew(1);
var cfstaticJavaloaders = StructNew();
-
+
jarsForYui[1] = ExpandPath('/org/cfstatic/lib/yuiCompressor/yuicompressor-2.4.6.jar');
jarsForYui[2] = ExpandPath('/org/cfstatic/lib/cfstatic.jar');
jarsForLess[1] = ExpandPath('/org/cfstatic/lib/less/lesscss-engine-1.3.0.jar');
cfstaticJavaloaders.yui = CreateObject('component','org.cfstatic.lib.javaloader.JavaLoader').init( jarsForYui );
cfstaticJavaloaders.less = CreateObject('component','org.cfstatic.lib.javaloader.JavaLoader').init( jarsForLess );
- return cfstaticJavaloaders;
+ return cfstaticJavaloaders;
</cfscript>
</cffunction>

0 comments on commit b11bc63

Please sign in to comment.
Something went wrong with that request. Please try again.