Browse Source

Fix some redundent exceptions

Change-Id: I7ff972c3ca8eab51c20c36d88fbc57ab240184f0
Reviewed-on: http://gerrit.dmdirc.com/3684
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
changes/84/3684/2
Chris Smith 9 years ago
parent
commit
1d881ab486

+ 1
- 2
src/com/dmdirc/util/io/Downloader.java View File

181
      * @param url The URL to connect to
181
      * @param url The URL to connect to
182
      * @param postData The POST data to pass to the URL
182
      * @param postData The POST data to pass to the URL
183
      * @return An URLConnection for the specified URL/data
183
      * @return An URLConnection for the specified URL/data
184
-     * @throws java.net.MalformedURLException If the specified URL is malformed
185
      * @throws java.io.IOException If an I/O exception occurs while connecting
184
      * @throws java.io.IOException If an I/O exception occurs while connecting
186
      */
185
      */
187
     private URLConnection getConnection(final String url,
186
     private URLConnection getConnection(final String url,
188
             final String postData)
187
             final String postData)
189
-            throws MalformedURLException, IOException {
188
+            throws IOException {
190
         final URL myUrl = new URL(url);
189
         final URL myUrl = new URL(url);
191
         final URLConnection urlConn = myUrl.openConnection();
190
         final URLConnection urlConn = myUrl.openConnection();
192
 
191
 

+ 3
- 8
src/com/dmdirc/util/io/ReverseFileReader.java View File

46
      * Create a new ReverseFileReader.
46
      * Create a new ReverseFileReader.
47
      *
47
      *
48
      * @param filename File to open.
48
      * @param filename File to open.
49
-     * @throws FileNotFoundException If the file is not a regular file.
50
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
49
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
51
      * @throws IOException If there is an error seeking to the end of the file.
50
      * @throws IOException If there is an error seeking to the end of the file.
52
      */
51
      */
53
-    public ReverseFileReader(final String filename) throws FileNotFoundException,
54
-            SecurityException, IOException {
52
+    public ReverseFileReader(final String filename) throws SecurityException, IOException {
55
         file = new RandomAccessFile(filename, "r");
53
         file = new RandomAccessFile(filename, "r");
56
         reset();
54
         reset();
57
     }
55
     }
60
      * Create a new ReverseFileReader.
58
      * Create a new ReverseFileReader.
61
      *
59
      *
62
      * @param myFile Existing file to use.
60
      * @param myFile Existing file to use.
63
-     * @throws FileNotFoundException If the file is not a regular file.
64
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
61
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
65
      * @throws IOException If there is an error seeking to the end of the file.
62
      * @throws IOException If there is an error seeking to the end of the file.
66
      */
63
      */
67
-    public ReverseFileReader(final File myFile) throws FileNotFoundException,
68
-            SecurityException, IOException {
64
+    public ReverseFileReader(final File myFile) throws SecurityException, IOException {
69
         file = new RandomAccessFile(myFile, "r");
65
         file = new RandomAccessFile(myFile, "r");
70
         reset();
66
         reset();
71
     }
67
     }
118
      * Get the next full line.
114
      * Get the next full line.
119
      *
115
      *
120
      * @return The next full line.
116
      * @return The next full line.
121
-     * @throws EOFException If there is no more lines.
122
      * @throws IOException If an error reading or seeking occured, or if the fiel is closed.
117
      * @throws IOException If an error reading or seeking occured, or if the fiel is closed.
123
      */
118
      */
124
-    public String getNextLine() throws EOFException, IOException {
119
+    public String getNextLine() throws IOException {
125
         if (file == null) {
120
         if (file == null) {
126
             throw new IOException("File has been closed.");
121
             throw new IOException("File has been closed.");
127
         }
122
         }

Loading…
Cancel
Save