Fix possible NPE in tests.

This commit is contained in:
Karsten Loesing 2019-11-20 17:34:59 +01:00
parent d6e9a0d75e
commit f5f6e5971c

View File

@ -453,6 +453,9 @@ public class ServerDescriptorImplTest {
private ServerDescriptorImpl buildDescriptor()
throws DescriptorParseException {
byte[] descriptorBytes = this.buildDescriptorBytes();
if (null == descriptorBytes) {
descriptorBytes = new byte[0];
}
return new RelayServerDescriptorImpl(descriptorBytes,
new int[] { 0, descriptorBytes.length }, null);
}