Using Java 8 APIs for OpenHAB 1 add-on development

I’d like to know if it is OK to use Java 8 APIs like Optional and Function in OpenHAB 1 add-ons like the FritzBoxTR064 binding I am currently working on. The coding guidelines say that the code must be compatible with Java 7, but issue #2926 discusses switching to Java 8 and Kai already changed the compiler source and target to 1.8 in

1 Like

I’d like to see an answer to that also. 8’s been out a long time now.

New bindings should be developed for OH2 :slight_smile: As far as I know, the target platform for OH1 bindings will not be updated anymore (no new dependencies, no new java versions). But java 1.8 is indeed supported and the coding guidelines should reflect this and should be updated.

Cheers, David