From 97947ce035cb1c5f669ea4cdcb22ad292fa2a4bf Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 10 Apr 2015 08:16:10 +0000
Subject: [PATCH] More code cleanup: Added generics Ignored javadocs warnings etc.
---
opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
index b4bd496..8076ff5 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/persistit/PersistItStorage.java
@@ -84,6 +84,7 @@
import com.persistit.exception.RollbackException;
/** PersistIt database implementation of the {@link Storage} engine. */
+@SuppressWarnings("javadoc")
public final class PersistItStorage implements Storage, ConfigurationChangeListener<PersistitBackendCfg>,
DiskSpaceMonitorHandler, AlertGenerator
{
@@ -92,7 +93,7 @@
private static final int BUFFER_SIZE = 16 * 1024;
/** PersistIt implementation of the {@link Cursor} interface. */
- private final class CursorImpl implements Cursor
+ private final class CursorImpl implements Cursor<ByteString, ByteString>
{
private ByteString currentKey;
private ByteString currentValue;
@@ -261,13 +262,13 @@
}
@Override
- public void put(final TreeName treeName, final ByteSequence key,
- final ByteSequence value)
+ public void put(final TreeName treeName, final ByteSequence key, final ByteSequence value)
{
try
{
final Tree tree = trees.get(treeName);
- importer.store(tree, bytesToKey(importKey, key),
+ importer.store(tree,
+ bytesToKey(importKey, key),
bytesToValue(importValue, value));
}
catch (final Exception e)
@@ -337,8 +338,8 @@
@Override
public long getRecordCount(TreeName treeName)
{
- // FIXME: is the a better/quicker way to do this?
- final Cursor cursor = openCursor(treeName);
+ // FIXME: is there a better/quicker way to do this?
+ final Cursor<?, ?> cursor = openCursor(treeName);
try
{
long count = 0;
@@ -355,7 +356,7 @@
}
@Override
- public Cursor openCursor(final TreeName treeName)
+ public Cursor<ByteString, ByteString> openCursor(final TreeName treeName)
{
try
{
--
Gitblit v1.10.0