hyperspace icon indicating copy to clipboard operation
hyperspace copied to clipboard

LogIndexEntry's copy() doesn't copy its base class LogEntry

Open imback82 opened this issue 5 years ago • 1 comments

copy in withAppendedAndDeletedfiles doesn't copy state of LogEntry. So index.created failed before checking the len of appendedFiles and deletedFiles

Originally posted by @sezruby in https://github.com/microsoft/hyperspace/pull/228#r512334451

Basically LogIndexEntry is a case class, but extends an abstract class LogEntry. When copy is run on LogIndexEntry, it doesn't copy the fields of the base class (Scala behavior). Could this be a misleading behavior?

imback82 avatar Oct 27 '20 02:10 imback82

I think @pirz hit into this. @pirz Could you please chime in?

rapoth avatar Oct 29 '20 02:10 rapoth