Author: ssmiweve Date: 2008-04-18 16:50:34 +0200 (Fri, 18 Apr 2008) New Revision: 6493
Modified: branches/2.17/ branches/2.17/war/src/main/java/no/sesat/search/http/filters/UserFilter.java Log: Merged revisions 6485-6492 via svnmerge from http://sesat.no/svn/sesat-kernel/branches/2.16 ........ r6492 | ssmiweve | 2008-04-18 16:42:38 +0200 (Fri, 18 Apr 2008) | 2 lines SEARCH-4646 - sesam.se:9002 does not work with curl/wget ........ Property changes on: branches/2.17 ___________________________________________________________________ Name: svnmerge-integrated - /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6484 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 + /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6492 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 Modified: branches/2.17/war/src/main/java/no/sesat/search/http/filters/UserFilter.java =================================================================== --- branches/2.17/war/src/main/java/no/sesat/search/http/filters/UserFilter.java 2008-04-18 14:42:38 UTC (rev 6492) +++ branches/2.17/war/src/main/java/no/sesat/search/http/filters/UserFilter.java 2008-04-18 14:50:34 UTC (rev 6493) @@ -280,20 +280,23 @@ LOG.debug("Url: " + url); LOG.debug("JndiName: " + jndi); + + if( null != url && null != jndi ){ - final Properties properties = new Properties(); - properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); - properties.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); - properties.put("java.naming.provider.url", url); + final Properties properties = new Properties(); + properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); + properties.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); + properties.put("java.naming.provider.url", url); - try { - return (BasicUserService) new InitialContext(properties).lookup(jndi); + try { + return (BasicUserService) new InitialContext(properties).lookup(jndi); - } catch (final NamingException ne) { - // acceptable for sesat not to have to have a user service backend - LOG.debug(ne.getMessage(), ne); - return null; + } catch (final NamingException ne) { + // acceptable for sesat not to have to have a user service backend + LOG.debug(ne.getMessage(), ne); + } } + return null; } } _______________________________________________ Kernel-commits mailing list [email protected] http://sesat.no/mailman/listinfo/kernel-commits
