< prev index next >

src/java.desktop/share/classes/java/beans/MethodRef.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -62,15 +62,14 @@
             method = find(this.typeRef.get(), this.signature);
             if (method == null) {
                 this.signature = null;
                 this.methodRef = null;
                 this.typeRef = null;
+                return null;
             }
-            else {
                 this.methodRef = new SoftReference<>(method);
             }
-        }
         return isPackageAccessible(method.getDeclaringClass()) ? method : null;
     }
 
     private static Method find(Class<?> type, String signature) {
         if (type != null) {
< prev index next >