#vulnerable code 
                                public static List<String> readFileAsLines(File inItem) {
        BufferedReader in = null;
        List<String> lines = new ArrayList<>();
        try {
            in = new BufferedReader(
                    new FileReader(inItem)
            );
            String s = in.readLine();
            while (s != null) {
                lines.add(s);
                s = in.readLine();
            }
            in.close();
            return lines;
        } catch (IOException e) {
            logger.error("IOException when read  data from file : {}", e);
            return null;
        }
    } 
                            #location 15 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static List<String> readFileAsLines(File inItem) {
        String path = inItem.getPath();
        return readFileAsLines(path);
    }