Skip to content

Commit

Permalink
Log when a polyfill is used
Browse files Browse the repository at this point in the history
  • Loading branch information
prdoyle committed Jan 17, 2024
1 parent 66f6aa1 commit 5944b16
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bosk-core/src/main/java/io/vena/bosk/SerializationPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import java.util.concurrent.ConcurrentHashMap;
import lombok.EqualsAndHashCode;
import lombok.Value;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static io.vena.bosk.ReferenceUtils.parameterType;
import static io.vena.bosk.ReferenceUtils.rawClass;
Expand Down Expand Up @@ -217,6 +219,7 @@ public final List<Object> parameterValueList(Class<?> nodeClass, Map<String, Obj
}
}
} else if (implicitReference == null) {
LOGGER.info("{} used polyfill value for {}.{}", getClass().getSimpleName(), nodeClass.getSimpleName(), name);
parameterValues.add(value);
} else {
throw new DeserializationException("Unexpected field \"" + name + "\" for implicit reference");
Expand Down Expand Up @@ -354,4 +357,5 @@ private record ParameterInfo(

private static final Map<Class<?>, ParameterInfo> PARAMETER_INFO_MAP = new ConcurrentHashMap<>();

private static final Logger LOGGER = LoggerFactory.getLogger(SerializationPlugin.class);
}

0 comments on commit 5944b16

Please sign in to comment.