-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
The Address class has a default constructor and can return null on values leading to NullPointerExceptions. Example for an address containing null below.
long imageId = imageInfo.getImageId();
ImagingHardware hardware =new SRMHardware.Builder("some objective", new Detector("dummy detector")).build();
Location dummyLocation = new Location("13", new Address());
Instrument dummyInstrument = new Instrument("test_manufacturer", "Donnerblitz 2001", "db-2001-hp.5", dummyLocation, "DUMMY", hardware);
omeroClient.associateInstrumentWithImage(dummyInstrument, imageId);
It would be better to set default values of empty Strings using the default constructor or a builder pattern to avoid Nullpointers from occurring in the DTO.
Metadata
Metadata
Assignees
Labels
No labels