You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/02/26 23:37:56 UTC

[68/72] [abbrv] lucenenet git commit: Lucene.Net.TestFramework: Removed IllegalStateException and replaced references with System.InvalidOperationException.

Lucene.Net.TestFramework: Removed IllegalStateException and replaced references with System.InvalidOperationException.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ab626cef
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ab626cef
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ab626cef

Branch: refs/heads/api-work
Commit: ab626cef7a0185ff0ea303cb582639116baa6cb6
Parents: 971b438
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sun Feb 26 03:58:47 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Mon Feb 27 06:18:01 2017 +0700

----------------------------------------------------------------------
 .../Lucene.Net.TestFramework.csproj             |  3 --
 .../Randomized/IllegalStateException.cs         | 35 --------------------
 .../Randomized/RandomizedContext.cs             |  2 +-
 .../Randomized/SingleThreadedRandom.cs          |  2 +-
 4 files changed, 2 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ab626cef/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index c7b9446..c6ad07b 100644
--- a/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -332,9 +332,6 @@
     <Compile Include="Randomized\Generators\RandomInts.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="Randomized\IllegalStateException.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Include="Randomized\InternalAssumptionViolatedException.cs">
       <SubType>Code</SubType>
     </Compile>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ab626cef/src/Lucene.Net.TestFramework/Randomized/IllegalStateException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/IllegalStateException.cs b/src/Lucene.Net.TestFramework/Randomized/IllegalStateException.cs
deleted file mode 100644
index a942d28..0000000
--- a/src/Lucene.Net.TestFramework/Randomized/IllegalStateException.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-\ufeff/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.Diagnostics;
-
-
-namespace Lucene.Net.Randomized
-{
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class IllegalStateException : Exception
-    {
-        public IllegalStateException() { }
-
-        public IllegalStateException(string message) : base(message) { }
-
-        public IllegalStateException(string message, Exception inner) : base(message, inner) { }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ab626cef/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs b/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
index 0f3f6b8..752ef32 100644
--- a/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
+++ b/src/Lucene.Net.TestFramework/Randomized/RandomizedContext.cs
@@ -131,7 +131,7 @@ namespace Lucene.Net.Randomized
                 var message = "No context information for thread," + thread.Name + ". " +
                             "Is this thread running under a " + typeof(RandomizedRunner).Name + " context? ";
 
-                throw new IllegalStateException(message);
+                throw new InvalidOperationException(message);
             }
 
             lock (context.contextLock)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ab626cef/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs b/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
index 3f75ffe..c3c6cb3 100644
--- a/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
+++ b/src/Lucene.Net.TestFramework/Randomized/SingleThreadedRandom.cs
@@ -102,7 +102,7 @@ namespace Lucene.Net.Randomized
                                 " and must not be shared.  The current thread is " + Thread.CurrentThread.Name + ".";
 
                 throw new InvalidOperationException(message,
-                    new IllegalStateException("The instance was illegally accessed\n" + this.trace));
+                    new Exception("The instance was illegally accessed\n" + this.trace));
             }
         }