Rename getMemorySizeInBytesList to getBytesList to match getBytes

This commit is contained in:
Havoc Pennington 2011-11-29 08:44:07 -05:00
parent 4f3a91fd86
commit a840c2599d
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -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"))
}