Colby-CPU-Sim / CPUSim

GNU General Public License v3.0
52 stars 18 forks source link

Fix IOChannel usage to stop relying on `instanceof` #95

Open Nava2 opened 7 years ago

Nava2 commented 7 years ago

This needs to be fixed:

if ((channel instanceof FileChannel) &&
                                    ((IO) ios.get(i)).getDirection().equals("output")) {
                                ((FileChannel) channel).writeToFile();
                            }