Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-10-25 12:05:47 +0000
committerMarkus Keller2012-10-25 12:05:47 +0000
commit0af83c4888063f09a174eff097d23dc17e3c04fe (patch)
treee4b6368999c44913012a1e5d72b540cde159d325
parente7cce033b8f4b5a86b0c4a457d1f0abb293930e2 (diff)
downloadeclipse.platform.text-0af83c4888063f09a174eff097d23dc17e3c04fe.tar.gz
eclipse.platform.text-0af83c4888063f09a174eff097d23dc17e3c04fe.tar.xz
eclipse.platform.text-0af83c4888063f09a174eff097d23dc17e3c04fe.zip
Platform.getOS() gives an NPE if test runs outside of Eclipse
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
index 1fabeb986..89a4886fd 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
@@ -20,8 +20,6 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.eclipse.core.runtime.Platform;
-
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
import org.eclipse.jface.text.FindReplaceDocumentAdapter;
@@ -29,7 +27,7 @@ import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
/**
- * Tests the FindReplaceDocumentAdapter.
+ * Tests the FindRepla ceDocumentAdapter.
*
* @since 3.1
*/
@@ -448,7 +446,7 @@ public class FindReplaceDocumentAdapterTest extends TestCase {
public void testRegexFindStackOverflow_fail() throws Exception {
// test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=102699
- if (BUG_392594 && Platform.OS_MACOSX.equals(Platform.getOS()))
+ if (BUG_392594 && System.getProperty("os.name").indexOf("Mac") != -1)
return; // VM crash on the Mac, see https://bugs.eclipse.org/392594
FindReplaceDocumentAdapter adapter= new FindReplaceDocumentAdapter(fDocument);

Back to the top