Вывод в консоль корректный, почему валидатор не пропускает?
package com.javarush.task.task19.task1904;
import java.io.File;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;
/*
И еще один адаптер
*/ //C:\tmp\price.txt
public class Solution {
public static void main(String[] args) throws Exception {
File file = new File("C:\\tmp\\price.txt");
Scanner scanner = new Scanner(file);
PersonScannerAdapter personScannerAdapter = new PersonScannerAdapter(scanner);
System.out.println(personScannerAdapter.read());
}
public static class PersonScannerAdapter implements PersonScanner {
private Scanner fileScanner;
public PersonScannerAdapter(Scanner scanner) {
fileScanner = scanner;
}
@Override
public Person read() throws IOException {
String[] temp = fileScanner.nextLine().split(" ");
try {
return new Person(temp[1], temp[2], temp[0], new SimpleDateFormat().parse(temp[3] + "." + temp[4] + "." + temp[5] + ", 0:00"));//new Date(Integer.parseInt(temp[5]), Integer.parseInt(temp[4]), Integer.parseInt(temp[3])));
} catch (ParseException e) {
System.out.println(e);
return null;
}
}
@Override
public void close() throws IOException {
fileScanner.close();
}
}
}