mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#457 - When ebean.properties does not exist do not log error message
This commit is contained in:
@@ -18,7 +18,7 @@ final class PropertyMapLoader {
|
||||
* Load the <code>test-ebean.properties</code>.
|
||||
*/
|
||||
public static PropertyMap loadTestProperties() {
|
||||
return load(null, "test-ebean.properties", false);
|
||||
return load(null, "test-ebean.properties");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,10 +36,10 @@ final class PropertyMapLoader {
|
||||
}
|
||||
}
|
||||
|
||||
PropertyMap map = load(null, fileName, true);
|
||||
PropertyMap map = load(null, fileName);
|
||||
if (loadTestProperties) {
|
||||
// load test properties if present in classpath
|
||||
load(map, "test-ebean.properties", false);
|
||||
load(map, "test-ebean.properties");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@@ -52,13 +52,10 @@ final class PropertyMapLoader {
|
||||
* @param fileName
|
||||
* the name of the properties file to load.
|
||||
*/
|
||||
public static PropertyMap load(PropertyMap p, String fileName, boolean errorOnNull) {
|
||||
public static PropertyMap load(PropertyMap p, String fileName) {
|
||||
|
||||
InputStream is = findInputStream(fileName);
|
||||
if (is == null) {
|
||||
if (errorOnNull) {
|
||||
logger.error(fileName + " not found");
|
||||
}
|
||||
return p;
|
||||
} else {
|
||||
return load(p, is);
|
||||
@@ -66,7 +63,7 @@ final class PropertyMapLoader {
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the inputstream returning the property map.
|
||||
* Load the InputStream returning the property map.
|
||||
*
|
||||
* @param p
|
||||
* an existing property map to load into.
|
||||
|
||||
@@ -2,24 +2,14 @@ package com.avaje.ebean.config;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class PropertyMapTest {
|
||||
|
||||
@Test
|
||||
public void testDefaultProperties() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testAsProperties() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEvaluateProperties() throws Exception {
|
||||
|
||||
PropertyMap.defaultProperties();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -28,57 +18,6 @@ public class PropertyMapTest {
|
||||
String home = System.getenv("HOME");
|
||||
PropertyMap map = new PropertyMap();
|
||||
assertEquals(home, map.eval("${HOME}"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetBoolean() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetInt() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetLong() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGet1() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPutEvalAll() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPutEval() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPut() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRemove() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEntrySet() throws Exception {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user