lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [37/45] lucenenet git commit: BUG: ReadOnlyBufferException must not subclass NotSupportedException
Date Sun, 30 Apr 2017 21:56:16 GMT
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 <shad@shadstorhaug.com>
Authored: Sat Apr 29 22:13:12 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
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()
         {


Mime
View raw message