init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.eactive.eai.util;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertiesUtil {
|
||||
/**
|
||||
* Copies a property from source to destination if the key exists in source.
|
||||
*
|
||||
* @param source The source properties.
|
||||
* @param destination The destination properties.
|
||||
* @param key The key to check and copy.
|
||||
*/
|
||||
public static void copyPropertyIfPresent(Properties source, Properties destination, Object key) {
|
||||
Object value = source.get(key);
|
||||
if (value != null) {
|
||||
destination.put(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user