< prev index next >

src/com/sun/javatest/TRT_HttpHandler.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg


 124         StringBuffer buf = new StringBuffer(50);
 125 
 126         // write the table header
 127         buf.append("<tr><th>");
 128         buf.append(keyHeader);
 129         buf.append("<th>");
 130         buf.append(valHeader);
 131         buf.append("</tr>");
 132         out.println(buf.toString());
 133 
 134         /*
 135         if (dict == null || dict.size() == 0) {
 136             // no values to write, fill the space
 137             buf.setLength(0);
 138             buf.append("<tr><td colspan=2>");
 139             buf.append("-EMPTY-");
 140             buf.append("</tr>");
 141         }
 142         else {
 143             */
 144             Iterator it = trt.getIterator();
 145             while (it.hasNext()) {
 146                 TestResult tr = (TestResult)(it.next());
 147                 String url;
 148                 try {
 149                     url = tr.getDescription().getRootRelativeURL();
 150                 }
 151                 catch(TestResult.Fault f) {
 152                     out.println("<tr><td>Unable to get TestResult info, aborting.</tr>");
 153                     if (debug) f.printStackTrace();
 154                     // exit the while loop
 155                     break;
 156                 }
 157 
 158                 out.println("<tr>");
 159                 buf.setLength(0);
 160                 buf.append("<td>");
 161                 buf.append(url);
 162                 buf.append("<td>");
 163                 buf.append(tr.getStatus().toString());
 164                 out.println(buf.toString());
 165                 out.println("</tr>");
 166             }   // while




 124         StringBuffer buf = new StringBuffer(50);
 125 
 126         // write the table header
 127         buf.append("<tr><th>");
 128         buf.append(keyHeader);
 129         buf.append("<th>");
 130         buf.append(valHeader);
 131         buf.append("</tr>");
 132         out.println(buf.toString());
 133 
 134         /*
 135         if (dict == null || dict.size() == 0) {
 136             // no values to write, fill the space
 137             buf.setLength(0);
 138             buf.append("<tr><td colspan=2>");
 139             buf.append("-EMPTY-");
 140             buf.append("</tr>");
 141         }
 142         else {
 143             */
 144         Iterator<TestResult> it = trt.getIterator();
 145             while (it.hasNext()) {
 146                 TestResult tr = it.next();
 147                 String url;
 148                 try {
 149                     url = tr.getDescription().getRootRelativeURL();
 150                 }
 151                 catch(TestResult.Fault f) {
 152                     out.println("<tr><td>Unable to get TestResult info, aborting.</tr>");
 153                     if (debug) f.printStackTrace();
 154                     // exit the while loop
 155                     break;
 156                 }
 157 
 158                 out.println("<tr>");
 159                 buf.setLength(0);
 160                 buf.append("<td>");
 161                 buf.append(url);
 162                 buf.append("<td>");
 163                 buf.append(tr.getStatus().toString());
 164                 out.println(buf.toString());
 165                 out.println("</tr>");
 166             }   // while


< prev index next >