sashamoshura / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
Apache License 2.0
0 stars 0 forks source link

IndexOutOfBoundsException on php within IE conditional comments #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. get attached test.html
2. java -jar htmlcompressor-1.4.2.jar  --preserve-php test.html 

What is the expected output? 

Minified output, with the php tag retained

What do you see instead?

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.googlecode.htmlcompressor.compressor.HtmlCompressor.returnBlocks(HtmlCompressor.java:463)
    at com.googlecode.htmlcompressor.compressor.HtmlCompressor.compress(HtmlCompressor.java:196)
    at com.googlecode.htmlcompressor.compressor.HtmlCompressor.preserveBlocks(HtmlCompressor.java:277)
    at com.googlecode.htmlcompressor.compressor.HtmlCompressor.compress(HtmlCompressor.java:187)
    at com.googlecode.htmlcompressor.CmdLineCompressor.main(CmdLineCompressor.java:349)

Original issue reported on code.google.com by paul.ir...@gmail.com on 31 Jul 2011 at 6:54

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in 1.4.3. I will hold off with releasing it for couple days, maybe more 
bugs will be discovered. Please see the attached file. 

Thanks.

Original comment by serg472@gmail.com on 31 Jul 2011 at 7:49

Attachments:

GoogleCodeExporter commented 8 years ago
1.4.3 released (jar is the same as attached).

Original comment by serg472@gmail.com on 3 Aug 2011 at 11:58

GoogleCodeExporter commented 8 years ago
thanks for the update!

Original comment by paul.ir...@gmail.com on 4 Aug 2011 at 12:48