Other |
---|
tbd_minorResolved |
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) ADDITIONAL OS VERSION INFORMATION : MAC OS X 10.8.5 A DESCRIPTION OF THE PROBLEM : The "getDeclaredMethods" function should return only the methods that are declared in the input class A. However, when the modifier of the superclass of A is "abstract class" (without public), the function also returns the methods of the superclass. REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- public interface Posicion { public void obtenerCoordenadaX(); public void obtenerCoordenadaY(); } abstract class Vehiculo implements Posicion { public void obtenerCoordenadaX(){}; public void obtenerCoordenadaY(){}; } public class Coche extends Vehiculo { } import java.lang.reflect.Method; public class TestCase { public static void main(String[] args) { Class<?> clazz = Coche.class; Method[] methods = clazz.getDeclaredMethods(); } } ---------- END SOURCE ----------
|