servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r703337 - /servicemix/scripts/builds/webapps/builds/status.jsp
Date Fri, 10 Oct 2008 06:50:34 GMT
Author: lhein
Date: Thu Oct  9 23:50:34 2008
New Revision: 703337

URL: http://svn.apache.org/viewvc?rev=703337&view=rev
Log:
updated jsp to not show FileNotFoundExceptions

Modified:
    servicemix/scripts/builds/webapps/builds/status.jsp

Modified: servicemix/scripts/builds/webapps/builds/status.jsp
URL: http://svn.apache.org/viewvc/servicemix/scripts/builds/webapps/builds/status.jsp?rev=703337&r1=703336&r2=703337&view=diff
==============================================================================
--- servicemix/scripts/builds/webapps/builds/status.jsp (original)
+++ servicemix/scripts/builds/webapps/builds/status.jsp Thu Oct  9 23:50:34 2008
@@ -84,7 +84,14 @@
     boolean failedTests = false;
     String file = dir + uri;
     BufferedReader reader = null;
+    
     File f = new File(file);
+    
+    if (!f.exists() || !f.isFile()) {
+        // log file is missing
+        return "<td class='error' width='60%'>UNAVAILABLE</td>";
+    }
+    
     String durationText = convertToDuration(System.currentTimeMillis() - f.lastModified());
     try {
       System.out.println("Processing: " + file);



Mime
View raw message