Source:
public Question map(int index, ResultSet r, StatementContext ctx) throws SQLException { final Integer[] response_ids = (Integer []) r.getArray("responses_ids").getArray(); final String[] response_text = (String []) r.getArray("responses").getArray(); final Integer question_id = r.getInt("id"); final List<Choice> choices = new ArrayList<>(); for (int i = 0; i < response_ids.length; i++) { choices.add(new Choice(response_ids[i], response_text[i], question_id)); } final Integer[] dependencyResponseIds = (Integer []) r.getArray("dependency_response").getArray(); final List<Integer> dependencyResponse = Lists.newArrayList(); for (Integer responseId : dependencyResponseIds) { dependencyResponse.add(responseId); } DateTime createdLocal; try { int foundCreatedLocal = r.findColumn("created_local_utc_ts"); createdLocal = new DateTime(r.getTimestamp("created_local_utc_ts"), DateTimeZone.UTC); } catch (SQLException error) { createdLocal = DateTime.now(DateTimeZone.UTC); } Long accountQuestionId = 0L; final Question question = new Question(question_id, accountQuestionId, r.getString("question_text"), r.getString("lang"), Question.Type.fromString(r.getString("response_type")), Question.FREQUENCY.fromString(r.getString("frequency")), Question.ASK_TIME.fromString(r.getString("ask_time")), r.getInt("dependency"), r.getInt("parent_id"), createdLocal, choices, AccountInfo.Type.fromString(r.getString("account_info")), createdLocal, QuestionCategory.fromString(r.getString("category")), dependencyResponse ); return question; }

Target:
public Question map(int index, ResultSet r, StatementContext ctx) throws SQLException { final Integer[] response_ids = (Integer []) r.getArray("responses_ids").getArray(); final String[] response_text = (String []) r.getArray("responses").getArray(); final Integer question_id = r.getInt("id"); final List<Choice> choices = new ArrayList<>(); for (int i = 0; i < response_ids.length; i++) { choices.add(new Choice(response_ids[i], response_text[i], question_id)); } final List<Integer> dependencyResponse = Lists.newArrayList(); final String dependencyResponseString = r.getString("dependency_response"); if (dependencyResponseString != null) { final Integer[] dependencyResponseIds; dependencyResponseIds = (Integer []) r.getArray("dependency_response").getArray(); for (final Integer responseId : dependencyResponseIds) { dependencyResponse.add(responseId); } } DateTime createdLocal; try { int foundCreatedLocal = r.findColumn("created_local_utc_ts"); createdLocal = new DateTime(r.getTimestamp("created_local_utc_ts"), DateTimeZone.UTC); } catch (SQLException error) { createdLocal = DateTime.now(DateTimeZone.UTC); } Long accountQuestionId = 0L; final Question question = new Question(question_id, accountQuestionId, r.getString("question_text"), r.getString("lang"), Question.Type.fromString(r.getString("response_type")), Question.FREQUENCY.fromString(r.getString("frequency")), Question.ASK_TIME.fromString(r.getString("ask_time")), r.getInt("dependency"), r.getInt("parent_id"), createdLocal, choices, AccountInfo.Type.fromString(r.getString("account_info")), createdLocal, QuestionCategory.fromString(r.getString("category")), dependencyResponse ); return question; }