@Test public void testGetPropertyNull() { String key=null; String defaultValue="test"; String value= PropertiesUtil.getProperty(key, defaultValue); Assert.assertNull(value); }
public static String getProperty(String key, String defaultValue) { if (key == null) { return null; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { rtrnVal = defaultValue; } return rtrnVal; }
PropertiesUtil extends PropertyPlaceholderConfigurer { public static String getProperty(String key, String defaultValue) { if (key == null) { return null; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { rtrnVal = defaultValue; } return rtrnVal; } }
PropertiesUtil extends PropertyPlaceholderConfigurer { public static String getProperty(String key, String defaultValue) { if (key == null) { return null; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { rtrnVal = defaultValue; } return rtrnVal; } private  PropertiesUtil(); }
PropertiesUtil extends PropertyPlaceholderConfigurer { public static String getProperty(String key, String defaultValue) { if (key == null) { return null; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { rtrnVal = defaultValue; } return rtrnVal; } private  PropertiesUtil(); static String getProperty(String key, String defaultValue); static String getProperty(String key); static String[] getPropertyStringList(String key); static Integer getIntProperty(String key, int defaultValue); static long getLongProperty(String key, long defaultValue); static Integer getIntProperty(String key); static boolean getBooleanProperty(String key, boolean defaultValue); static Map<String, String> getPropertiesMap(); static Properties getProps(); }
PropertiesUtil extends PropertyPlaceholderConfigurer { public static String getProperty(String key, String defaultValue) { if (key == null) { return null; } String rtrnVal = propertiesMap.get(key); if (rtrnVal == null) { rtrnVal = defaultValue; } return rtrnVal; } private  PropertiesUtil(); static String getProperty(String key, String defaultValue); static String getProperty(String key); static String[] getPropertyStringList(String key); static Integer getIntProperty(String key, int defaultValue); static long getLongProperty(String key, long defaultValue); static Integer getIntProperty(String key); static boolean getBooleanProperty(String key, boolean defaultValue); static Map<String, String> getPropertiesMap(); static Properties getProps();  }