java class to read csv files
I tend to advocate not passing things around which need to be closed, thus my advice is:


inline the read method
remove the reader field, and
... declare the same as a local variable
perferably, declare that local reader variable in a try-with-resources block and throw out the explicit close()-call


Note that these changes are just about robustness and maintainability and will not affect performance or error handling.

Edit, after the comment asking for code edit. (Note: sorry, I am a newbie in the code review community, I hope this does not break any principle here.)

public class FileReader {

    private String path;
    private List&lt;String&gt; linesList;
    private Set&lt;List&lt;String&gt;&gt; splitLinesSet;

    public FileReader(String path) {
        this.path = path;
    }

    public boolean readFile() {

        this.splitLinesSet = new HashSet&lt;&gt;();
        File file = Paths.get(path).toFile();

        try (
            CSVReader reader = new CSVReaderBuilder(new java.io.FileReader(file))
                    .withCSVParser(new CSVParserBuilder()
                            .withSeparator('|')
                            .withFieldAsNull(CSVReaderNullFieldIndicator.NEITHER).build())
                    .build();
            ) {
            String[] lines;
            while ((lines = reader.readNext()) != null) {
                linesList = new ArrayList&lt;&gt;();
                Collections.addAll(linesList, lines);
                splitLinesSet.add(linesList);
            }
        } catch (IOException e) {
            System.err.println("Error in reading CSV: " + e.getMessage());
            return false;
        }

        return true;
    }

    public Set&lt;List&lt;String&gt;&gt; getSplitLinesSet() {
        return splitLinesSet;
    }
}


Note: this was just syntactic shuffling of lines in a text editor - I have not put this through an IDE or a compiler, but I think it shows the principles.