15d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao/*
25d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * Copyright (C) 2008 The Android Open Source Project
35d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao *
45d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * Licensed under the Apache License, Version 2.0 (the "License");
55d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * you may not use this file except in compliance with the License.
65d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * You may obtain a copy of the License at
75d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao *
85d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao *      http://www.apache.org/licenses/LICENSE-2.0
95d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao *
105d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * Unless required by applicable law or agreed to in writing, software
115d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * distributed under the License is distributed on an "AS IS" BASIS,
125d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * See the License for the specific language governing permissions and
145d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * limitations under the License.
155d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao */
165d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao
175d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao/*
185d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao * Test field access through reflection.
195d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao */
205d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhaopublic class Main {
215d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao    public static void main(String[] args) {
225d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao        try {
23b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko            Base base = new Base();
24f6c66c3348a2b64e4b6472827e31f711142006e3Kevin Brodsky            System.out.println("Succeeded unexpectedly");
255d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao        } catch (IncompatibleClassChangeError icce) {
265d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao            System.out.println("Got expected ICCE");
275d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao        }
28b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko        try {
29b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko            ExtendsFinal ef = new ExtendsFinal();
30b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko            System.out.println("Succeeded unexpectedly");
31b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko        } catch (VerifyError ve) {
32b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko            System.out.println("Got expected VerifyError");
33b43b2d8b8ad78bc02924b65f5463418c7aa76881Vladimir Marko        }
345d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao    }
355d1ac920fdaef5d4ec8f66bb734488cd9660b024jeffhao}
36