< prev index next >

src/com/sun/javatest/tool/jthelp/JTHelpBroker.java

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

*** 127,141 **** File jarFile = new File(HelpBroker.class.getProtectionDomain().getCodeSource().getLocation().toURI()); File destDir = new File(Preferences.getPrefsDir(), HELP_DIR_NAME); File helpVersion = new File(destDir, HELP_VERSION_NAME); JarFile jar = new JarFile(jarFile); ! Enumeration enumEntries = jar.entries(); int total = 0; while (enumEntries.hasMoreElements()) { ! JarEntry file = (JarEntry) enumEntries.nextElement(); if (isHelpFile(file)) { total++; } } --- 127,141 ---- File jarFile = new File(HelpBroker.class.getProtectionDomain().getCodeSource().getLocation().toURI()); File destDir = new File(Preferences.getPrefsDir(), HELP_DIR_NAME); File helpVersion = new File(destDir, HELP_VERSION_NAME); JarFile jar = new JarFile(jarFile); ! Enumeration<JarEntry> enumEntries = jar.entries(); int total = 0; while (enumEntries.hasMoreElements()) { ! JarEntry file = enumEntries.nextElement(); if (isHelpFile(file)) { total++; } }
*** 148,158 **** int progress = 0; setProgress((int) (progress * 100.0 / total)); enumEntries = jar.entries(); while (enumEntries.hasMoreElements()) { ! JarEntry file = (JarEntry) enumEntries.nextElement(); File f = new java.io.File(destDir + java.io.File.separator + file.getName()); if (isHelpFile(file)) { f.getParentFile().mkdirs(); InputStream is = jar.getInputStream(file); FileOutputStream fos = new java.io.FileOutputStream(f); --- 148,158 ---- int progress = 0; setProgress((int) (progress * 100.0 / total)); enumEntries = jar.entries(); while (enumEntries.hasMoreElements()) { ! JarEntry file = enumEntries.nextElement(); File f = new java.io.File(destDir + java.io.File.separator + file.getName()); if (isHelpFile(file)) { f.getParentFile().mkdirs(); InputStream is = jar.getInputStream(file); FileOutputStream fos = new java.io.FileOutputStream(f);
< prev index next >