From 82f28cc18b9371c81f3e6fa147080371a00443f5 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Sat, 15 Mar 2014 00:25:37 +0100 Subject: Don't use raw types! Also check casts where possible --- .../src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper') diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java index 2d14a99a..47243a43 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java @@ -774,12 +774,17 @@ public class PdfAsHelper { session.setAttribute(VERIFICATION_RESULT, value); } + @SuppressWarnings("unchecked") public static List getVerificationResult( HttpServletRequest request) { HttpSession session = request.getSession(); Object obj = session.getAttribute(VERIFICATION_RESULT); if (obj != null) { try { + if (!(obj instanceof List)) { + logger.error("Invalid object type"); + return null; + } return (List) obj; } catch (Throwable e) { logger.error("Invalid object type"); -- cgit v1.2.3