View | Details | Raw Unified | Return to bug 78128 | Differences between
and this patch

Collapse All | Expand All

(-)model/org/eclipse/jdt/core/ToolFactory.java (-2 / +10 lines)
Lines 165-171 Link Here
165
		if (root != null){
165
		if (root != null){
166
			try {
166
			try {
167
				if (root instanceof JarPackageFragmentRoot) {
167
				if (root instanceof JarPackageFragmentRoot) {
168
						
169
					String archiveName = null;
168
					String archiveName = null;
170
					ZipFile jar = null;
169
					ZipFile jar = null;
171
					try {
170
					try {
Lines 209-219 Link Here
209
	 * @see IClassFileReader
208
	 * @see IClassFileReader
210
	 */
209
	 */
211
	public static IClassFileReader createDefaultClassFileReader(String zipFileName, String zipEntryName, int decodingFlag){
210
	public static IClassFileReader createDefaultClassFileReader(String zipFileName, String zipEntryName, int decodingFlag){
211
		ZipFile zipFile = null;
212
		try {
212
		try {
213
			if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
213
			if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
214
				System.out.println("(" + Thread.currentThread() + ") [ToolFactory.createDefaultClassFileReader()] Creating ZipFile on " + zipFileName); //$NON-NLS-1$	//$NON-NLS-2$
214
				System.out.println("(" + Thread.currentThread() + ") [ToolFactory.createDefaultClassFileReader()] Creating ZipFile on " + zipFileName); //$NON-NLS-1$	//$NON-NLS-2$
215
			}
215
			}
216
			ZipFile zipFile = new ZipFile(zipFileName);
216
			zipFile = new ZipFile(zipFileName);
217
			ZipEntry zipEntry = zipFile.getEntry(zipEntryName);
217
			ZipEntry zipEntry = zipFile.getEntry(zipEntryName);
218
			if (zipEntry == null) {
218
			if (zipEntry == null) {
219
				return null;
219
				return null;
Lines 227-232 Link Here
227
			return null;
227
			return null;
228
		} catch(IOException e) {
228
		} catch(IOException e) {
229
			return null;
229
			return null;
230
		} finally {
231
			if (zipFile != null) {
232
				try {
233
					zipFile.close();
234
				} catch(IOException e) {
235
					// ignore
236
				}
237
			}
230
		}
238
		}
231
	}	
239
	}	

Return to bug 78128