public boolean resetToDefault ( String propertyName ) { gatekeeper . signIn ( ) ; try { /* * If this property was added with no default value, all we can do * is remove the property entirely. */ String defaultValue = getDefaultValue ( propertyName ) ; if ( defaultValue == null ) { return properties . remove ( propertyName ) != null ; } /* * Every property with a default value is guaranteed to have a * stack. Since we just confirmed the existence of a default value, * we know the stack is available. */ return properties . get ( propertyName ) . push ( defaultValue ) ; } finally { gatekeeper . signOut ( ) ; } }
Reset the value associated with specified property to its default value .