Fix violations reported by SonarQube: preserve stacktrace, final class.
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * This class extends the IndexConfig for JE Backend. |
| | | */ |
| | | private class JEIndexConfig implements IndexingOptions |
| | | /** This class extends the IndexConfig for JE Backend. */ |
| | | private final class JEIndexConfig implements IndexingOptions |
| | | { |
| | | /** The length of the substring index. */ |
| | | private int substringLength; |
| | |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static com.sleepycat.je.EnvironmentConfig.*; |
| | | |
| | | import static org.opends.messages.BackendMessages.*; |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.backends.jeb.ConfigurableEnvironment.*; |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | logger.traceException(ioe); |
| | | throw new DirectoryException(errorRC, ERR_JEB_EXPORT_IO_ERROR.get(ioe.getMessage())); |
| | | throw new DirectoryException(errorRC, ERR_JEB_EXPORT_IO_ERROR.get(ioe.getMessage()), ioe); |
| | | } |
| | | catch (DatabaseException de) |
| | | { |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | throw new DirectoryException(errorRC, ce.getMessageObject()); |
| | | throw new DirectoryException(errorRC, ce.getMessageObject(), ce); |
| | | } |
| | | catch (IdentifiedException e) |
| | | { |
| | |
| | | throw (DirectoryException) e; |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(errorRC, e.getMessageObject()); |
| | | throw new DirectoryException(errorRC, e.getMessageObject(), e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Represents an renamed entry that was deleted from JE but yet to be added |
| | | * back. |
| | | */ |
| | | private static class MovedEntry |
| | | /** Represents an renamed entry that was deleted from JE but yet to be added back. */ |
| | | private static final class MovedEntry |
| | | { |
| | | EntryID entryID; |
| | | Entry entry; |
| | | MovedEntry next; |
| | | boolean renumbered; |
| | | private EntryID entryID; |
| | | private Entry entry; |
| | | private MovedEntry next; |
| | | private boolean renumbered; |
| | | |
| | | private MovedEntry(EntryID entryID, Entry entry, boolean renumbered) |
| | | { |
| | |
| | | * A cached set of ByteStringBuilder buffers and ASN1Writer used to encode |
| | | * entries. |
| | | */ |
| | | private static class EntryCodec |
| | | private static final class EntryCodec |
| | | { |
| | | private static final int BUFFER_INIT_SIZE = 512; |
| | | |
| | |
| | | return dn.getParentDNInSuffix(); |
| | | } |
| | | |
| | | /** |
| | | * This class reports progress of the verify job at fixed intervals. |
| | | */ |
| | | private class ProgressTask extends TimerTask |
| | | /** This class reports progress of the verify job at fixed intervals. */ |
| | | private final class ProgressTask extends TimerTask |
| | | { |
| | | /** The total number of records to process. */ |
| | | private long totalCount; |
| | |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * This class extends the IndexConfig for JE Backend. |
| | | */ |
| | | private class JEIndexConfig implements IndexingOptions |
| | | /** This class extends the IndexConfig for JE Backend. */ |
| | | private final class JEIndexConfig implements IndexingOptions |
| | | { |
| | | /** The length of the substring index. */ |
| | | private int substringLength; |
| | |
| | | catch (IOException ioe) |
| | | { |
| | | logger.traceException(ioe); |
| | | throw new DirectoryException(errorRC, ERR_JEB_EXPORT_IO_ERROR.get(ioe.getMessage())); |
| | | throw new DirectoryException(errorRC, ERR_JEB_EXPORT_IO_ERROR.get(ioe.getMessage()), ioe); |
| | | } |
| | | catch (StorageRuntimeException de) |
| | | { |
| | |
| | | } |
| | | catch (ConfigException ce) |
| | | { |
| | | throw new DirectoryException(errorRC, ce.getMessageObject()); |
| | | throw new DirectoryException(errorRC, ce.getMessageObject(), ce); |
| | | } |
| | | catch (IdentifiedException e) |
| | | { |
| | |
| | | throw (DirectoryException) e; |
| | | } |
| | | logger.traceException(e); |
| | | throw new DirectoryException(errorRC, e.getMessageObject()); |
| | | throw new DirectoryException(errorRC, e.getMessageObject(), e); |
| | | } |
| | | finally |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Represents an renamed entry that was deleted from JE but yet to be added |
| | | * back. |
| | | */ |
| | | private static class MovedEntry |
| | | /** Represents an renamed entry that was deleted from JE but yet to be added back. */ |
| | | private static final class MovedEntry |
| | | { |
| | | EntryID entryID; |
| | | Entry entry; |
| | | MovedEntry next; |
| | | boolean renumbered; |
| | | private EntryID entryID; |
| | | private Entry entry; |
| | | private MovedEntry next; |
| | | private boolean renumbered; |
| | | |
| | | private MovedEntry(EntryID entryID, Entry entry, boolean renumbered) |
| | | { |
| | |
| | | * A cached set of ByteStringBuilder buffers and ASN1Writer used to encode |
| | | * entries. |
| | | */ |
| | | private static class EntryCodec |
| | | private static final class EntryCodec |
| | | { |
| | | private static final int BUFFER_INIT_SIZE = 512; |
| | | |
| | |
| | | return dn.getParentDNInSuffix(); |
| | | } |
| | | |
| | | /** |
| | | * This class reports progress of the verify job at fixed intervals. |
| | | */ |
| | | private class ProgressTask extends TimerTask |
| | | /** This class reports progress of the verify job at fixed intervals. */ |
| | | private final class ProgressTask extends TimerTask |
| | | { |
| | | /** The total number of records to process. */ |
| | | private long totalCount; |