lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [2/2] lucenenet git commit: Fixing possible NRE
Date Mon, 29 Dec 2014 10:16:40 GMT
Fixing possible NRE


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

Branch: refs/heads/master
Commit: febdd0ff3a2ef0d60ed48fe47ea828d7f923a74c
Parents: 6cfc4fe
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Mon Dec 29 12:11:43 2014 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Mon Dec 29 12:11:43 2014 +0200

----------------------------------------------------------------------
 .../Util/TestRuleSetupAndRestoreClassEnv.cs                        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/febdd0ff/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs b/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs
index 9ee5c68..8acaee8 100644
--- a/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs
+++ b/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs
@@ -251,7 +251,7 @@ namespace Lucene.Net.Util
                     return; // ignore test points!
                 }
                 string name;
-                if (Thread.CurrentThread.Name.StartsWith("TEST-"))
+                if (Thread.CurrentThread.Name != null && Thread.CurrentThread.Name.StartsWith("TEST-"))
                 {
                     // The name of the main thread is way too
                     // long when looking at IW verbose output...


Mime
View raw message