YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2495399 (checkedin defect)

Reporter


cjus
Opened: 04/25/09
Last modified: 05/15/10
Status: checkedin
Type: defect

Owner


Adam Moore
Target Release: 2.4.3
Priority: P3 (normal)
Summary: Java exception while processing .js file
Description:

Running YUICompressor over a particular .js file is throwing a Java exception during processing.
You can retrieve the CSS file in question here: http://www.zoeybot.com/construct.css

Type: defect Observed in Version: 2.4.2
Component: YUICompressor Severity: S1 (critical)
Assigned To: Adam Moore Target Release: 2.4.3
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL: http://www.zoeybot.com/construct.css
Test Information:

Exception encountered while using yuicompressor against CSS file.
You can retrieve the CSS file in question here: http://www.zoeybot.com/construct.css

X:yuicompressor-2.4.2>java -jar .buildyuicompressor-2.4.2.jar -o construct-mf.js --disable-optimizations construct.js

[ERROR] 1:2:illegal character

[ERROR] 1:2:syntax error

[ERROR] 1:3:illegal character

[ERROR] 1:0:Compilation produced 3 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 3 syntax errors.
at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:135)
at org.mozilla.javascript.Parser.parse(Parser.java:410)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)

X:yuicompressor-2.4.2>

Change History

George

YUI Developer

Posted: 09/23/09

George

YUI Developer

Posted: 01/30/10

Adam Moore

YUI Developer

Posted: 03/17/10
  • location changed to Library Code
  • milestone changed to 2.4.3
  • priority changed to P3 (normal)
  • status changed from assigned to accepted

Likely caused by the fact you didn't specify a charset. Fixed now because the compressor defaults to UTF-8

Stoyan Stefanov

YUI Developer

Posted: 05/15/10
  • status changed from accepted to checkedin

I can confirm that the file minifies as expected