diff options
author | Jean-Marie Henaff <jmhenaff@google.com> | 2014-12-01 09:14:52 +0100 |
---|---|---|
committer | Jean-Marie Henaff <jmhenaff@google.com> | 2014-12-01 13:53:30 +0100 |
commit | f9f8bef0b5a7b34e261c07677e07232570fd393d (patch) | |
tree | 024630d73466f2052fe1a984cb6970fc53946608 /core-stubs-mini/src | |
parent | 75d24293b664edbcf73f24c0ad1d2160e643594e (diff) | |
download | toolchain_jack-f9f8bef0b5a7b34e261c07677e07232570fd393d.tar.gz toolchain_jack-f9f8bef0b5a7b34e261c07677e07232570fd393d.tar.bz2 toolchain_jack-f9f8bef0b5a7b34e261c07677e07232570fd393d.zip |
Update core-stubs-mini with API needed by try-with-resources
Change-Id: I66b414bde9d288b605f45e4026d034dbf8c60831
Diffstat (limited to 'core-stubs-mini/src')
-rw-r--r-- | core-stubs-mini/src/java/lang/AutoCloseable.java | 21 | ||||
-rw-r--r-- | core-stubs-mini/src/java/lang/Throwable.java | 8 |
2 files changed, 29 insertions, 0 deletions
diff --git a/core-stubs-mini/src/java/lang/AutoCloseable.java b/core-stubs-mini/src/java/lang/AutoCloseable.java new file mode 100644 index 00000000..1e79851e --- /dev/null +++ b/core-stubs-mini/src/java/lang/AutoCloseable.java @@ -0,0 +1,21 @@ +/* +* Copyright (C) 2014 The Android Open Source Project +* +* 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 License for the specific language governing permissions and +* limitations under the License. +*/ + +package java.lang; +public interface AutoCloseable +{ +public abstract void close() throws java.lang.Exception; +} diff --git a/core-stubs-mini/src/java/lang/Throwable.java b/core-stubs-mini/src/java/lang/Throwable.java index 8dcc67c2..5477ae58 100644 --- a/core-stubs-mini/src/java/lang/Throwable.java +++ b/core-stubs-mini/src/java/lang/Throwable.java @@ -76,4 +76,12 @@ public class Throwable implements java.io.Serializable { public java.lang.Throwable getCause() { throw new RuntimeException("Stub!"); } + + public final void addSuppressed(Throwable throwable) { + throw new RuntimeException("Stub!"); + } + + public final Throwable[] getSuppressed() { + throw new RuntimeException("Stub!"); + } } |