Alternative to the 9 lines: var file = Path.of(fileName); return Files.readAllLines(file); Won't this mostly create "legacy" code because most code is "legacy" (i.e. not using current features and APIs)?
Alternative to the 9 lines: var file = Path.of(fileName); return Files.readAllLines(file); Won't this mostly create "legacy" code because most code is "legacy" (i.e. not using current features and APIs)?
@nipafx With static import - return readAllLines(of(file));
@nipafx Those 9 LOC is actually a sign that copilot learned from very old code that people have not upgraded for years and years. I feel like it’s better to make Copilot to learn new (if we can cal them so) Java practices rather than learning from legacy code.
@nipafx I would assume that readCSV method includes tokenisation, not just reading lines.
@nipafx Seems like Copilot will use Java 6 for very very long time period
@nipafx The legacy will work with a huge file, the new function depends on your resources