Redis (redis) wrote in code_wtf,
Redis
redis
code_wtf

Слегка кастомный instanceof

Даже не знаю, нужны ли здесь комментарии. Java.

            Object obj = list.next();
            try {
                fileName = (String) obj;
            } catch (Exception e) {
                File file = (File) obj;
                fileName = file.getAbsolutePath();
            }
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 8 comments