Unnecessary try/finally removed
This commit is contained in:
		@@ -31,14 +31,12 @@ import android.util.AttributeSet;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
import android.view.ContextMenu;
 | 
			
		||||
import android.widget.EditText;
 | 
			
		||||
 | 
			
		||||
import org.solovyev.android.Check;
 | 
			
		||||
import org.solovyev.android.calculator.onscreen.CalculatorOnscreenService;
 | 
			
		||||
 | 
			
		||||
import java.lang.reflect.Method;
 | 
			
		||||
 | 
			
		||||
import javax.annotation.Nonnull;
 | 
			
		||||
import javax.annotation.Nullable;
 | 
			
		||||
import java.lang.reflect.Method;
 | 
			
		||||
 | 
			
		||||
public class EditorView extends EditText {
 | 
			
		||||
 | 
			
		||||
@@ -85,7 +83,6 @@ public class EditorView extends EditText {
 | 
			
		||||
 | 
			
		||||
    public void setState(@Nonnull final EditorState state) {
 | 
			
		||||
        Check.isMainThread();
 | 
			
		||||
        try {
 | 
			
		||||
        // we don't want to be notified about changes we make ourselves
 | 
			
		||||
        reportChanges = false;
 | 
			
		||||
        if (App.getTheme().light && getContext() instanceof CalculatorOnscreenService) {
 | 
			
		||||
@@ -94,12 +91,9 @@ public class EditorView extends EditText {
 | 
			
		||||
        } else {
 | 
			
		||||
            setText(state.text, BufferType.EDITABLE);
 | 
			
		||||
        }
 | 
			
		||||
            final int selection = Editor.clamp(state.selection, length());
 | 
			
		||||
            setSelection(selection);
 | 
			
		||||
        } finally {
 | 
			
		||||
        setSelection(Editor.clamp(state.selection, length()));
 | 
			
		||||
        reportChanges = true;
 | 
			
		||||
    }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    protected void onSelectionChanged(int start, int end) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user