From b3d23a62949e9210285c5b459a4701f45ab64e8c Mon Sep 17 00:00:00 2001 From: evanchooly Date: Mon, 13 May 2024 21:08:03 -0400 Subject: [PATCH] revert back to method reference --- core/src/main/java/dev/morphia/mapping/codec/Conversions.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/src/main/java/dev/morphia/mapping/codec/Conversions.java b/core/src/main/java/dev/morphia/mapping/codec/Conversions.java index a63fc10a3f5..4aa781e666e 100644 --- a/core/src/main/java/dev/morphia/mapping/codec/Conversions.java +++ b/core/src/main/java/dev/morphia/mapping/codec/Conversions.java @@ -96,9 +96,7 @@ private static void registerStringConversions() { throw new MappingException("Could not convert String to char: " + s); } }); - register(Class.class, String.class, aClass -> { - return aClass.getName(); - }); + register(Class.class, String.class, Class::getName); register(String.class, Class.class, className -> { try { return Thread.currentThread().getContextClassLoader().loadClass(className);