Commit 27279590 authored by Guillaume Surrel's avatar Guillaume Surrel
Browse files

Fix NPE if there is no property defined on creation.

parent 19463d03
......@@ -78,6 +78,10 @@ public class AcquisitionQueueImpl extends QueueImpl implements AcquisitionQueueI
if (logger.isLoggable(BasicLevel.DEBUG)) {
logger.log(BasicLevel.DEBUG, "AcquisitionQueueImpl.<init> prop = " + properties);
}
if (properties == null) {
throw new RequestException("No property found: At least " + AcquisitionModule.CLASS_NAME
+ " property must be defined on queue creation.");
}
this.properties = properties;
acquisitionClassName = properties.getProperty(AcquisitionModule.CLASS_NAME);
......
......@@ -78,6 +78,10 @@ public class AcquisitionTopicImpl extends TopicImpl implements AcquisitionTopicI
if (logger.isLoggable(BasicLevel.DEBUG)) {
logger.log(BasicLevel.DEBUG, "AcquisitionTopicImpl.<init> prop = " + properties);
}
if (properties == null) {
throw new RequestException("No property found: At least " + AcquisitionModule.CLASS_NAME
+ " property must be defined on topic creation.");
}
this.properties = properties;
acquisitionClassName = properties.getProperty(AcquisitionModule.CLASS_NAME);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment