[Lada-commits] [PATCH 6 of 7] Fixed warnings

Wald Commits scm-commit at wald.intevation.org
Mon Sep 5 10:20:07 CEST 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1473063518 -7200
# Branch schema-update
# Node ID 3a5a9a0492d10ae67f33600fa260ff71989df0c9
# Parent  f92c96efa97693d03d96a8794e11ef28b0f27538
Fixed warnings.

diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/query/QueryTools.java
--- a/src/main/java/de/intevation/lada/query/QueryTools.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/query/QueryTools.java	Mon Sep 05 10:18:38 2016 +0200
@@ -172,7 +172,12 @@
         }
     }
 
-    public List<Map<String, Object>> getResultForQuery(MultivaluedMap<String, String> params, Integer qId, String type) {
+    @SuppressWarnings("unchecked")
+    public List<Map<String, Object>> getResultForQuery(
+        MultivaluedMap<String, String> params,
+        Integer qId,
+        String type
+    ) {
         QueryBuilder<Query> builder = new QueryBuilder<Query>(
             repository.entityManager("stamm"),
             Query.class
@@ -211,7 +216,7 @@
             params,
             repository.entityManager("land"));
         if (q == null) {
-            return new ArrayList();
+            return new ArrayList<Map<String, Object>>();
         }
         return prepareResult(q.getResultList(), results);
     }
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/KommentarMService.java
--- a/src/main/java/de/intevation/lada/rest/KommentarMService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/KommentarMService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -235,6 +235,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         KommentarM kommentar
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/KommentarPService.java
--- a/src/main/java/de/intevation/lada/rest/KommentarPService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/KommentarPService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -215,6 +215,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         KommentarP kommentar
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java
--- a/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MessprogrammMmtService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -204,6 +204,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         MessprogrammMmt messprogrammmmt
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/MessprogrammService.java
--- a/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -299,6 +299,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Messprogramm messprogramm
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/MesswertService.java
--- a/src/main/java/de/intevation/lada/rest/MesswertService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/MesswertService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -299,6 +299,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Messwert messwert
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/OrtService.java
--- a/src/main/java/de/intevation/lada/rest/OrtService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/OrtService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -263,6 +263,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Ortszuordnung ort
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/ProbeService.java
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -407,6 +407,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Probe probe
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/StatusService.java
--- a/src/main/java/de/intevation/lada/rest/StatusService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/StatusService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -369,6 +369,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         StatusProtokoll status
     ) {
         return new Response(false, 699, null);
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/ZusatzwertService.java
--- a/src/main/java/de/intevation/lada/rest/ZusatzwertService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/ZusatzwertService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -230,6 +230,7 @@
     public Response update(
         @Context HttpHeaders headers,
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         ZusatzWert zusatzwert
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/stamm/DatensatzErzeugerService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/DatensatzErzeugerService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/DatensatzErzeugerService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -218,6 +218,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         DatensatzErzeuger datensatzerzeuger
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/stamm/MessgroesseService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/MessgroesseService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/MessgroesseService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -103,6 +103,7 @@
             defaultRepo.queryFromString(
                 "select messgroesse_id from mmt_messgroesse where mmt_id = '"
                 + mmtId + "'", "stamm");
+        @SuppressWarnings("unchecked")
         List<Integer> ids = query.getResultList();
         QueryBuilder<Messgroesse> builder2 =
             new QueryBuilder<Messgroesse>(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/stamm/MessprogrammKategorieService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/MessprogrammKategorieService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/MessprogrammKategorieService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -218,6 +218,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         MessprogrammKategorie kategorie
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/stamm/OrtService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/OrtService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/OrtService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -302,6 +302,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Ort ort
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/rest/stamm/ProbenehmerService.java
--- a/src/main/java/de/intevation/lada/rest/stamm/ProbenehmerService.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/rest/stamm/ProbenehmerService.java	Mon Sep 05 10:18:38 2016 +0200
@@ -213,6 +213,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response update(
         @Context HttpServletRequest request,
+        @PathParam("id") String id,
         Probenehmer probenehmer
     ) {
         if (!authorization.isAuthorized(
diff -r f92c96efa976 -r 3a5a9a0492d1 src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java
--- a/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Mon Sep 05 10:17:32 2016 +0200
+++ b/src/main/java/de/intevation/lada/util/auth/ShibbolethFilter.java	Mon Sep 05 10:18:38 2016 +0200
@@ -36,9 +36,6 @@
 
     private static final String CONFIG_FILE = "/shibboleth.properties";
 
-    private String applicationId = "default";
-
-
     @Inject
     private Logger logger = Logger.getLogger(ShibbolethFilter.class);
 


More information about the Lada-commits mailing list