package uk.ac.ic.wlgitbridge.writelatex;

import uk.ac.ic.wlgitbridge.bridge.RawFile;

/**
 * Created by Winston on 21/02/15.
 */
public class ServletFile extends RawFile {

    private final RawFile file;
    private final boolean changed;

    public ServletFile(RawFile file, RawFile oldFile) {
        this.file = file;
        changed = equals(oldFile);
    }

    @Override
    public String getPath() {
        return file.getPath();
    }

    @Override
    public byte[] getContents() {
        return file.getContents();
    }

    public boolean isChanged() {
        return changed;
    }

}

@@ -195,24 +195,59 @@
 wFile file;%0A
+    private final RawFile oldFile;%0A
     private 
@@ -348,24 +348,56 @@
 ile = file;%0A
+        this.oldFile = oldFile;%0A
         chan
@@ -402,16 +402,17 @@
 anged = 
+!
 equals(o

Fix equals bug in ServletFile diff.