diff options
author | Lars Vogel | 2019-06-17 09:15:05 +0000 |
---|---|---|
committer | Lars Vogel | 2019-06-17 09:15:05 +0000 |
commit | e8d291d9a4d22674c38c2ff5ceb9e7ae60faf8a8 (patch) | |
tree | 91fe9ff98b48a6257613f0497d4a49755f69b167 | |
parent | 4e5b4450176cf71c5f3620377ec4d7ef39392c0c (diff) | |
download | eclipse.platform.debug-e8d291d9a4d22674c38c2ff5ceb9e7ae60faf8a8.tar.gz eclipse.platform.debug-e8d291d9a4d22674c38c2ff5ceb9e7ae60faf8a8.tar.xz eclipse.platform.debug-e8d291d9a4d22674c38c2ff5ceb9e7ae60faf8a8.zip |
Remove redundant block
Change-Id: Ic7b908b1e823d854b13c7fd4d882a98aef730c8d
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r-- | org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java | 52 |
1 files changed, 25 insertions, 27 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java index 2d563e511..b2e391b15 100644 --- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java +++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/IOConsoleTestUtil.java @@ -548,34 +548,32 @@ public final class IOConsoleTestUtil { lastPartition = partition; } } - { - int pos = offset; - int end = offset + length; - ITypedRegion lastPartition = null; - String partitionType = expectedType; - while (pos < end) { - final ITypedRegion partition = getPartitioner().getPartition(pos); - if (partition == null) { - TestCase.assertTrue("Did not expect 'null' partition.", allowGaps); - pos++; - continue; - } - TestCase.assertNotSame("Got same partition again.", lastPartition, partition); - TestCase.assertFalse("Did not expected and cannot handle empty partition.", partition.getLength() == 0); - TestCase.assertTrue("Got not the requested partition.", partition.getOffset() <= pos && partition.getOffset() + partition.getLength() > pos); - TestCase.assertTrue("Not a valid partition type.", validPartionTypes.contains(partition.getType())); - lastPartition = partition; - if (partitionType != null && !partitionType.equals(partition.getType())) { - TestCase.assertTrue("Wrong partition type.", allowMixedTypes); - pos += partition.getLength(); - end += partition.getLength(); - continue; - } - if (partitionType == null && !allowMixedTypes) { - partitionType = partition.getType(); - } - pos = partition.getOffset() + partition.getLength(); + int pos = offset; + int end = offset + length; + ITypedRegion lastPartition = null; + String partitionType = expectedType; + while (pos < end) { + final ITypedRegion partition = getPartitioner().getPartition(pos); + if (partition == null) { + TestCase.assertTrue("Did not expect 'null' partition.", allowGaps); + pos++; + continue; + } + TestCase.assertNotSame("Got same partition again.", lastPartition, partition); + TestCase.assertFalse("Did not expected and cannot handle empty partition.", partition.getLength() == 0); + TestCase.assertTrue("Got not the requested partition.", partition.getOffset() <= pos && partition.getOffset() + partition.getLength() > pos); + TestCase.assertTrue("Not a valid partition type.", validPartionTypes.contains(partition.getType())); + lastPartition = partition; + if (partitionType != null && !partitionType.equals(partition.getType())) { + TestCase.assertTrue("Wrong partition type.", allowMixedTypes); + pos += partition.getLength(); + end += partition.getLength(); + continue; + } + if (partitionType == null && !allowMixedTypes) { + partitionType = partition.getType(); } + pos = partition.getOffset() + partition.getLength(); } return this; } |