Skip to content

Commit 2fde844

Browse files
committed
Remove whitespace and to lower case on customer id and event id
1 parent 0c0fdda commit 2fde844

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

QueueIT.Security/src/queueit/security/QueueFactory.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ public static IQueue createQueue(String queueName)
5252

5353
public static IQueue createQueue(String customerId, String eventId)
5454
{
55-
if (customerId == null || customerId.isEmpty())
56-
throw new IllegalArgumentException("Customer ID cannot be null or empty");
57-
if (eventId == null || eventId.isEmpty())
58-
throw new IllegalArgumentException("Event ID cannot be null or empty");
59-
6055
Queue queue = instantiateQueue(customerId, eventId, null, null, false, false, null, null);
6156

6257
return queue;
@@ -76,6 +71,14 @@ private static String generateKey(String customerId, String eventId)
7671
private static Queue instantiateQueue(String customerId, String eventId, String domainAlias, String landingPage,
7772
Boolean sslEnabled, Boolean includeTargetUrl, Locale language, String layoutName)
7873
{
74+
if (customerId == null || customerId.isEmpty())
75+
throw new IllegalArgumentException("Customer ID cannot be null or empty");
76+
if (eventId == null || eventId.isEmpty())
77+
throw new IllegalArgumentException("Event ID cannot be null or empty");
78+
79+
customerId = customerId.toLowerCase().trim();
80+
eventId = eventId.toLowerCase().trim();
81+
7982
String key = generateKey(customerId, eventId);
8083

8184
Map<String, Queue> queues = loadedQueues;

0 commit comments

Comments
 (0)