changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Stack overflow compiling wro4j-bootstrap-sample using the default <wroManagerFactory> #460

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. git clone https://github.com/gonzalad/wro4j-bootstrap-sample.git
2. remove <wroManagerFactory> from pom.xml
3. execute mvn package

What is the expected output? What do you see instead?
less resources should be processed.
Instead, a stack overflow occurs :
Exception in thread "main" java.lang.StackOverflowError
        at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4730)
        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4615)
        at java.util.regex.Pattern$CharProperty.match(Pattern.java:3694)
        at java.util.regex.Pattern$Ques.match(Pattern.java:4086)
        at java.util.regex.Pattern$GroupHead.match(Pattern.java:4556)
        at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4745)
        at java.util.regex.Pattern$GroupTail.match(Pattern.java:4615)
        at java.util.regex.Pattern$CharProperty.match(Pattern.java:3694)
        at java.util.regex.Pattern$Ques.match(Pattern.java:4086)

What version of the product are you using? On what operating system?
maven-wro4j-plugin 1.4.5/1.4.6

Original issue reported on code.google.com by fbri...@gmail.com on 12 Jun 2012 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 12 Jun 2012 at 12:16

GoogleCodeExporter commented 9 years ago
The cause of the problem is JawrCssMinimizer which had a lazy quantifier. It 
was replaced with a possessive quantifier and now no more stackoverflow error 
is thrown. 

Still, when using JawrCssMinimizer for invalid css resources (example: 
lesscss), the produce output won't be valid. It is important to avoid such 
situations. The following options are recommended:
1) Don't use lesscss resources in model if LessCssProcessor is not applied
2) Apply LessCssProcessor before JawrCssMinimizer
3) Use CssMinimizer instead of JawrCssMinimizer

Original comment by alex.obj...@gmail.com on 14 Jun 2012 at 4:14

GoogleCodeExporter commented 9 years ago
Thx for the fix Alex

Original comment by fbri...@gmail.com on 14 Jun 2012 at 4:51