Fork me on GitHub
#clojure-russia
<
2016-09-18
>
andmed06:09:02

Привет всем. Джава версия

public static void main(String[] args) throws Exception {
        Path path = Paths.get("test.txt");
        Reader reader = Files.newBufferedReader(path);
    }
норм (файл не найден) а
(let [path (Paths/get "test.txt")
        reader (Files/newBufferedReader path)])
дает Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.net.URI, compiling:(/tmp/form-init6447706182627723560.clj:1:73)

andmed06:09:11

вызов метода с URI в Paths.get заоверложен к стрингу. почему кложа версия не видит метод со стрингом. чяднт?

andmed07:09:06

разобрался, varargs виноват