Emulate System.getProperty(key, default) by always returning the
default. This method is commonly used by parsers for establishing the
newline character, so including this makes it possible to port such code
to GWT.

Review at http://gwt-code-reviews.appspot.com/1654803


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10900 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/super/com/google/gwt/emul/java/lang/System.java b/user/super/com/google/gwt/emul/java/lang/System.java
index 333b5b2..0ebdb1c 100644
--- a/user/super/com/google/gwt/emul/java/lang/System.java
+++ b/user/super/com/google/gwt/emul/java/lang/System.java
@@ -1,12 +1,12 @@
 /*
  * Copyright 2008 Google Inc.
- * 
+ *
  * Licensed 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
@@ -95,12 +95,19 @@
 
   /**
    * Has no effect; just here for source compatibility.
-   * 
+   *
    * @skip
    */
   public static void gc() {
   }
 
+  /**
+   * Always returns default, used for source compatibility
+   */
+  public static String getProperty(String key, String def) {
+    return def;
+  }
+
   public static int identityHashCode(Object o) {
     return (o == null) ? 0 : (!(o instanceof String)) ? Impl.getHashCode(o)
         : String.HashCache.getHashCode((String) o);
@@ -137,7 +144,7 @@
    * Copy an array using native Javascript. The destination array must be a real
    * Java array (ie, already has the GWT type info on it). No error checking is
    * performed -- the caller is expected to have verified everything first.
-   * 
+   *
    * @param src source array for copy
    * @param srcOfs offset into source array
    * @param dest destination array for copy
diff --git a/user/test/com/google/gwt/emultest/java/lang/SystemTest.java b/user/test/com/google/gwt/emultest/java/lang/SystemTest.java
index dab692a..b74749b 100644
--- a/user/test/com/google/gwt/emultest/java/lang/SystemTest.java
+++ b/user/test/com/google/gwt/emultest/java/lang/SystemTest.java
@@ -275,4 +275,8 @@
       assertEquals(src[i + 1], dest[i]);
     }
   }
+
+  public void testGetProperty() {
+    assertEquals("default", System.getProperty("key", "default"));
+  }
 }