Catch and protect against when getHReturn() passes null to avoid NPE

This commit is contained in:
Faiz Khan 2015-02-04 08:02:42 -06:00
parent 8985f6374a
commit a7e6bf65d0
2 changed files with 2 additions and 1 deletions

View File

@ -43,6 +43,8 @@ public class ProgramResult {
}
public ByteBuffer getHReturn() {
if (hReturn == null)
this.setHReturn(new byte[] {});
return hReturn;
}

View File

@ -44,7 +44,6 @@ public class GitHubStateTest {
public void stInitCodeTest() throws ParseException { // [V]
Set<String> excluded = new HashSet<>();
excluded.add("CallContractToCreateContractWhichWouldCreateContractInInitCode");
String json = JSONReader.loadJSON("StateTests/stInitCodeTest.json");
GitHubJSONTestSuite.runGitHubJsonStateTest(json, excluded);