diff options
author | Markus Schorn | 2008-04-21 07:27:30 +0000 |
---|---|---|
committer | Markus Schorn | 2008-04-21 07:27:30 +0000 |
commit | 6e3b4502baebacdd6cab739e0c91588a6e9f4e3e (patch) | |
tree | e0be5924dd8ff524d6f92d57e9ea1ba9be93ca34 /core | |
parent | 237ac325a7f46add84ed50b2672ccb57cff67855 (diff) | |
download | org.eclipse.cdt-6e3b4502baebacdd6cab739e0c91588a6e9f4e3e.tar.gz org.eclipse.cdt-6e3b4502baebacdd6cab739e0c91588a6e9f4e3e.tar.xz org.eclipse.cdt-6e3b4502baebacdd6cab739e0c91588a6e9f4e3e.zip |
Fix warnings.
Diffstat (limited to 'core')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Database.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Database.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Database.java index 7557a5a6dc2..254037f0556 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Database.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/Database.java @@ -22,13 +22,13 @@ import java.nio.channels.ClosedByInterruptException; import java.nio.channels.ClosedChannelException; import java.nio.channels.FileChannel; import java.util.ArrayList; -import java.util.Iterator; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; + /** * Database encapsulates access to a flat binary format file with a memory-manager-like API for * obtaining and releasing areas of storage (memory). @@ -100,7 +100,7 @@ public class Database { * @param location the local file path for the database * @param cache the cache to be used optimization * @param version the version number to store in the database (only applicable for new databases) - * @param permanentReadOnly whether this Database object will ever need writing to + * @param openReadOnly whether this Database object will ever need writing to * @throws CoreException */ public Database(File location, ChunkCache cache, int version, boolean openReadOnly) throws CoreException { @@ -247,9 +247,6 @@ public class Database { /** * Allocate a block out of the database. - * - * @param size - * @return */ public int malloc(final int datasize) throws CoreException { assert fExclusiveLock; @@ -468,7 +465,6 @@ public class Database { * Closes the database. * <p> * The behavior of any further calls to the Database is undefined - * @throws IOException * @throws CoreException */ public void close() throws CoreException { @@ -605,8 +601,7 @@ public class Database { } if (!dirtyChunks.isEmpty()) { markFileIncomplete(); - for (Iterator<Chunk> it = dirtyChunks.iterator(); it.hasNext();) { - Chunk chunk = it.next(); + for (Chunk chunk : dirtyChunks) { if (chunk.fDirty) { chunk.flush(); } @@ -614,8 +609,7 @@ public class Database { // only after the chunks are flushed we may unlock and release them. synchronized (fCache) { - for (Iterator<Chunk> it = dirtyChunks.iterator(); it.hasNext();) { - Chunk chunk = it.next(); + for (Chunk chunk : dirtyChunks) { chunk.fLocked= false; if (chunk.fCacheIndex < 0) { fChunks[chunk.fSequenceNumber]= null; |