/* connecting to j2 opens the jar file but does not read it */
j2.connect();
try { /* attempt to read a non-existing entry in the jar file *showsthebug,wherethejarfileisclosedafterthe *attemptfails.
*/
InputStream is = j1.getInputStream();
} catch (IOException e) {
System.out.println("Got expected exception from j1 ");
}
/* If bug present, this will fail because we think the jar *isreadytoberead,aftertheconnect()above,butwe *getaZipExceptionbecauseithasbeenclosed
*/
InputStream is = j2.getInputStream();
readAndClose(is);
System.out.println("OK");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.