[jboss-dev-forums] [Design of POJO Server] - Re: BSH script from client

adrian@jboss.org do-not-reply at jboss.com
Thu Nov 15 06:06:53 EST 2007


"dimitris at jboss.org" wrote : I did a quick test with the added '.bsh' suffix in the FileStructure deployer but it didn't work.
  | 
  | Do we actually recurse inside a deployment, or look only in the root? Is this controlled somewhere?

That's because the FileStructure algorithm is broken. ;-)
It expects a - in the file name.


  |    public static boolean isKnownFile(String name)
  |    {
  |       if (name == null)
  |          throw new IllegalArgumentException("Null name");
  |       
  |       int index = name.lastIndexOf('-');
  |       if (index == -1)
  |          return false;
  |       String suffix = name.substring(index);
  |       return fileSuffixes.contains(suffix);
  |    }
  | 

It should be interating over fileSuffixes and using endsWith().

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104939#4104939

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104939



More information about the jboss-dev-forums mailing list