2006/unicorn/src/org/w3c/unicorn/input URIInputParameter.java,1.3,1.4

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/input
In directory hutz:/tmp/cvs-serv9009/src/org/w3c/unicorn/input

Modified Files:
	URIInputParameter.java 
Log Message:
removed FileNotFoundException which was never thrown because getContent() is not called on the URLConnection object. Replaced by a switch on getResponseCode()

Index: URIInputParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- URIInputParameter.java	17 Sep 2009 16:54:00 -0000	1.3
+++ URIInputParameter.java	17 Sep 2009 17:05:08 -0000	1.4
@@ -43,6 +43,9 @@
 			case HttpURLConnection.HTTP_UNAUTHORIZED:
 				message = new Message(Message.Level.ERROR, "$message_unauthorized_access", null);
 				throw new UnicornException(message);
+			case HttpURLConnection.HTTP_NOT_FOUND:
+				message = new Message(Message.Level.ERROR, "$message_document_not_found", null);
+				throw new UnicornException(message);
 			}
 			
 			String sMimeType = con.getContentType();
@@ -55,9 +58,6 @@
 		} catch (MimeTypeParseException e) {
 			Message message = new Message(Message.Level.ERROR, "$message_invalid_mime_type", null);
 			throw new UnicornException(message);
-		} catch (FileNotFoundException e) {
-			Message message = new Message(Message.Level.ERROR, "$message_document_not_found", null);
-			throw new UnicornException(message);
 		} catch (UnknownHostException e) { 
 			Message message = new Message(Message.Level.ERROR, "$message_unknown_host", null);
 			throw new UnicornException(message);

Received on Thursday, 17 September 2009 17:05:19 UTC