Не могу найти главную ошибку. Помогите, пожалуйста
package com.javarush.task.task15.task1522;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Закрепляем паттерн Singleton
*/
public class Solution {
public static void main(String[] args) {
}
public static Planet thePlanet;
//add static block here - добавьте статический блок тут
static {
readKeyFromConsoleAndInitPlanet();
}
public static void readKeyFromConsoleAndInitPlanet() {
// implement step #5 here - реализуйте задание №5 тут
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try{
if (reader.readLine()== null)
thePlanet = null;
else if (Planet.MOON.equals(reader.readLine()))
thePlanet = Moon.getInstance();
else if (Planet.SUN.equals(reader.readLine()))
thePlanet = Sun.getInstance();
else if (Planet.EARTH.equals(reader.readLine()))
thePlanet = Earth.getInstance();
else
thePlanet = null;
}
catch (IOException ignored){
}
}
}