Actually, split/join does not work with JDK7. The following code seems to work 
with both:

name = name.split(".").join("/");
if (name) {
  self.log("Use JDK8 method to build module names");
} else {
  name = attributes.get("name");
  name = name.replace(".", "/");
  self.log("Use JDK7 method to build module names");
}

Cheers,

On 07 Feb 2014, at 15:27, Galder Zamarreño <[email protected]> wrote:

> Hi,
> 
> In JDK8, [1] causes issues, since the replace only happens the first time the 
> character is found.
> 
> We use this lib.xml in Infinispan as well [2]. I’ve workaround it by doing 
> this instead:
> 
> name = name.split(".").join("/");
> 
> This seems to work fine, but have not fully tested it.
> 
> Cheers,
> 
> [1] https://github.com/wildfly/wildfly/blob/master/build/lib.xml#L75
> [2] 
> https://issues.jboss.org/browse/ISPN-3974?focusedCommentId=12942643&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12942643
> --
> Galder Zamarreño
> [email protected]
> twitter.com/galderz
> 
> Project Lead, Escalante
> http://escalante.io
> 
> Engineer, Infinispan
> http://infinispan.org
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


--
Galder Zamarreño
[email protected]
twitter.com/galderz

Project Lead, Escalante
http://escalante.io

Engineer, Infinispan
http://infinispan.org


_______________________________________________
infinispan-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to