Skip to content

Commit 090f898

Browse files
gab1onectrueden
authored andcommitted
DataHandleTest: expose internal API to subclasses
The SciJava coding style strongly encourages private over protected methods and fields: https://imagej.net/Coding_style#Private_over_protected_fields_and_methods However, for test scope things, the impact is less, and the promise of API compatibility in the future according to SemVer does not exist. So we are less concerned about breakages. Signed-off-by: Curtis Rueden <[email protected]>
1 parent 8532e82 commit 090f898

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/org/scijava/io/handle/DataHandleTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
*/
5454
public abstract class DataHandleTest {
5555

56-
private static final byte[] BYTES = { //
56+
protected static final byte[] BYTES = { //
5757
'H', 'e', 'l', 'l', 'o', ',', ' ', 'w', 'o', 'r', 'l', 'd', '\n', //
5858
9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, -128, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, //
5959
125, 127, -127, -125, -3, -2, -1 };
@@ -208,9 +208,9 @@ protected <L extends Location> void checkWrites(final DataHandle<L> handle)
208208
}
209209
}
210210

211-
// -- Helper methods --
211+
// -- Internal methods --
212212

213-
private void assertBytesMatch(final int offset, final int length,
213+
protected void assertBytesMatch(final int offset, final int length,
214214
final byte[] b)
215215
{
216216
assertEquals(length, b.length);
@@ -219,7 +219,7 @@ private void assertBytesMatch(final int offset, final int length,
219219
}
220220
}
221221

222-
private String msg(final int i) {
222+
protected String msg(final int i) {
223223
return "[" + i + "]:";
224224
}
225225

0 commit comments

Comments
 (0)