Skip to content

Commit

Permalink
make IParsingError interface public
Browse files Browse the repository at this point in the history
  • Loading branch information
Luncher91 committed Mar 8, 2023
1 parent 868ceb8 commit dd030cd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<artifactId>intelhex</artifactId>
<name>Intel Hex Parser</name>
<groupId>net.alenzen.intelHex</groupId>
<version>0.0.5-SNAPSHOT-jdk${java.version}</version>
<version>0.0.6-SNAPSHOT-jdk${java.version}</version>
<packaging>jar</packaging>
<description>Library to read and modify Intel Hex Files</description>
<url>https://github.com/Luncher91/IntelHex/</url>
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/net/alenzen/intelHex/HexFileLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import java.io.OutputStream;
import java.nio.charset.Charset;

import net.alenzen.intelHex.IntelHexFile.IParsingError;

public class HexFileLine {
public static final int ADDRESS_MAX = 0xFFFF;
private long lineNumber;
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/net/alenzen/intelHex/IParsingError.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package net.alenzen.intelHex;

public interface IParsingError {
public static final IParsingError VOID = (a, b, c) -> {
};

void log(long lineNumber, String line, String message);
}
7 changes: 0 additions & 7 deletions src/main/java/net/alenzen/intelHex/IntelHexFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ public static IntelHexFile parse(InputStream s, IParsingError log) throws IOExce
return parse(new InputStreamReader(s), log);
}

interface IParsingError {
public static final IParsingError VOID = (a, b, c) -> {
};

void log(long lineNumber, String line, String message);
}

public static IntelHexFile parse(Reader fileStream, IParsingError log) throws IOException, InvalidFormatException {
if (log == null) {
log = IParsingError.VOID;
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/net/alenzen/intelHex/HexFileLineTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

import org.junit.jupiter.api.Test;

import net.alenzen.intelHex.IntelHexFile.IParsingError;

public class HexFileLineTest {
private static final IParsingError FAIL_ON_TRIGGER = (i, line, m) -> fail(i + ": " + m);

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/net/alenzen/intelHex/IntelHexFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import org.junit.jupiter.params.provider.EnumSource;
import org.junit.jupiter.params.provider.ValueSource;

import net.alenzen.intelHex.IntelHexFile.IParsingError;

public class IntelHexFileTest {
private static final IParsingError FAIL_ON_TRIGGER = (i, line, m) -> fail(i + ": " + m);

Expand Down

0 comments on commit dd030cd

Please sign in to comment.