bergie/noflo — pull request #19 by rybesh (2012-04-01 06:46:23+00:00)
Title: Do not initalize port groups in Component

Initializing `inPorts` and `outPorts` in the base `Component` class is dangerous, because all components will then share the same `inPorts` and `outPorts` groups, unless they explicitly create new objects to initialize these in their constructors. If they simply assign to the existing objects (as was being done in ReadFile), those assignments will affect **all** components, and components may end up with spurious ports being created for them. Better to force components to initialize these themselves.

Note that this bug affected the two components I submitted pull requests for earlier (ReadDir and Stat), so this pull request also includes those two.