Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec609d3a authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Change Property.set() to throw UnsupportedOperationException by default"

parents 9e7c2063 a2f78a36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -78,11 +78,11 @@ public abstract class Property<T, V> {

    /**
     * Sets the value on <code>object</code> which this property represents. If the method is unable
     * to set the value on the target object, it will throw a {@link NoSuchPropertyException}
     * to set the value on the target object it will throw an {@link UnsupportedOperationException}
     * exception.
     */
    public void set(T object, V value) {
        throw new NoSuchPropertyException("Property is read-only; set() is not implemented");
        throw new UnsupportedOperationException("Property " + getName() +" is read-only");
    }

    /**