follow-up patch for [HER-1764] H3 needs in-UI quit/shutdown option

* Flash.java
    avoid NPE when "flashdrop" cookie not set
This commit is contained in:
szznax
2010-06-16 22:02:41 +00:00
parent edb70dae06
commit e83a6eceed
@@ -79,6 +79,9 @@ public class Flash {
public static List<Flash> getFlashes(Request request) {
List<Flash> flashes = new LinkedList<Flash>();
Series<Cookie> cookies = request.getCookies();
if (cookies.getFirstValue("flashdrop") == null) {
return flashes;
}
for (String dropbox : cookies.getFirstValue("flashdrop").split(",")) {
if(dropbox!=null) {
Flash flash = dropboxes.remove(Long.parseLong(dropbox));