mirror of
https://github.com/torproject/metrics-lib.git
synced 2024-11-26 18:50:28 +00:00
Fix possible NPE in tests.
This commit is contained in:
parent
d6e9a0d75e
commit
f5f6e5971c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user