< prev index next >

src/com/sun/javatest/agent/AgentManager.java

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


 519 
 520                 case Agent.REF:
 521                     ref.write(in.readUTF());
 522                     break;
 523 
 524                 case Agent.REF_FLUSH:
 525                     ref.write(in.readUTF());
 526                     ref.flush();
 527                     break;
 528                 }
 529             }
 530 
 531             out.close();
 532             in.close();
 533             connection.close();
 534 
 535             log.flush();
 536             ref.flush();
 537 
 538             // might be better not to flush these ...
 539             for (Enumeration e = zips.keys(); e.hasMoreElements(); ) {
 540                 File f = (File)(e.nextElement());
 541                 ZipFile z = zips.get(f);
 542                 zips.remove(f);
 543                 z.close();
 544             }
 545 
 546             return status;
 547         }
 548 
 549         private AgentRemoteClassData locateClass(String name) {
 550             //System.err.println("locateClass: " + name);
 551             if (classPath != null) {
 552                 String cname = name.replace('.', '/') + ".class";
 553                 for (int i = 0; i < classPath.length; i++) {
 554                     byte[] data;
 555                     if (classPath[i].isDirectory())
 556                         data = readFromDir(cname, classPath[i]);
 557                     else
 558                         data = readFromJar(cname, classPath[i]);
 559                     if (data != null) {
 560                         String codeSource = "";




 519 
 520                 case Agent.REF:
 521                     ref.write(in.readUTF());
 522                     break;
 523 
 524                 case Agent.REF_FLUSH:
 525                     ref.write(in.readUTF());
 526                     ref.flush();
 527                     break;
 528                 }
 529             }
 530 
 531             out.close();
 532             in.close();
 533             connection.close();
 534 
 535             log.flush();
 536             ref.flush();
 537 
 538             // might be better not to flush these ...
 539             for (Enumeration<File> e = zips.keys(); e.hasMoreElements(); ) {
 540                 File f = (e.nextElement());
 541                 ZipFile z = zips.get(f);
 542                 zips.remove(f);
 543                 z.close();
 544             }
 545 
 546             return status;
 547         }
 548 
 549         private AgentRemoteClassData locateClass(String name) {
 550             //System.err.println("locateClass: " + name);
 551             if (classPath != null) {
 552                 String cname = name.replace('.', '/') + ".class";
 553                 for (int i = 0; i < classPath.length; i++) {
 554                     byte[] data;
 555                     if (classPath[i].isDirectory())
 556                         data = readFromDir(cname, classPath[i]);
 557                     else
 558                         data = readFromJar(cname, classPath[i]);
 559                     if (data != null) {
 560                         String codeSource = "";


< prev index next >