Author: scabanovich
Date: 2010-06-04 07:39:42 -0400 (Fri, 04 Jun 2010)
New Revision: 22543
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
Log:
https://jira.jboss.org/browse/JBIDE-6314
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-06-04
10:39:41 UTC (rev 22542)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-06-04
11:39:42 UTC (rev 22543)
@@ -200,7 +200,14 @@
String encoding = null;
boolean first = true;
try {
- InputStream is = jar.getInputStream(jar.getEntry(path));
+ ZipEntry entry = jar.getEntry(path);
+ if(entry == null) {
+ String error = "JarAccess: cannot obtain entry for path '" + path +
"' from jar '" + location + "'.";
//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ ModelPlugin.getDefault().logError(error);
+ return ""; //$NON-NLS-1$
+ }
+
+ InputStream is = jar.getInputStream(entry);
bs = new BufferedInputStream(is);
while ((length = bs.available()) > 0) {
if (length > size)