-
Notifications
You must be signed in to change notification settings - Fork 157
Reasons to drop to Java 8 support
Could obviate the need for having our own InputOutputBuffer class? https://github.com/LinuxForHealth/FHIR/pull/2088
We wouldn't need to do our own compare impl for our tests: https://github.com/LinuxForHealth/FHIR/pull/2088/files#diff-a672a3278cc153609a36fab54622ae08c4550b6f8a95580f90663af0bb12e7bcR53-R54
https://github.com/ben-manes/caffeine/releases/tag/v3.0.0
https://db.apache.org/derby/derby_downloads.html#For+Java+9+and+Higher
This one is pretty minor, but sometimes the method predicate reference form seems to be preferred and this would let us use that when we actually need the inverse: https://stackoverflow.com/a/51439995/161022
Java 9 supports newDefaultInstance to create a TransformerFactory using the JVM default implementation. This is preferred to using the class name directly. See: https://github.com/LinuxForHealth/FHIR/issues/1226
Java 9 supports newDefaultFactory to create an XMLInputFactory (or XMLOutputFactory) using the JVM default implementation. This is preferred to using the class name(s) directly.
See also https://github.com/LinuxForHealth/FHIR/issues/2266
Java 9 is required when using Caffeine 3.x and above. We are currently using a back level 2.x version.
Java 9 introduces a nice way to statically initialize maps and sets:
Map.of("key1","value1", "key2", "value2")
(up to 10 key-value pairs) or
Map.ofEntries(List<Entry>)
More info at baeldung.com/java-initialize-hashmap#2-mapofentries
Set.of("Apple", "Ball", "Cat", "Dog");
More info at https://stackoverflow.com/questions/2041778/how-to-initialize-hashset-values-by-construction/37406054#37406054
Starting with Java 10, we can use the toUnmodifiableList method from Java's Collectors class:
List<String> givenList = Arrays.asList("a", "b", "c");
List<String> result = givenList.stream()
.collect(toUnmodifiableList());
FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.
IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on ibm.com/trademark.