Project

General

Profile

Actions

Bug #6233

closed

DirectoryListing NPE

Added by Daniel Crawl about 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
actors
Target version:
Start date:
11/20/2013
Due date:
% Done:

100%

Estimated time:
Spent time:
Bugzilla-Id:

Description

The DirectoryListing actor has an NPE:

java.lang.NullPointerException
at ptolemy.util.RecursiveFileFilter.accept(RecursiveFileFilter.java:141)
at java.io.File.list(File.java:1027)
at ptolemy.util.RecursiveFileFilter.listFiles(RecursiveFileFilter.java:252)
at ptolemy.actor.lib.io.DirectoryListing.fire(DirectoryListing.java:270)
at ptolemy.actor.AtomicActor.iterate(AtomicActor.java:465)

I'm attaching an example model that demonstrates the problem in Vergil.


Files

dirlist-npe.xml (3.06 KB) dirlist-npe.xml Daniel Crawl, 11/20/2013 05:17 PM
Actions #1

Updated by Christopher Brooks about 11 years ago

  • Assignee changed from Derik Barseghian to Daniel Crawl
  • % Done changed from 0 to 90

I fixed this in ptII r 67905 and updated kepler/ptolemy/module-info/revision.txt.

Daniel, could you review this and close it if you think it is fixed?

Actions #2

Updated by Daniel Crawl about 11 years ago

The NPE is gone, but an empty pattern should match everything instead of generating an exception:

/** If non-empty, then only output file and directory names that
 *  match the specified (regular expression) pattern.
 *  The default value of this parameter is the empty String "",
 *  which indicates that everything matches.
*/
public StringParameter pattern;
Actions #3

Updated by Christopher Brooks about 11 years ago

The RecursiveFilter class is a combination of two separate classes.

I think I have this fixed, please take a look.

Actions #4

Updated by Daniel Crawl about 11 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

Looks good. Thanks, Christopher.

Actions

Also available in: Atom PDF