Date: 01/28/16 (Code WTF) Keywords: java
Даже не знаю, нужны ли здесь комментарии. Java.
Object obj = list.next(); try { fileName = (String) obj; } catch (Exception e) { File file = (File) obj; fileName = file.getAbsolutePath(); }
Source: http://code-wtf.livejournal.com/222788.html