Skip to content
Snippets Groups Projects
Commit 01d5185f authored by Vojtěch Moravec's avatar Vojtěch Moravec
Browse files

Make BasicLoader::valueAt() non pure virtual.

Also in base implementation `assert(false)`, so that it is not used.
This protect us at least when -ea is provided to VM.
parent e11818e2
Branches
Tags
No related merge requests found
...@@ -22,7 +22,10 @@ public abstract class BasicLoader { ...@@ -22,7 +22,10 @@ public abstract class BasicLoader {
*/ */
public abstract int[] loadPlaneData(final int plane) throws IOException; public abstract int[] loadPlaneData(final int plane) throws IOException;
protected abstract int valueAt(final int plane, final int offset); protected int valueAt(final int plane, final int offset) {
assert (false) : "Unimplemented overload of BasicLoader::valueAt()";
return Integer.MIN_VALUE;
}
/** /**
......
...@@ -47,12 +47,6 @@ public final class RawDataLoader extends BasicLoader implements IPlaneLoader { ...@@ -47,12 +47,6 @@ public final class RawDataLoader extends BasicLoader implements IPlaneLoader {
return TypeConverter.unsignedShortBytesToIntArray(buffer); return TypeConverter.unsignedShortBytesToIntArray(buffer);
} }
@Override
protected int valueAt(int plane, int offset) {
// TODO: Implement me!
return 0;
}
@Override @Override
public int[] loadPlanesU16Data(int[] planes) throws IOException { public int[] loadPlanesU16Data(int[] planes) throws IOException {
if (planes.length < 1) { if (planes.length < 1) {
......
...@@ -40,12 +40,6 @@ public final class SCIFIOLoader extends BasicLoader implements IPlaneLoader { ...@@ -40,12 +40,6 @@ public final class SCIFIOLoader extends BasicLoader implements IPlaneLoader {
return TypeConverter.unsignedShortBytesToIntArray(planeBytes); return TypeConverter.unsignedShortBytesToIntArray(planeBytes);
} }
@Override
protected int valueAt(int plane, int offset) {
// TODO: Implement me!
return 0;
}
@Override @Override
public int[] loadPlanesU16Data(int[] planes) throws IOException { public int[] loadPlanesU16Data(int[] planes) throws IOException {
if (planes.length < 1) { if (planes.length < 1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment