Merge remote-tracking branch 'origin/pr/1091'

This commit is contained in:
Andrew DeMaria
2019-06-06 19:58:12 -06:00
5 changed files with 8 additions and 5 deletions
@@ -21,7 +21,7 @@ public class AccessDeniedController {
@GetMapping
public ModelAndView accessDenied(HttpServletRequest request, HttpServletResponse response) {
LOG.info("The IP {0} tried to access the forbidden url {1}.", request.getRemoteAddr(), request.getRequestURL());
LOG.info("The IP {} tried to access the forbidden url {}.", request.getRemoteAddr(), request.getRequestURL());
return new ModelAndView("accessDenied");
}
@@ -56,11 +56,11 @@ public class PodcastReceiverAdminController {
podcastService.createChannel(url);
return new ModelAndView(new RedirectView("podcastChannels.view"));
}
if (request.getParameter("downloadEpisode") != null) {
if (request.getParameter("downloadEpisode") != null && channelId != null) {
download(StringUtil.parseInts(request.getParameter("downloadEpisode")));
return new ModelAndView(new RedirectView("podcastChannel.view?id=" + channelId));
}
if (request.getParameter("deleteChannel") != null) {
if (request.getParameter("deleteChannel") != null && channelId != null) {
podcastService.deleteChannel(channelId);
return new ModelAndView(new RedirectView("podcastChannels.view"));
}
@@ -110,7 +110,7 @@ public class CustomUserDetailsContextMapper implements UserDetailsContextMapper
public void mapUserToContext(UserDetails user, DirContextAdapter ctx) {
throw new UnsupportedOperationException(
"LdapUserDetailsMapper only supports reading from a context. Please"
"LdapUserDetailsMapper only supports reading from a context. Please "
+ "use a subclass if mapUserToContext() is required.");
}
@@ -38,6 +38,7 @@ import org.springframework.web.util.UriComponentsBuilder;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
/**
@@ -120,6 +121,8 @@ public class AlbumUpnpProcessor extends UpnpContentProcessor <Album, MediaFile>
albumList = ap.getChildren(ap.getItemById(album.getComment().replaceAll(ALL_BY_ARTIST + "_", "")));
} else if (album.getComment().equalsIgnoreCase(ALL_RECENT)) {
albumList = getDispatcher().getRecentAlbumProcessor().getAllItems();
} else {
albumList = new ArrayList<>();
}
for (Album a: albumList) {
if (a.getId() != -1) {
@@ -56,7 +56,7 @@ public class HttpRange {
String firstString = matcher.group(1);
String lastString = StringUtils.trimToNull(matcher.group(2));
Long first = Long.parseLong(firstString);
long first = Long.parseLong(firstString);
Long last = lastString == null ? null : Long.parseLong(lastString);
if (last != null && first > last) {