diff options
author | Deepak Azad | 2012-03-09 20:20:53 +0000 |
---|---|---|
committer | Markus Keller | 2012-03-09 20:20:53 +0000 |
commit | fb8fa0a233409c255039912f4bc4171d4b00eccd (patch) | |
tree | 8bcede8e2b3ae8a88c3416c56c0eee530c9c9a4f | |
parent | 810532407badf64e9ddaa89e81c3a6d04ac891bf (diff) | |
download | eclipse.platform.text-fb8fa0a233409c255039912f4bc4171d4b00eccd.tar.gz eclipse.platform.text-fb8fa0a233409c255039912f4bc4171d4b00eccd.tar.xz eclipse.platform.text-fb8fa0a233409c255039912f4bc4171d4b00eccd.zip |
fTextStore doesn't need to be protectedv20120309-2020
-rw-r--r-- | org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java | 8 | ||||
-rw-r--r-- | org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java index 589aa7b3367..2fc930e2eb6 100644 --- a/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java +++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/CopyOnWriteTextStoreTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2008 IBM Corporation and others. + * Copyright (c) 2005, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,7 +31,7 @@ public class CopyOnWriteTextStoreTest extends TestCase { super(new GapTextStore()); } ITextStore getStore() { - return fTextStore; + return (ITextStore)new Accessor(this, CopyOnWriteTextStore.class).get("fTextStore"); } String get() { return get(0, getLength()); @@ -68,7 +68,7 @@ public class CopyOnWriteTextStoreTest extends TestCase { // check that underlying text store is not modifiable boolean failed= false; try { - fText.getStore().replace(0,0,null); + fText.getStore().replace(0, 0, null); } catch (UnsupportedOperationException uoe) { failed= true; } @@ -91,7 +91,7 @@ public class CopyOnWriteTextStoreTest extends TestCase { // check that underlying text store is not modifiable boolean failed= false; try { - fText.getStore().replace(0,0,null); + fText.getStore().replace(0, 0, null); } catch (UnsupportedOperationException uoe) { failed= true; } diff --git a/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java b/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java index 7bb46eed83e..acbe1e266af 100644 --- a/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java +++ b/org.eclipse.text/src/org/eclipse/jface/text/CopyOnWriteTextStore.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2010 IBM Corporation and others. + * Copyright (c) 2005, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -107,7 +107,7 @@ public class CopyOnWriteTextStore implements ITextStore { } /** The underlying "real" text store */ - protected ITextStore fTextStore= new StringTextStore(); + private ITextStore fTextStore; /** A modifiable <code>ITextStore</code> instance */ private final ITextStore fModifiableTextStore; |