mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Throw explicit exception if backend is missing a name
This commit is contained in:
@ -75,10 +75,11 @@ public class ConnectionManager
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
private static ConnectionProviderInterface getConnectionProvider(RDBMSBackendMetaData backend) throws QException
|
private static ConnectionProviderInterface getConnectionProvider(RDBMSBackendMetaData backend) throws QException
|
||||||
{
|
{
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// some non-standard use-cases use a backend without a name... avoid NPE in map //
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
String name = Objects.requireNonNullElse(backend.getName(), "");
|
String name = Objects.requireNonNullElse(backend.getName(), "");
|
||||||
|
if(!StringUtils.hasContent(name))
|
||||||
|
{
|
||||||
|
throw (new QException("RDBMSBackendMetaData is missing a name"));
|
||||||
|
}
|
||||||
|
|
||||||
if(!connectionProviderMap.containsKey(name))
|
if(!connectionProviderMap.containsKey(name))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user