BUG: ReadOnlyBufferException must not subclass NotSupportedException
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3a55298d Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3a55298d Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3a55298d Branch: refs/heads/master Commit: 3a55298d58120b124e65c025954397e610685add Parents: e6c2b88 Author: Shad Storhaug <[email protected]> Authored: Sat Apr 29 22:13:12 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Mon May 1 04:48:37 2017 +0700 ---------------------------------------------------------------------- .../Support/IO/TestByteBuffer.cs | 24 ++++++++++++++++++++ src/Lucene.Net/Support/IO/BufferExceptions.cs | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3a55298d/src/Lucene.Net.Tests/Support/IO/TestByteBuffer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Tests/Support/IO/TestByteBuffer.cs b/src/Lucene.Net.Tests/Support/IO/TestByteBuffer.cs index 0ccb985..1334f3c 100644 --- a/src/Lucene.Net.Tests/Support/IO/TestByteBuffer.cs +++ b/src/Lucene.Net.Tests/Support/IO/TestByteBuffer.cs @@ -80,6 +80,12 @@ namespace Lucene.Net.Support.IO // NotSupportedException // or ReadOnlyBufferException, so catch all. } + // LUCENENET specific - ReadOnlyBufferException doesn't inherit + // NotSupportedException. + catch (ReadOnlyBufferException) + { + // expected + } } else { @@ -92,6 +98,12 @@ namespace Lucene.Net.Support.IO { // expected } + // LUCENENET specific - ReadOnlyBufferException doesn't inherit + // NotSupportedException. + catch (ReadOnlyBufferException) + { + // expected + } } } } @@ -132,6 +144,12 @@ namespace Lucene.Net.Support.IO // NotSupportedException // or ReadOnlyBufferException, so catch all. } + // LUCENENET specific - ReadOnlyBufferException doesn't inherit + // NotSupportedException. + catch (ReadOnlyBufferException) + { + // expected + } } else { @@ -144,6 +162,12 @@ namespace Lucene.Net.Support.IO { // expected } + // LUCENENET specific - ReadOnlyBufferException doesn't inherit + // NotSupportedException. + catch (ReadOnlyBufferException) + { + // expected + } } } } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3a55298d/src/Lucene.Net/Support/IO/BufferExceptions.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Support/IO/BufferExceptions.cs b/src/Lucene.Net/Support/IO/BufferExceptions.cs index 7473f7c..debc708 100644 --- a/src/Lucene.Net/Support/IO/BufferExceptions.cs +++ b/src/Lucene.Net/Support/IO/BufferExceptions.cs @@ -72,7 +72,7 @@ namespace Lucene.Net.Support.IO #if FEATURE_SERIALIZABLE [Serializable] #endif - internal sealed class ReadOnlyBufferException : NotSupportedException + internal sealed class ReadOnlyBufferException : /*NotSupported*/ Exception { public ReadOnlyBufferException() {
