< prev index next >
src/java.desktop/share/classes/java/beans/MethodRef.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2013, 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
--- 1,7 ----
/*
! * 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,76 ****
method = find(this.typeRef.get(), this.signature);
if (method == null) {
this.signature = null;
this.methodRef = null;
this.typeRef = null;
}
- else {
this.methodRef = new SoftReference<>(method);
}
- }
return isPackageAccessible(method.getDeclaringClass()) ? method : null;
}
private static Method find(Class<?> type, String signature) {
if (type != null) {
--- 62,75 ----
method = find(this.typeRef.get(), this.signature);
if (method == null) {
this.signature = null;
this.methodRef = null;
this.typeRef = null;
+ return null;
}
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 >