Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9A1EB200C4E for ; Mon, 27 Feb 2017 00:36:57 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 98F2B160B87; Sun, 26 Feb 2017 23:36:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 964DC160B84 for ; Mon, 27 Feb 2017 00:36:56 +0100 (CET) Received: (qmail 40800 invoked by uid 500); 26 Feb 2017 23:36:52 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 39102 invoked by uid 99); 26 Feb 2017 23:36:51 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Feb 2017 23:36:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E68B8DFF09; Sun, 26 Feb 2017 23:36:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Sun, 26 Feb 2017 23:37:56 -0000 Message-Id: In-Reply-To: <1e7e127cca214d5a80ee73510374469b@git.apache.org> References: <1e7e127cca214d5a80ee73510374469b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [68/72] [abbrv] lucenenet git commit: Lucene.Net.TestFramework: Removed IllegalStateException and replaced references with System.InvalidOperationException. archived-at: Sun, 26 Feb 2017 23:36:57 -0000 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 Authored: Sun Feb 26 03:58:47 2017 +0700 Committer: Shad Storhaug 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 @@ Code - - Code - Code 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 @@ -/* - * 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)); } }