changeset 163:f8fd28c56300

8080386: RegistrationEvent(null) does not result in NPE Summary: null object is checked Reviewed-by: snazarki Contributed-by: olga.milovskaya@oracle.com
author snazarki
date Thu, 14 May 2015 14:43:31 +0300
parents 6569ed57740f
children 0dc7ae392a2e
files src/share/classes/jdk/dio/RegistrationEvent.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/RegistrationEvent.java	Wed May 13 14:55:29 2015 +0300
+++ b/src/share/classes/jdk/dio/RegistrationEvent.java	Thu May 14 14:43:31 2015 +0300
@@ -58,6 +58,8 @@
      */
     public RegistrationEvent(String initiator, DeviceDescriptor<P> descriptor) {
         super(initiator);
+        //NPE check
+        descriptor.getID();
         this.descriptor = descriptor;
     }