Project

General

Profile

bug #6842

NPE in Registration constructor when name is null

Added by Andreas Kohlbecker over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
07/21/2017
Due date:
% Done:

100%

Severity:
normal
Found in Version:

Related issues

Related to Edit - task #6258: Add Registration to cdm model Closed 03/15/2017

Associated revisions

Revision 33cef333 (diff)
Added by Andreas Kohlbecker over 1 year ago

fix #6842 avoiding NPE in Registation

Revision 95e0383a (diff)
Added by Andreas Kohlbecker over 1 year ago

fix #6842 avoiding NPE in Registation - better aproach

Revision fd0b01e5 (diff)
Added by Andreas Müller over 1 year ago

fix #6842 fix bugs in Registration.setName

History

#1 Updated by Andreas Kohlbecker over 1 year ago

  • Related to task #6258: Add Registration to cdm model added

#2 Updated by Andreas Kohlbecker over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#3 Updated by Andreas Kohlbecker over 1 year ago

  • Assignee changed from Andreas Kohlbecker to Andreas Müller

#4 Updated by Andreas Müller over 1 year ago

hmm, should we better fix the setName() method instead the NewInstance method?

#5 Updated by Andreas Kohlbecker over 1 year ago

agreed and fixed

#6 Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

Looks like there were still some bugs in setName().

  • if name was null there was still an NPE in the last line
  • existing registration was removed from name.getRegistrations but should be removed from this.name.getRegistrations()
  • maybe some more

I adapted the method and wrote test to proof correct behavior.

Please review.

#7 Updated by Andreas Kohlbecker about 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)