diff -r d382dacfd73f -r f73c1a0234fb rt/emul/compact/src/main/java/java/lang/System.java --- a/rt/emul/compact/src/main/java/java/lang/System.java Tue Feb 26 16:54:16 2013 +0100 +++ b/rt/emul/compact/src/main/java/java/lang/System.java Mon Oct 07 14:20:58 2013 +0200 @@ -17,6 +17,8 @@ */ package java.lang; +import org.apidesign.bck2brwsr.core.JavaScriptBody; + /** Poor man's re-implementation of most important System methods. * * @author Jaroslav Tulach @@ -33,4 +35,31 @@ return org.apidesign.bck2brwsr.emul.lang.System.currentTimeMillis(); } + public static int identityHashCode(Object obj) { + return obj.defaultHashCode(); + } + + public static String getProperty(String name) { + return null; + } + + public static String getProperty(String key, String def) { + return def; + } + + /** + * Returns the system-dependent line separator string. It always + * returns the same value - the initial value of the {@linkplain + * #getProperty(String) system property} {@code line.separator}. + * + *

On UNIX systems, it returns {@code "\n"}; on Microsoft + * Windows systems it returns {@code "\r\n"}. + */ + public static String lineSeparator() { + return "\n"; + } + + @JavaScriptBody(args = { "exitCode" }, body = "window.close();") + public static void exit(int exitCode) { + } }