lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/3] lucenenet git commit: Making it easier to debug an exception + various cleanups
Date Sun, 01 Mar 2015 22:56:29 GMT
Making it easier to debug an exception + various cleanups


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

Branch: refs/heads/master
Commit: 3c73a178a25b0099770e691eeabadd79ea66e688
Parents: 979403c
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Mon Mar 2 00:53:43 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Mon Mar 2 00:53:43 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Index/IndexWriter.cs           | 4 ++--
 src/Lucene.Net.TestFramework/Util/VirtualMethod.cs | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3c73a178/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index fbedd45..7c4627b 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -904,7 +904,7 @@ namespace Lucene.Net.Index
                         // points.
                         if (commit.Directory != directory)
                         {
-                            throw new System.ArgumentException("IndexCommit's directory doesn't
match my directory");
+                            throw new ArgumentException(string.Format("IndexCommit's directory
doesn't match my directory (mine: {0}, commit's: {1})", directory, commit.Directory));
                         }
                         SegmentInfos oldInfos = new SegmentInfos();
                         oldInfos.Read(directory, commit.SegmentsFileName);
@@ -2861,7 +2861,7 @@ namespace Lucene.Net.Index
 
         /// <summary>
         /// Called internally if any index state has changed. </summary>
-        internal virtual void Changed()
+        internal void Changed()
         {
             lock (this)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3c73a178/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
index 319efaa..7cc661b 100644
--- a/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
+++ b/src/Lucene.Net.TestFramework/Util/VirtualMethod.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Util
     ///  final boolean isDeprecatedMethodOverridden =
     ///   VirtualMethod.compareImplementationDistance(this.getClass(), oldMethod, newMethod)
> 0
     /// </pre>
-    /// <p><seealso cref="getImplementationDistance"/> returns the distance of
the subclass that overrides this method.
+    /// <p><seealso cref="GetImplementationDistance"/> returns the distance of
the subclass that overrides this method.
     /// The one with the larger distance should be used preferable.
     /// this way also more complicated method rename scenarios can be handled
     /// (think of 2.9 {@code TokenStream} deprecations).</p>
@@ -67,9 +67,9 @@ namespace Lucene.Net.Util
 
         /// <summary>
         /// Creates a new instance for the given {@code baseClass} and method declaration.
</summary>
-        /// <exception cref="UnsupportedOperationException"> if you create a second
instance of the same
+        /// <exception cref="InvalidOperationException"> if you create a second instance
of the same
         ///  {@code baseClass} and method declaration combination. this enforces the singleton
status. </exception>
-        /// <exception cref="IllegalArgumentException"> if {@code baseClass} does not
declare the given method. </exception>
+        /// <exception cref="ArgumentException"> if {@code baseClass} does not declare
the given method. </exception>
         public VirtualMethod(Type baseClass, string method, params Type[] parameters)
         {
             this.BaseClass = baseClass;


Mime
View raw message