Skip to content

Commit

Permalink
(Revert) Java: MLPDataFile: Closeable fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Roffild committed Aug 2, 2019
1 parent 837cdd9 commit 9c17fa8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import roffild.mqlport.Pointer;

import java.io.Closeable;
import java.io.IOException;

import static roffild.mqlport.MqlLibrary.*;

public class MLPDataFile implements Closeable
Expand Down Expand Up @@ -175,7 +173,7 @@ public void flush()
}

@Override
public void close() throws IOException
public void close()
{
if (handleFile != INVALID_HANDLE) {
FileClose(handleFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import roffild.mqlport.MqlArray;
import roffild.mqlport.Pointer;

import java.io.IOException;

import static roffild.mqlport.MqlLibrary.INVALID_HANDLE;

@FixMethodOrder(MethodSorters.NAME_ASCENDING)
Expand All @@ -36,7 +34,7 @@ public class MLPDataFileTest
static double data[][] = new double[50][35];

@Test
public void test01_Write() throws IOException
public void test01_Write()
{
for (int x = 0; x < 35; x++) {
header[x] = "col" + Integer.toString(x);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String[] args) throws IOException
}

private static void writeFile(String pathspark, Dataset<Row> data,
Pointer<Integer> nin, Pointer<Integer> nout) throws IOException
Pointer<Integer> nin, Pointer<Integer> nout)
{
try (MLPDataFile mlpfile = new MLPDataFile()) {
mlpfile.initWrite0(pathspark, nin.value, nout.value, data.columns());
Expand Down

0 comments on commit 9c17fa8

Please sign in to comment.