1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-12-22 08:48:54 +00:00

[TASK] Code formatting

This commit is contained in:
Maxime Sinclair 2013-12-17 17:47:04 +01:00
parent a2e6b90643
commit 7c25eb2586

View File

@ -69,24 +69,24 @@ class DiagramResponse {
response.setContentType(getContentType()); response.setContentType(getContentType());
SourceStringReader reader = new SourceStringReader(uml); SourceStringReader reader = new SourceStringReader(uml);
reader.generateImage(response.getOutputStream(), new FileFormatOption(format, false)); reader.generateImage(response.getOutputStream(), new FileFormatOption(format, false));
// Stats.getInstance().logImageGeneration(request, now, System.currentTimeMillis(), result.getType()); // Stats.getInstance().logImageGeneration(request, now, System.currentTimeMillis(), result.getType());
} }
void sendMap(String uml) throws IOException { void sendMap(String uml) throws IOException {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
if (StringUtils.isDiagramCacheable(uml)) { if (StringUtils.isDiagramCacheable(uml)) {
addHeaderForCache(); addHeaderForCache();
} }
response.setContentType(getContentType()); response.setContentType(getContentType());
SourceStringReader reader = new SourceStringReader(uml); SourceStringReader reader = new SourceStringReader(uml);
DiagramDescription map = reader.generateDiagramDescription(new NullOutputStream(), new FileFormatOption(FileFormat.PNG, DiagramDescription map = reader.generateDiagramDescription(new NullOutputStream(), new FileFormatOption(
false)); FileFormat.PNG, false));
if (map.getCmapData() != null) { if (map.getCmapData() != null) {
PrintWriter httpOut = response.getWriter(); PrintWriter httpOut = response.getWriter();
httpOut.print(map.getCmapData()); httpOut.print(map.getCmapData());
} }
// Stats.getInstance().logImageGeneration(request, now, System.currentTimeMillis(), map.getType()); // Stats.getInstance().logImageGeneration(request, now, System.currentTimeMillis(), map.getType());
} }
private void addHeaderForCache() { private void addHeaderForCache() {
long today = System.currentTimeMillis(); long today = System.currentTimeMillis();