1 Reply Latest reply on Jun 12, 2008 11:38 AM by Ales Justin

    PathTokenizer again

    Adrian Brock Master

      When looking at a JBossAS bootstrap, I'm seeing a few of these
      when I do random thread dumps.

      "main" prio=1 tid=0x09547230 nid=0x16f1 runnable [0x805db000..0x805dce30]
       at java.lang.System.arraycopy(Native Method)
       at java.util.ArrayList.toArray(ArrayList.java:304)
       at org.jboss.virtual.plugins.vfs.helpers.PathTokenizer.getTokens(PathTokenizer.java:145)
       at org.jboss.virtual.plugins.context.AbstractVirtualFileHandler.structuredFindChild(AbstractVirtualFileHandler.java:413)
       at org.jboss.virtual.plugins.context.zip.ZipEntryHandler.getChild(ZipEntryHandler.java:134)
       at org.jboss.virtual.plugins.context.DelegatingHandler.getChild(DelegatingHandler.java:101)
       at org.jboss.virtual.VirtualFile.getChild(VirtualFile.java:405)
      


      Since PathTokenizer is only used internally, is there any reason why it can't
      just return the
      List<String>
      instead of copying arrays all over the
      place?