Added checkstyles for brace placement
This commit is contained in:
@@ -244,7 +244,9 @@ public class PlayQueueService {
|
||||
HttpServletRequest request = WebContextFactory.get().getHttpServletRequest();
|
||||
|
||||
InternetRadio radio = internetRadioDao.getInternetRadioById(id);
|
||||
if (!radio.isEnabled()) { throw new Exception("Radio is not enabled"); }
|
||||
if (!radio.isEnabled()) {
|
||||
throw new Exception("Radio is not enabled");
|
||||
}
|
||||
|
||||
Player player = resolvePlayer();
|
||||
return doPlayInternetRadio(request, player, radio).setStartPlayerAt(0);
|
||||
|
||||
@@ -385,13 +385,11 @@ public class CoverArtController implements LastModified {
|
||||
in = getImageInputStream(coverArt);
|
||||
if (in == null) {
|
||||
reason = "getImageInputStream";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
BufferedImage bimg = ImageIO.read(in);
|
||||
if (bimg == null) {
|
||||
reason = "ImageIO.read";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return scale(bimg, size, size);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-6
@@ -109,15 +109,11 @@ public class ShareManagementController {
|
||||
for (int index : indexes) {
|
||||
result.add(children.get(index));
|
||||
}
|
||||
}
|
||||
|
||||
else if (playerId != null) {
|
||||
} else if (playerId != null) {
|
||||
Player player = playerService.getPlayerById(playerId);
|
||||
PlayQueue playQueue = player.getPlayQueue();
|
||||
result = playQueue.getFiles();
|
||||
}
|
||||
|
||||
else if (playlistId != null) {
|
||||
} else if (playlistId != null) {
|
||||
result = playlistService.getFilesInPlaylist(playlistId);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -2244,8 +2244,7 @@ public class SubsonicRESTController {
|
||||
|
||||
private AlbumInfo getAlbumInfoInternal(AlbumNotes albumNotes) {
|
||||
AlbumInfo result = new AlbumInfo();
|
||||
if (albumNotes != null)
|
||||
{
|
||||
if (albumNotes != null) {
|
||||
result.setNotes(albumNotes.getNotes());
|
||||
result.setMusicBrainzId(albumNotes.getMusicBrainzId());
|
||||
result.setLastFmUrl(albumNotes.getLastFmUrl());
|
||||
|
||||
@@ -179,6 +179,8 @@ public class AbstractDao {
|
||||
this.daoHelper = daoHelper;
|
||||
}
|
||||
|
||||
public void checkpoint() { daoHelper.checkpoint(); }
|
||||
public void checkpoint() {
|
||||
daoHelper.checkpoint();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,5 +7,7 @@ public class InternetRadioSource {
|
||||
this.streamUrl = streamUrl;
|
||||
}
|
||||
|
||||
public String getStreamUrl() { return streamUrl; }
|
||||
public String getStreamUrl() {
|
||||
return streamUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,14 +356,18 @@ public class PlayQueue {
|
||||
*
|
||||
* @return Whether the play queue is a shuffle radio mode.
|
||||
*/
|
||||
public synchronized boolean isShuffleRadioEnabled() { return this.randomSearchCriteria != null; }
|
||||
public synchronized boolean isShuffleRadioEnabled() {
|
||||
return this.randomSearchCriteria != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the play queue is a internet radio mode.
|
||||
*
|
||||
* @return Whether the play queue is a internet radio mode.
|
||||
*/
|
||||
public synchronized boolean isInternetRadioEnabled() { return this.internetRadio != null; }
|
||||
public synchronized boolean isInternetRadioEnabled() {
|
||||
return this.internetRadio != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert the last operation.
|
||||
@@ -405,28 +409,36 @@ public class PlayQueue {
|
||||
*
|
||||
* @param internetRadio An internet radio, or <code>null</code> if this is not an internet radio playlist
|
||||
*/
|
||||
public void setInternetRadio(InternetRadio internetRadio) { this.internetRadio = internetRadio; }
|
||||
public void setInternetRadio(InternetRadio internetRadio) {
|
||||
this.internetRadio = internetRadio;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current internet radio
|
||||
*
|
||||
* @return The current internet radio, or <code>null</code> if this is not an internet radio playlist
|
||||
*/
|
||||
public InternetRadio getInternetRadio() { return internetRadio; }
|
||||
public InternetRadio getInternetRadio() {
|
||||
return internetRadio;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the criteria used to generate this random playlist
|
||||
*
|
||||
* @return The search criteria, or <code>null</code> if this is not a random playlist.
|
||||
*/
|
||||
public synchronized RandomSearchCriteria getRandomSearchCriteria() { return randomSearchCriteria; }
|
||||
public synchronized RandomSearchCriteria getRandomSearchCriteria() {
|
||||
return randomSearchCriteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the criteria used to generate this random playlist
|
||||
*
|
||||
* @param randomSearchCriteria The search criteria, or <code>null</code> if this is not a random playlist.
|
||||
*/
|
||||
public synchronized void setRandomSearchCriteria(RandomSearchCriteria randomSearchCriteria) { this.randomSearchCriteria = randomSearchCriteria; }
|
||||
public synchronized void setRandomSearchCriteria(RandomSearchCriteria randomSearchCriteria) {
|
||||
this.randomSearchCriteria = randomSearchCriteria;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total length in bytes.
|
||||
|
||||
+3
-7
@@ -76,19 +76,15 @@ public class JWTRequestParameterProcessingFilter implements Filter {
|
||||
// authentication
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (InternalAuthenticationServiceException failed) {
|
||||
} catch (InternalAuthenticationServiceException failed) {
|
||||
LOG.error(
|
||||
"An internal error occurred while trying to authenticate the user.",
|
||||
failed);
|
||||
unsuccessfulAuthentication(request, response, failed);
|
||||
|
||||
return;
|
||||
}
|
||||
catch (AuthenticationException failed) {
|
||||
// Authentication failed
|
||||
unsuccessfulAuthentication(request, response, failed);
|
||||
|
||||
} catch (AuthenticationException e) {
|
||||
unsuccessfulAuthentication(request, response, e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,14 +43,18 @@ public class InternetRadioService {
|
||||
* Generic exception class for playlists.
|
||||
*/
|
||||
private class PlaylistException extends Exception {
|
||||
public PlaylistException(String message) { super(message); }
|
||||
public PlaylistException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exception thrown when the remote playlist is too large to be parsed completely.
|
||||
*/
|
||||
private class PlaylistTooLarge extends PlaylistException {
|
||||
public PlaylistTooLarge(String message) { super(message); }
|
||||
public PlaylistTooLarge(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +70,9 @@ public class InternetRadioService {
|
||||
* Exception thrown when too many redirects occurred when retrieving a remote playlist.
|
||||
*/
|
||||
private class PlaylistHasTooManyRedirects extends PlaylistException {
|
||||
public PlaylistHasTooManyRedirects(String message) { super(message); }
|
||||
public PlaylistHasTooManyRedirects(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
public InternetRadioService() {
|
||||
@@ -233,8 +239,7 @@ public class InternetRadioService {
|
||||
} else {
|
||||
playlist = SpecificPlaylistFactory.getInstance().readFrom(in, contentEncoding);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
urlConnection.disconnect();
|
||||
}
|
||||
if (playlist == null) {
|
||||
|
||||
@@ -270,8 +270,7 @@ public class MediaScannerService {
|
||||
}
|
||||
if (file.isAlbum()) {
|
||||
genres.incrementAlbumCount(genre);
|
||||
}
|
||||
else if (file.isAudio()) {
|
||||
} else if (file.isAudio()) {
|
||||
genres.incrementSongCount(genre);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user