aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/ExceptionCatchFilter.java1
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java5
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java2
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java2
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java2
5 files changed, 9 insertions, 3 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/ExceptionCatchFilter.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/ExceptionCatchFilter.java
index 6beff606..085976f0 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/ExceptionCatchFilter.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/filter/ExceptionCatchFilter.java
@@ -70,6 +70,7 @@ public class ExceptionCatchFilter implements Filter {
logger.debug("Processing Parameters into Attributes");
HttpServletRequest httpRequest = (HttpServletRequest)request;
PdfAsHelper.logAccess(httpRequest);
+ @SuppressWarnings("unchecked")
Enumeration<String> parameterNames = httpRequest.getParameterNames();
while(parameterNames.hasMoreElements()) {
String name = parameterNames.nextElement();
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");
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
index ecdc4a8c..cf25c2f2 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/DataURLServlet.java
@@ -83,7 +83,7 @@ public class DataURLServlet extends HttpServlet {
//System.out.println(xmlResponse);
- JAXBElement jaxbObject = (JAXBElement) SLMarschaller.unmarshalFromString(xmlResponse);
+ JAXBElement<?> jaxbObject = (JAXBElement<?>) SLMarschaller.unmarshalFromString(xmlResponse);
if(jaxbObject.getValue() instanceof InfoboxReadResponseType) {
InfoboxReadResponseType infoboxReadResponseType = (InfoboxReadResponseType)jaxbObject.getValue();
logger.info("Got InfoboxReadResponseType");
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
index 28ce628a..ac22f6c8 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java
@@ -157,7 +157,7 @@ public class ExternSignServlet extends HttpServlet {
uploadDir.mkdir();
}
- List formItems = upload.parseRequest(request);
+ List<?> formItems = upload.parseRequest(request);
logger.debug(formItems.size() + " Items in form data");
if (formItems.size() < 1) {
// No Uploaded data!
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
index f6b65245..42a5175a 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java
@@ -143,7 +143,7 @@ public class VerifyServlet extends HttpServlet {
uploadDir.mkdir();
}
- List formItems = upload.parseRequest(request);
+ List<?> formItems = upload.parseRequest(request);
logger.debug(formItems.size() + " Items in form data");
if (formItems.size() < 1) {
// No Uploaded data!