Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/java/com/simonbuckle/ant/tasks/CompressTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,19 @@ public void execute() throws BuildException {
}
}

private void compress(File source, File dest) throws IOException {
private void compress(final File source, File dest) throws IOException {
Reader in = null;
Writer out = null;
try {
in = new BufferedReader(new FileReader(source));
JavaScriptCompressor compressor = new JavaScriptCompressor(in, new ErrorReporter() {

public void warning(String message, String sourceName, int line, String lineSource, int lineOffset) {
log("Warning: " + message, Project.MSG_WARN);
log("Warning: " + source.getName() + ":" + line + ":" + lineOffset + " " + message + " >>>>" + lineSource, Project.MSG_WARN);
}

public void error(String message, String sourceName, int line, String lineSource, int lineOffset) {
log("Error: " + message, Project.MSG_ERR);
log("Error: " + source.getName() + ":" + line + ":" + lineOffset + " " + message + " >>>>" + lineSource, Project.MSG_ERR);
}

public EvaluatorException runtimeError(String message, String sourceName, int line, String lineSource, int lineOffset) {
Expand All @@ -128,7 +128,7 @@ public EvaluatorException runtimeError(String message, String sourceName, int li
});

out = new BufferedWriter(new FileWriter(dest));
log("Compressing: " + source.getName());
log("Compressing: " + source.getName() + " ===> " + dest.getName());

compressor.compress(out,
linebreak,
Expand All @@ -149,7 +149,7 @@ private void compressCss(File source, File dest) throws IOException {
in = new BufferedReader(new FileReader(source));
CssCompressor compressor = new CssCompressor(in);

log("Compressing: " + source.getName());
log("Compressing: " + source.getName() + " ===> " + dest.getName());

out = new BufferedWriter(new FileWriter(dest));
compressor.compress(out, linebreak);
Expand Down