Source:
<code>public JdbcRecordCursor(JdbcClient jdbcClient, JdbcSplit split, List<JdbcColumnHandle> columnHandles) { <START> this.columnHandles = requireNonNull(columnHandles, "columnHandles is null").stream() <END> .toArray(JdbcColumnHandle[]::new); booleanReadFunctions = new BooleanReadFunction[this.columnHandles.length]; doubleReadFunctions = new DoubleReadFunction[this.columnHandles.length]; longReadFunctions = new LongReadFunction[this.columnHandles.length]; sliceReadFunctions = new SliceReadFunction[this.columnHandles.length]; for (int i = 0; i < this.columnHandles.length; i++) { ReadMapping readMapping = jdbcClient.toPrestoType(this.columnHandles[i].getJdbcTypeHandle()) .orElseThrow(() -> new IllegalStateException("Unsupported column type")); Class<?> javaType = readMapping.getType().getJavaType(); ReadFunction readFunction = readMapping.getReadFunction(); if (javaType == boolean.class) { booleanReadFunctions[i] = (BooleanReadFunction) readFunction; } else if (javaType == double.class) { doubleReadFunctions[i] = (DoubleReadFunction) readFunction; } else if (javaType == long.class) { longReadFunctions[i] = (LongReadFunction) readFunction; } else if (javaType == Slice.class) { sliceReadFunctions[i] = (SliceReadFunction) readFunction; } else { throw new IllegalStateException(format("Unsupported java type %s", javaType)); } } try { connection = jdbcClient.getConnection(split); statement = jdbcClient.buildSql(connection, split, columnHandles); log.debug("Executing: %s", statement.toString()); resultSet = statement.executeQuery(); } catch (SQLException | RuntimeException e) { throw handleSqlException(e); } }</code><technical_language>I bother null check here, access throw immediately, checks for other parameters</technical_language>

Target:
public JdbcRecordCursor(JdbcClient jdbcClient, JdbcSplit split, List<JdbcColumnHandle> columnHandles) { this.columnHandles = columnHandles.toArray(new JdbcColumnHandle[0]); booleanReadFunctions = new BooleanReadFunction[columnHandles.size()]; doubleReadFunctions = new DoubleReadFunction[columnHandles.size()]; longReadFunctions = new LongReadFunction[columnHandles.size()]; sliceReadFunctions = new SliceReadFunction[columnHandles.size()]; for (int i = 0; i < this.columnHandles.length; i++) { ReadMapping readMapping = jdbcClient.toPrestoType(columnHandles.get(i).getJdbcTypeHandle()) .orElseThrow(() -> new VerifyException("Unsupported column type")); Class<?> javaType = readMapping.getType().getJavaType(); ReadFunction readFunction = readMapping.getReadFunction(); if (javaType == boolean.class) { booleanReadFunctions[i] = (BooleanReadFunction) readFunction; } else if (javaType == double.class) { doubleReadFunctions[i] = (DoubleReadFunction) readFunction; } else if (javaType == long.class) { longReadFunctions[i] = (LongReadFunction) readFunction; } else if (javaType == Slice.class) { sliceReadFunctions[i] = (SliceReadFunction) readFunction; } else { throw new IllegalStateException(format("Unsupported java type %s", javaType)); } } try { connection = jdbcClient.getConnection(split); statement = jdbcClient.buildSql(connection, split, columnHandles); log.debug("Executing: %s", statement.toString()); resultSet = statement.executeQuery(); } catch (SQLException | RuntimeException e) { throw handleSqlException(e); } }