Bug 441827: TextViewer.ViewerState.restore method loses caret position

removed leaked fTextViewer
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextViewerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextViewerTest.java
index 3b529ff..d456823 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextViewerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/TextViewerTest.java
@@ -28,33 +28,26 @@
 		return new TestSuite(TextViewerTest.class);
 	}
 
-	private Shell fShell;
-	private TextViewer fTextViewer;
-	private Document fDocument;
-
-	protected void setUp() {
-		fShell= new Shell();
-		fTextViewer= new TextViewer(fShell, SWT.NONE);
-	}
-
-	protected void tearDown() {
-		fShell.dispose();
-	}
-
 	public void testSetRedraw_Bug441827() throws Exception {
-		fDocument= new Document("abc");
-		fTextViewer.setDocument(fDocument);
-		int len= fDocument.getLength();
-		// Select the whole document with the caret at the beginning.
-		fTextViewer.setSelectedRange(len, -len);
-		assertEquals(0, fTextViewer.getSelectedRange().x);
-		assertEquals(len, fTextViewer.getSelectedRange().y);
-		assertEquals(0, fTextViewer.getTextWidget().getCaretOffset());
-		fTextViewer.setRedraw(false);
-		fTextViewer.setRedraw(true);
-		// Check that the selection and the caret position are preserved.
-		assertEquals(0, fTextViewer.getSelectedRange().x);
-		assertEquals(len, fTextViewer.getSelectedRange().y);
-		assertEquals(0, fTextViewer.getTextWidget().getCaretOffset());
+		Shell shell= new Shell();
+		try {
+			TextViewer textViewer= new TextViewer(shell, SWT.NONE);
+			Document document= new Document("abc");
+			textViewer.setDocument(document);
+			int len= document.getLength();
+			// Select the whole document with the caret at the beginning.
+			textViewer.setSelectedRange(len, -len);
+			assertEquals(0, textViewer.getSelectedRange().x);
+			assertEquals(len, textViewer.getSelectedRange().y);
+			assertEquals(0, textViewer.getTextWidget().getCaretOffset());
+			textViewer.setRedraw(false);
+			textViewer.setRedraw(true);
+			// Check that the selection and the caret position are preserved.
+			assertEquals(0, textViewer.getSelectedRange().x);
+			assertEquals(len, textViewer.getSelectedRange().y);
+			assertEquals(0, textViewer.getTextWidget().getCaretOffset());
+		} finally {
+			shell.dispose();
+		}
 	}
 }