You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by om...@apache.org on 2007/08/13 19:24:28 UTC
svn commit: r565434 -
/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
Author: omalley
Date: Mon Aug 13 10:24:28 2007
New Revision: 565434
URL: http://svn.apache.org/viewvc?view=rev&rev=565434
Log:
HADOOP-1568 followup to fix java 1.5 incompatibility
Modified:
lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java?view=diff&rev=565434&r1=565433&r2=565434
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/dfs/HftpFileSystem.java Mon Aug 13 10:24:28 2007
@@ -95,7 +95,9 @@
connection.setRequestMethod("GET");
connection.connect();
} catch (URISyntaxException e) {
- throw new IOException(e);
+ IOException ie = new IOException("invalid url");
+ ie.initCause(e);
+ throw ie;
}
final InputStream in = connection.getInputStream();
return new FSDataInputStream(new FSInputStream() {
@@ -162,8 +164,14 @@
InputStream resp = connection.getInputStream();
xr.parse(new InputSource(resp));
- } catch (Exception e) {
- throw new IOException(e);
+ } catch (SAXException e) {
+ IOException ie = new IOException("invalid xml directory content");
+ ie.initCause(e);
+ throw ie;
+ } catch (URISyntaxException e) {
+ IOException ie = new IOException("invalid url");
+ ie.initCause(e);
+ throw ie;
}
}