Remove redundant throws clauses

This commit is contained in:
Martin Fietz 2018-01-14 18:06:24 +01:00
parent a49048c7f6
commit b80d6a7914
7 changed files with 13 additions and 13 deletions

View File

@ -442,9 +442,9 @@ public abstract class NanoHTTPD {
* themselves up when no longer needed.</p> * themselves up when no longer needed.</p>
*/ */
public interface TempFile { public interface TempFile {
OutputStream open() throws Exception; OutputStream open();
void delete() throws Exception; void delete();
String getName(); String getName();
} }
@ -522,12 +522,12 @@ public abstract class NanoHTTPD {
} }
@Override @Override
public OutputStream open() throws Exception { public OutputStream open() {
return fstream; return fstream;
} }
@Override @Override
public void delete() throws Exception { public void delete() {
safeClose(fstream); safeClose(fstream);
file.delete(); file.delete();
} }

View File

@ -124,7 +124,7 @@ public class ItunesAdapter extends ArrayAdapter<ItunesAdapter.Podcast> {
* @param json object holding the podcast information * @param json object holding the podcast information
* @throws JSONException * @throws JSONException
*/ */
public static Podcast fromSearch(JSONObject json) throws JSONException { public static Podcast fromSearch(JSONObject json) {
String title = json.optString("collectionName", ""); String title = json.optString("collectionName", "");
String imageUrl = json.optString("artworkUrl100", null); String imageUrl = json.optString("artworkUrl100", null);
String feedUrl = json.optString("feedUrl", null); String feedUrl = json.optString("feedUrl", null);

View File

@ -155,7 +155,7 @@ public class FeedItemMenuHandler {
} }
public static boolean onMenuItemClicked(Context context, int menuItemId, public static boolean onMenuItemClicked(Context context, int menuItemId,
FeedItem selectedItem) throws DownloadRequestException { FeedItem selectedItem) {
switch (menuItemId) { switch (menuItemId) {
case R.id.skip_episode_item: case R.id.skip_episode_item:
context.sendBroadcast(new Intent(PlaybackService.ACTION_SKIP_CURRENT_EPISODE)); context.sendBroadcast(new Intent(PlaybackService.ACTION_SKIP_CURRENT_EPISODE));

View File

@ -229,7 +229,7 @@ public class GpodnetSyncService extends Service {
private synchronized void processEpisodeActions(List<GpodnetEpisodeAction> localActions, private synchronized void processEpisodeActions(List<GpodnetEpisodeAction> localActions,
List<GpodnetEpisodeAction> remoteActions) throws DownloadRequestException { List<GpodnetEpisodeAction> remoteActions) {
if(remoteActions.size() == 0) { if(remoteActions.size() == 0) {
return; return;
} }

View File

@ -192,7 +192,7 @@ public class ID3Reader {
} }
int readISOString(StringBuffer buffer, InputStream input, int max) int readISOString(StringBuffer buffer, InputStream input, int max)
throws IOException, ID3ReaderException { throws IOException {
int bytesRead = 0; int bytesRead = 0;
char c; char c;
@ -205,7 +205,7 @@ public class ID3Reader {
} }
private int readUnicodeString(StringBuffer strBuffer, InputStream input, int max, Charset charset) private int readUnicodeString(StringBuffer strBuffer, InputStream input, int max, Charset charset)
throws IOException, ID3ReaderException { throws IOException {
byte[] buffer = new byte[max]; byte[] buffer = new byte[max];
int c, cZero = -1; int c, cZero = -1;
int i = 0; int i = 0;

View File

@ -30,7 +30,7 @@ public interface IPlayer {
void pause(); void pause();
void prepare() throws IllegalStateException, IOException; void prepare() throws IllegalStateException;
void prepareAsync(); void prepareAsync();
@ -44,8 +44,8 @@ public interface IPlayer {
void setScreenOnWhilePlaying(boolean screenOn); void setScreenOnWhilePlaying(boolean screenOn);
void setDataSource(String path) throws IllegalStateException, IOException, void setDataSource(String path) throws IllegalStateException,
IllegalArgumentException, SecurityException; IllegalArgumentException, SecurityException;
void setDisplay(SurfaceHolder sh); void setDisplay(SurfaceHolder sh);

View File

@ -41,7 +41,7 @@ public class FeedDiscoverer {
* @return A map which contains the feed URLs as keys and titles as values (the feed URL is also used as a title if * @return A map which contains the feed URLs as keys and titles as values (the feed URL is also used as a title if
* a title cannot be found). * a title cannot be found).
*/ */
public Map<String, String> findLinks(String in, String baseUrl) throws IOException { public Map<String, String> findLinks(String in, String baseUrl) {
return findLinks(Jsoup.parse(in), baseUrl); return findLinks(Jsoup.parse(in), baseUrl);
} }