Changeset 872 for trunk/autoquest-htmlmonitor/src
- Timestamp:
- 10/12/12 15:16:25 (12 years ago)
- Location:
- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorLogManager.java
r871 r872 24 24 class HtmlMonitorLogManager implements HtmlMonitorComponent, HtmlMonitorMessageListener { 25 25 26 /** */ 27 private static final long serialVersionUID = 1L; 28 26 29 /** 27 30 * the timeout after which a writer of an inactive client is closed -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorMessageListener.java
r871 r872 1 1 package de.ugoe.cs.autoquest.htmlmonitor; 2 3 import java.io.Serializable; 2 4 3 5 /** … … 9 11 * @author Patrick Harms 10 12 */ 11 public interface HtmlMonitorMessageListener {13 public interface HtmlMonitorMessageListener extends Serializable { 12 14 13 15 /** -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java
r871 r872 8 8 import java.io.PrintWriter; 9 9 import java.text.DecimalFormat; 10 11 import de.ugoe.cs.util.console.Console; 10 12 11 13 /** … … 30 32 public class HtmlMonitorOutputWriter implements HtmlMonitorComponent, HtmlMonitorMessageListener { 31 33 34 /** */ 35 private static final long serialVersionUID = 1L; 36 32 37 /** 33 38 * the maximum size of an individual log file … … 102 107 103 108 if (!clientLogDir.exists()) { 104 clientLogDir.mkdirs(); 109 if (!clientLogDir.mkdirs()) { 110 throw new HtmlMonitorException("client log file directory " + clientLogDir + 111 " can not be created"); 112 } 105 113 } 106 114 else if (!clientLogDir.isDirectory()) { … … 278 286 while (checkFile.exists()); 279 287 280 logFile.renameTo(checkFile); 281 logFileIndex++; 282 logFile = new File(clientLogDir, getLogFileName(-1)); 288 if (!logFile.renameTo(checkFile)) { 289 Console.printerrln("could not rename log file " + logFile + " to " + checkFile + 290 ". Will not perform log rotation."); 291 } 292 else { 293 logFileIndex++; 294 logFile = new File(clientLogDir, getLogFileName(-1)); 295 } 283 296 } 284 297 -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorServlet.java
r871 r872 62 62 Object value = null; 63 63 try { 64 value = JSONValue.parseWithException(new InputStreamReader(request.getInputStream())); 64 value = JSONValue.parseWithException 65 (new InputStreamReader(request.getInputStream(), "UTF-8")); 65 66 66 67 if (!(value instanceof JSONObject)) { … … 325 326 else if ((int.class.equals(clazz)) || (Integer.class.equals(clazz))) { 326 327 try { 327 result = (T) new Integer(Integer.parseInt((String) value));328 result = (T) Integer.valueOf(Integer.parseInt((String) value)); 328 329 } 329 330 catch (NumberFormatException e) { … … 334 335 else if ((long.class.equals(clazz)) || (Long.class.equals(clazz))) { 335 336 try { 336 result = (T) new Long(Long.parseLong((String) value));337 result = (T) Long.valueOf(Long.parseLong((String) value)); 337 338 } 338 339 catch (NumberFormatException e) {
Note: See TracChangeset
for help on using the changeset viewer.