Skip to content
Snippets Groups Projects
Commit 31c1460e authored by Damian Minkov's avatar Damian Minkov
Browse files

Configuration service skips empty key names.

parent 566b354d
No related branches found
No related tags found
No related merge requests found
......@@ -48,4 +48,23 @@ public Object nextElement()
}
};
}
/**
* Do not allow putting empty String keys in the properties table.
* @param key the key
* @param value the value
* @return the previous value of the specified key in this hashtable,
* or <code>null</code> if it did not have one
*/
public synchronized Object put(Object key, Object value)
{
if(key instanceof String
&& ((String)key).trim().length() == 0)
{
// just skip the putting
return null;
}
return super.put(key, value);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment