< prev index next >
modules/javafx.base/src/main/java/com/sun/javafx/property/PropertyReference.java
Print this page
rev 10441 : imported patch fix-8177566-trampoline
*** 1,7 ****
/*
! * Copyright (c) 2010, 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) 2010, 2017, 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
*** 31,41 ****
import java.lang.reflect.Modifier;
import java.security.PrivilegedAction;
import javafx.beans.property.ReadOnlyProperty;
- import sun.reflect.misc.MethodUtil;
import sun.reflect.misc.ReflectUtil;
/**
* A handle to a specific property defined on some {@link Bean}.
*/
--- 31,40 ----
*** 147,157 ****
if (!isWritable())
throw new IllegalStateException(
"Cannot write to readonly property " + name);
assert setter != null;
try {
! MethodUtil.invoke(setter, bean, new Object[] {value});
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
--- 146,156 ----
if (!isWritable())
throw new IllegalStateException(
"Cannot write to readonly property " + name);
assert setter != null;
try {
! MethodHelper.invoke(setter, bean, new Object[] {value});
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
*** 170,180 ****
if (!isReadable())
throw new IllegalStateException(
"Cannot read from unreadable property " + name);
assert getter != null;
try {
! return (T)MethodUtil.invoke(getter, bean, (Object[])null);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
--- 169,179 ----
if (!isReadable())
throw new IllegalStateException(
"Cannot read from unreadable property " + name);
assert getter != null;
try {
! return (T)MethodHelper.invoke(getter, bean, (Object[])null);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
*** 193,203 ****
public ReadOnlyProperty<T> getProperty(Object bean) {
if (!hasProperty())
throw new IllegalStateException("Cannot get property " + name);
assert propertyGetter != null;
try {
! return (ReadOnlyProperty<T>)MethodUtil.invoke(propertyGetter, bean, (Object[])null);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
--- 192,202 ----
public ReadOnlyProperty<T> getProperty(Object bean) {
if (!hasProperty())
throw new IllegalStateException("Cannot get property " + name);
assert propertyGetter != null;
try {
! return (ReadOnlyProperty<T>)MethodHelper.invoke(propertyGetter, bean, (Object[])null);
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
< prev index next >