From b81a45870d9395c62e1f4f8228ab2b49f1d1f167 Mon Sep 17 00:00:00 2001 From: verbeto Date: Thu, 26 Feb 2015 09:01:04 -0500 Subject: [PATCH] Make fromAnyRef return a ConfigValue unmodified instead of throwing --- config/src/main/java/com/typesafe/config/impl/ConfigImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java b/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java index 22167731..973a4aa3 100644 --- a/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java +++ b/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java @@ -216,6 +216,8 @@ public class ConfigImpl { return new ConfigNull(origin); else return defaultNullValue; + } else if(object instanceof AbstractConfigValue) { + return (AbstractConfigValue) object; } else if (object instanceof Boolean) { if (origin != defaultValueOrigin) { return new ConfigBoolean(origin, (Boolean) object);