Skip to content

Conversation

@quintinali
Copy link
Contributor

Fixed bugs in TrainingImporter.java

  1. Use try-with-resources to create "BufferedReader"
  2. Store the value returned from "readLine" instead of throwing it away.

1. Use try-with-resources to create "BufferedReader"
2. Store the value returned from "readLine" instead of throwing it away.
@asfgit
Copy link

asfgit commented May 21, 2018

Can one of the admins verify this patch?

try (BufferedReader br = new BufferedReader(new FileReader(file.getAbsolutePath()))) {
String line = null;
line = br.readLine(); // cvs header
while ((line = br.readLine()) != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested this code? It look suspicious.

import org.apache.sdap.mudrod.driver.ESDriver;
import org.apache.sdap.mudrod.driver.SparkDriver;
import org.apache.sdap.mudrod.main.MudrodConstants;
import org.apache.sdap.mudrod.main.MudrodEngine;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this import

Copy link
Member

@lewismc lewismc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants