activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #845: ARTEMIS-801 Decode URL paths
Date Mon, 17 Oct 2016 16:36:11 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/845#discussion_r83683002
  
    --- Diff: artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/GuestLoginModuleTest.java
---
    @@ -23,22 +23,33 @@
     import javax.security.auth.login.LoginContext;
     import javax.security.auth.login.LoginException;
     import java.io.IOException;
    +import java.io.UnsupportedEncodingException;
     import java.net.URL;
    +import java.net.URLDecoder;
    +import java.nio.charset.StandardCharsets;
     
     import org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal;
     import org.apache.activemq.artemis.spi.core.security.jaas.UserPrincipal;
    +import org.jboss.logging.Logger;
     import org.junit.Assert;
     import org.junit.Test;
     
     public class GuestLoginModuleTest extends Assert {
     
    +   private static final Logger logger = Logger.getLogger(GuestLoginModuleTest.class);
    +
        static {
           String path = System.getProperty("java.security.auth.login.config");
           if (path == null) {
              URL resource = GuestLoginModuleTest.class.getClassLoader().getResource("login.config");
              if (resource != null) {
    -            path = resource.getFile();
    -            System.setProperty("java.security.auth.login.config", path);
    +            try {
    +               path = URLDecoder.decode(resource.getFile(), StandardCharsets.UTF_8.name());
    --- End diff --
    
    I'm just confused why you changed this, if this is just a test.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message