jdk/src/share/classes/java/beans/EventSetDescriptor.java
changeset 25123 1f70b30da563
parent 14887 226dd1cda199
child 25130 adfaa02ea516
equal deleted inserted replaced
25122:1ecc464c69d2 25123:1f70b30da563
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    79              Introspector.GET_PREFIX + getListenerClassName(listenerType) + "s");
    79              Introspector.GET_PREFIX + getListenerClassName(listenerType) + "s");
    80 
    80 
    81         String eventName = NameGenerator.capitalize(eventSetName) + "Event";
    81         String eventName = NameGenerator.capitalize(eventSetName) + "Event";
    82         Method[] listenerMethods = getListenerMethods();
    82         Method[] listenerMethods = getListenerMethods();
    83         if (listenerMethods.length > 0) {
    83         if (listenerMethods.length > 0) {
    84             Class[] args = getParameterTypes(getClass0(), listenerMethods[0]);
    84             Class<?>[] args = getParameterTypes(getClass0(), listenerMethods[0]);
    85             // Check for EventSet compliance. Special case for vetoableChange. See 4529996
    85             // Check for EventSet compliance. Special case for vetoableChange. See 4529996
    86             if (!"vetoableChange".equals(eventSetName) && !args[0].getName().endsWith(eventName)) {
    86             if (!"vetoableChange".equals(eventSetName) && !args[0].getName().endsWith(eventName)) {
    87                 throw new IntrospectionException("Method \"" + listenerMethodName +
    87                 throw new IntrospectionException("Method \"" + listenerMethodName +
    88                                                  "\" should have argument \"" +
    88                                                  "\" should have argument \"" +
    89                                                  eventName + "\"");
    89                                                  eventName + "\"");