#732 - NPE in ScalarTypeArrayList.read(ScalarTypeArrayList.java:89) ...

This commit is contained in:
Robin Bygrave
2016-06-03 08:09:04 +12:00
parent 1304646cce
commit 1a3acb86df
2 changed files with 26 additions and 1 deletions
@@ -0,0 +1,21 @@
package com.avaje.ebeaninternal.server.type;
import org.junit.Test;
import org.mockito.Mockito;
import java.sql.SQLException;
public class ScalarTypeArrayListTest {
@Test
public void read_when_null() throws SQLException {
DataReader mock = Mockito.mock(DataReader.class);
Mockito.when(mock.getArray()).thenReturn(null);
ScalarTypeArrayList scalarType = ScalarTypeArrayList.typeFor(Long.class);
scalarType.read(mock);
}
}