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 https://github.com/openhab/openhab1-addons/commit/2a1b7e1f88eaf313fa7d48b36edce0ac97fcc491

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