Przeglądaj źródła

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 lat temu
rodzic
commit
1d881ab486

+ 1
- 2
src/com/dmdirc/util/io/Downloader.java Wyświetl plik

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

+ 3
- 8
src/com/dmdirc/util/io/ReverseFileReader.java Wyświetl plik

@@ -46,12 +46,10 @@ public class ReverseFileReader {
46 46
      * Create a new ReverseFileReader.
47 47
      *
48 48
      * @param filename File to open.
49
-     * @throws FileNotFoundException If the file is not a regular file.
50 49
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
51 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 53
         file = new RandomAccessFile(filename, "r");
56 54
         reset();
57 55
     }
@@ -60,12 +58,10 @@ public class ReverseFileReader {
60 58
      * Create a new ReverseFileReader.
61 59
      *
62 60
      * @param myFile Existing file to use.
63
-     * @throws FileNotFoundException If the file is not a regular file.
64 61
      * @throws SecurityException If a security manager exists and its checkRead method denies read access to the file.
65 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 65
         file = new RandomAccessFile(myFile, "r");
70 66
         reset();
71 67
     }
@@ -118,10 +114,9 @@ public class ReverseFileReader {
118 114
      * Get the next full line.
119 115
      *
120 116
      * @return The next full line.
121
-     * @throws EOFException If there is no more lines.
122 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 120
         if (file == null) {
126 121
             throw new IOException("File has been closed.");
127 122
         }

Ładowanie…
Anuluj
Zapisz