branch develop updated (7427709d -> a8251a18)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 7427709d mise a jour de la documentation new a8251a18 Fix REST API filters The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit a8251a18e6d627e4e133252c4305ae875a6aa54c Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Dec 1 09:53:06 2017 +0100 Fix REST API filters Summary of changes: .../pollen/rest/api/PollenRestApiRequestFilter.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit a8251a18e6d627e4e133252c4305ae875a6aa54c Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Fri Dec 1 09:53:06 2017 +0100 Fix REST API filters --- .../pollen/rest/api/PollenRestApiRequestFilter.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java index 3ae84c8d..c7a03a06 100644 --- a/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java +++ b/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/PollenRestApiRequestFilter.java @@ -206,8 +206,8 @@ public class PollenRestApiRequestFilter implements ContainerRequestFilter, Conta .stream() .map(entry -> entry.getKey() + "=" + entry.getValue().stream().collect(Collectors.joining(","))) .collect(Collectors.joining("&")); - String classApi = resourceInfo.getResourceClass().getSimpleName(); - String methodApi = resourceInfo.getResourceMethod().getName(); + String classApi = resourceInfo.getResourceClass() == null ? "???" : resourceInfo.getResourceClass().getSimpleName(); + String methodApi = resourceInfo.getResourceMethod() == null ? "???" : resourceInfo.getResourceMethod().getName(); int httpCode = containerResponseContext.getStatus(); log.info(String.format("%s %s?%s ==> %s.%s ==> %d : %dms", @@ -328,9 +328,14 @@ public class PollenRestApiRequestFilter implements ContainerRequestFilter, Conta SecurityService securityService = ResteasyProviderFactory.getContextData(SecurityService.class); - String token = securityService.getToken(); + if (securityService == null) { + if (log.isErrorEnabled()) { + log.error("securityService no in REST context"); + } + } else { + String token = securityService.getToken(); - NewCookie authCookie = new NewCookie( + NewCookie authCookie = new NewCookie( COOKIE_POLLEN_AUTH, token, "/", @@ -338,7 +343,8 @@ public class PollenRestApiRequestFilter implements ContainerRequestFilter, Conta null, StringUtils.isNotBlank(token) ? COOKIE_MAX_AGE : 0, false); - containerResponseContext.getHeaders().add(HttpHeaders.SET_COOKIE, authCookie); + containerResponseContext.getHeaders().add(HttpHeaders.SET_COOKIE, authCookie); + } } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm