diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-03-15 00:25:37 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-04-03 15:38:37 +0200 |
commit | 82f28cc18b9371c81f3e6fa147080371a00443f5 (patch) | |
tree | 9f6e9f65dbe1b930d90d01ba09ae438cac2a0bd2 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper | |
parent | 0f8777952974daf03099bf48c6db1d91bd431bb2 (diff) | |
download | pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.tar.gz pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.tar.bz2 pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.zip |
Don't use raw types! Also check casts where possible
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper')
-rw-r--r-- | pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java | 5 |
1 files changed, 5 insertions, 0 deletions
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<VerifyResult> 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<VerifyResult>) obj; } catch (Throwable e) { logger.error("Invalid object type"); |