Details
diff --git a/entitlement/src/main/java/com/ning/billing/entitlement/engine/dao/AuditedEntitlementDao.java b/entitlement/src/main/java/com/ning/billing/entitlement/engine/dao/AuditedEntitlementDao.java
index 7316c3b..38bf0ca 100644
--- a/entitlement/src/main/java/com/ning/billing/entitlement/engine/dao/AuditedEntitlementDao.java
+++ b/entitlement/src/main/java/com/ning/billing/entitlement/engine/dao/AuditedEntitlementDao.java
@@ -484,6 +484,9 @@ public class AuditedEntitlementDao implements EntitlementDao {
}
private List<Subscription> buildBundleSubscriptions(final SubscriptionFactory factory, final List<Subscription> input) {
+ if (input == null || input.size() == 0) {
+ return Collections.emptyList();
+ }
// Make sure BasePlan -- if exists-- is first
Collections.sort(input, new Comparator<Subscription>() {
@Override
diff --git a/util/src/main/resources/com/ning/billing/util/bus/dao/PersistentBusSqlDao.sql.stg b/util/src/main/resources/com/ning/billing/util/bus/dao/PersistentBusSqlDao.sql.stg
index 0cbd4ec..61e991b 100644
--- a/util/src/main/resources/com/ning/billing/util/bus/dao/PersistentBusSqlDao.sql.stg
+++ b/util/src/main/resources/com/ning/billing/util/bus/dao/PersistentBusSqlDao.sql.stg
@@ -14,6 +14,7 @@ getNextBusEventEntry() ::= <<
where
processing_state != 'PROCESSED'
and processing_state != 'REMOVED'
+ and creating_owner = :owner
and (processing_owner IS NULL OR processing_available_date \<= :now)
order by
record_id asc
diff --git a/util/src/main/resources/com/ning/billing/util/notificationq/dao/NotificationSqlDao.sql.stg b/util/src/main/resources/com/ning/billing/util/notificationq/dao/NotificationSqlDao.sql.stg
index 13ff029..8eb289a 100644
--- a/util/src/main/resources/com/ning/billing/util/notificationq/dao/NotificationSqlDao.sql.stg
+++ b/util/src/main/resources/com/ning/billing/util/notificationq/dao/NotificationSqlDao.sql.stg
@@ -19,6 +19,7 @@ getReadyNotifications() ::= <<
and queue_name = :queueName
and processing_state != 'PROCESSED'
and processing_state != 'REMOVED'
+ and creating_owner = :owner
and (processing_owner IS NULL OR processing_available_date \<= :now)
order by
effective_date asc