Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java8
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
index cfe80cd6a..04d90910e 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/equinox/log/test/LogReaderServiceTest.java
@@ -167,15 +167,15 @@ public class LogReaderServiceTest extends AbstractBundleTests {
for (int i = 0; i < 9; i++) {
testLog.log(LogService.LOG_WARNING, String.valueOf(i));
}
- assertEquals("Wrong number of logs.", 9, countLogEntries(testReader.getLog(), 0));
+ assertEquals("Wrong number of logs.", 9, countLogEntries(testReader.getLog(), 8));
// log 9 more things
for (int i = 9; i < 18; i++) {
testLog.log(LogService.LOG_WARNING, String.valueOf(i));
}
- // should only be the last 10 logs (8 - 17)
- assertEquals("Wrong number of logs.", 10, countLogEntries(testReader.getLog(), 8));
+ // should only be the last 10 logs (17-8)
+ assertEquals("Wrong number of logs.", 10, countLogEntries(testReader.getLog(), 17));
} finally {
try {
equinox.stop();
@@ -215,7 +215,7 @@ public class LogReaderServiceTest extends AbstractBundleTests {
while (logEntries.hasMoreElements()) {
LogEntry entry = (LogEntry) logEntries.nextElement();
assertEquals("Wrong log message.", String.valueOf(startingMessage), entry.getMessage());
- startingMessage++;
+ startingMessage--;
count++;
}
return count;
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
index 2813efc2d..e018dd084 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceFactory.java
@@ -227,9 +227,9 @@ public class ExtendedLogReaderServiceFactory implements ServiceFactory<ExtendedL
if (history != null) {
synchronized (history) {
if (history.size() == maxHistory) {
- history.removeFirst();
+ history.removeLast();
}
- history.addLast(logEntry);
+ history.addFirst(logEntry);
}
}
}

Back to the top