hi,

CompoundFileReader class contains some code where i can't follow the idea behind it. Maybe somebody else can switch on the light for me, so i can see the track. There are 2 public methods which definitly don't work as expected. I know, extending Directory forces one to implement the methods, but in that particular, case the implementation is just confusing me and my be other people too.

   public long fileModified(String name) throws IOException {
       return directory.fileModified(fileName);
   }

   public void touchFile(String name) throws IOException {
       directory.touchFile(fileName);
   }

Looking at the implementation, both methods are working on the compound filename itself, regardless what the filename passed in has as it's value. It would be much more understandable, if these methods throw some UnsupportedOperationException. The other way is to to change them in a way, that the underlaying directory method calls will get the real filename passed in and not the compound filename itself.

just a thought ;-)

bernhard



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to