Skip to content

Commit

Permalink
Have Runtime return values rather than throwing for the no-op GWT ver…
Browse files Browse the repository at this point in the history
…sion.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130810651
  • Loading branch information
concavelenz authored and brad4d committed Aug 22, 2016
1 parent 71dbd71 commit afb4a02
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -19,14 +19,14 @@
/** GWT compatible no-op replacement for {@code Runtime} */
public class Runtime {
public static Runtime getRuntime() {
throw new UnsupportedOperationException("Runtime.getRuntime not implemented");
return new Runtime();
}

public long totalMemory() {
throw new UnsupportedOperationException("Runtime.totalMemory not implemented");
return 0;
}

public long freeMemory() {
throw new UnsupportedOperationException("Runtime.freeMemory not implemented");
return 0;
}
}

0 comments on commit afb4a02

Please sign in to comment.