I have a class that occasionally gets passed null
for File
objects. During normal operation it uses a Scanner
class to parse through the file.
Instead of littering my code with null
checks against the File
objects, I thought I could replace the File
s with nullobjects (Gang of Four style).
However, it looks like File
isn't really designed to be extended. Does any one have any pointers on how to do this?