5235N/A/*
5235N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5235N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5235N/A *
5235N/A * This code is free software; you can redistribute it and/or modify it
5235N/A * under the terms of the GNU General Public License version 2 only, as
5235N/A * published by the Free Software Foundation.
5235N/A *
5235N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5235N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5235N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5235N/A * version 2 for more details (a copy is included in the LICENSE file that
5235N/A * accompanied this code).
5235N/A *
5235N/A * You should have received a copy of the GNU General Public License version
5235N/A * 2 along with this work; if not, write to the Free Software Foundation,
5235N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5235N/A *
5235N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5235N/A * or visit www.oracle.com if you need additional information or have any
5235N/A * questions.
5235N/A */
5235N/A
5235N/A/*
5235N/A * @test
5235N/A * @bug 7122740
5235N/A * @summary Tests just a benchmark of PropertyDescriptor(String, Class) performance
5235N/A * @author Sergey Malenkov
5235N/A * @run main/manual Test7122740
5235N/A */
5235N/A
5235N/Aimport java.beans.PropertyDescriptor;
5235N/A
5235N/Apublic class Test7122740 {
5235N/A public static void main(String[] args) throws Exception {
5235N/A long time = System.nanoTime();
5235N/A for (int i = 0; i < 1000; i++) {
5235N/A new PropertyDescriptor("name", PropertyDescriptor.class);
5235N/A new PropertyDescriptor("value", Concrete.class);
5235N/A }
5235N/A time -= System.nanoTime();
5235N/A System.out.println("Time (ms): " + (-time / 1000000));
5235N/A }
5235N/A
5235N/A public static class Abstract<T> {
5235N/A private T value;
5235N/A public T getValue() {
5235N/A return this.value;
5235N/A }
5235N/A public void setValue(T value) {
5235N/A this.value = value;
5235N/A }
5235N/A }
5235N/A
5235N/A private static class Concrete extends Abstract<String> {
5235N/A }
5235N/A}