From a840c2599dae212510b787dcb88a484063958e26 Mon Sep 17 00:00:00 2001 From: Havoc Pennington <hp@pobox.com> Date: Tue, 29 Nov 2011 08:44:07 -0500 Subject: [PATCH] Rename getMemorySizeInBytesList to getBytesList to match getBytes --- config/src/main/java/com/typesafe/config/Config.java | 6 +++--- .../main/java/com/typesafe/config/impl/SimpleConfig.java | 2 +- .../test/scala/com/typesafe/config/impl/ConfigTest.scala | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/src/main/java/com/typesafe/config/Config.java b/config/src/main/java/com/typesafe/config/Config.java index 0d83504f..64bc742b 100644 --- a/config/src/main/java/com/typesafe/config/Config.java +++ b/config/src/main/java/com/typesafe/config/Config.java @@ -163,11 +163,11 @@ public interface Config extends ConfigMergeable { * with your module. It's best to allow the modules owning those paths to * validate them. Also, if every module validates only its own stuff, there * isn't as much redundant work being done. - * + * * <p> * If no paths are specified in <code>checkValid()</code>'s parameter list, * validation is for the entire config. - * + * * <p> * If you specify paths that are not in the reference config, those paths * are ignored. (There's nothing to validate.) @@ -465,7 +465,7 @@ public interface Config extends ConfigMergeable { List<? extends Object> getAnyRefList(String path); - List<Long> getMemorySizeInBytesList(String path); + List<Long> getBytesList(String path); List<Long> getMillisecondsList(String path); diff --git a/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java b/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java index aba696ae..3ec840bc 100644 --- a/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java +++ b/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java @@ -327,7 +327,7 @@ class SimpleConfig implements Config { } @Override - public List<Long> getMemorySizeInBytesList(String path) { + public List<Long> getBytesList(String path) { List<Long> l = new ArrayList<Long>(); List<? extends ConfigValue> list = getList(path); for (ConfigValue v : list) { diff --git a/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala b/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala index 08249ae1..7540a56d 100644 --- a/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala +++ b/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala @@ -721,7 +721,7 @@ class ConfigTest extends TestUtils { assertEquals(1024 * 1024L, conf.getBytes("memsizes.meg")) assertEquals(1024 * 1024L, conf.getBytes("memsizes.megAsNumber")) assertEquals(Seq(1024 * 1024L, 1024 * 1024L, 1024L * 1024L), - conf.getMemorySizeInBytesList("memsizes.megsList").asScala) + conf.getBytesList("memsizes.megsList").asScala) assertEquals(512 * 1024L, conf.getBytes("memsizes.halfMeg")) }