kohsuke committed 2009-05-18 21:00:09 +00:00
1 parent ba46603dfd
commit 85a4bc0b6b
4 files changed
+5 -7

No files matched your search

+2 -1
View File
@@ -37,6 +37,7 @@ import java.net.URL;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.nio.charset.Charset;
/**
* Entry point to Hudson from command line.
@@ -107,7 +108,7 @@ public class Main {
Writer w = new OutputStreamWriter(os,"UTF-8");
w.write("<?xml version='1.0' encoding='UTF-8'?>");
w.write("<run><log encoding='hexBinary'>");
w.write("<run><log encoding='hexBinary' content-encoding='"+Charset.defaultCharset().name()+"'>");
w.flush();
// run the command
@@ -32,7 +32,6 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
/**
* Job that runs outside Hudson whose result is submitted to Hudson
@@ -89,7 +88,7 @@ public class ExternalJob extends ViewJob<ExternalJob,ExternalRun> implements Top
/**
* Used to check if this is an external job and ready to accept a build result.
*/
public void doAcceptBuildResult( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
public void doAcceptBuildResult(StaplerResponse rsp) throws IOException, ServletException {
rsp.setStatus(HttpServletResponse.SC_OK);
}
@@ -103,9 +102,6 @@ public class ExternalJob extends ViewJob<ExternalJob,ExternalRun> implements Top
rsp.setStatus(HttpServletResponse.SC_OK);
}
private static final Logger logger = Logger.getLogger(ExternalJob.class.getName());
public TopLevelItemDescriptor getDescriptor() {
return DESCRIPTOR;
}
@@ -99,6 +99,7 @@ public class ExternalRun extends Run<ExternalJob,ExternalRun> {
xpp.setInput(in);
xpp.nextTag(); // get to the <run>
xpp.nextTag(); // get to the <log>
charset=xpp.getAttributeValue(null,"content-encoding");
while(xpp.nextToken()!=XmlPullParser.END_TAG) {
int type = xpp.getEventType();
if(type==XmlPullParser.TEXT
+1 -1
View File
@@ -180,7 +180,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @see #getCharset()
* @since 1.257
*/
private String charset;
protected String charset;
/**
* Keeps this log entries.