Fork me on GitHub
#clj-yaml
<
2023-08-14
>
Ingy döt Net03:08:47

I'm trying to call https://bitbucket.org/snakeyaml/snakeyaml/src/180363cfff5c9334bdd21b0d38145fa56ceed91c/src/main/java/org/yaml/snakeyaml/events/Event.java#lines-54:56 with (. (. event getStartMark) getLine) and getting No matching field found: getLine for class java.util.Optional any idea why?

Ingy döt Net03:08:50

getStartMark should return a Mark instance

Ingy döt Net03:08:38

I want the int line number

Ingy döt Net03:08:17

I don't yet see where things are defined optional

borkdude10:08:59

an optional has the .orElse method to get the value out, or a default value if the optional doesn't have a value

borkdude10:08:34

the way to do this in clojure would probably be:

(some-> (.getStartMark event) (.orElse nil) (.getLine))