From f49e3fcacfa5d52f28410bc5010312be025498fd Mon Sep 17 00:00:00 2001 From: jhugunin Date: Wed, 15 Jan 2003 05:06:13 +0000 Subject: [PATCH] invokestatic should be used on private static methods, not invokespecial --- weaver/src/org/aspectj/weaver/bcel/Utility.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/Utility.java b/weaver/src/org/aspectj/weaver/bcel/Utility.java index 5fb2c5a59..fde58e127 100644 --- a/weaver/src/org/aspectj/weaver/bcel/Utility.java +++ b/weaver/src/org/aspectj/weaver/bcel/Utility.java @@ -59,10 +59,10 @@ public class Utility { short kind; if (signature.isInterface()) { kind = Constants.INVOKEINTERFACE; - } else if (signature.isPrivate() || signature.getName().equals("")) { - kind = Constants.INVOKESPECIAL; } else if (signature.isStatic()) { kind = Constants.INVOKESTATIC; + } else if (signature.isPrivate() || signature.getName().equals("")) { + kind = Constants.INVOKESPECIAL; } else { kind = Constants.INVOKEVIRTUAL; } @@ -112,10 +112,10 @@ public class Utility { short kind; if (newMethod.isInterface()) { kind = Constants.INVOKEINTERFACE; - } else if (newMethod.isPrivate() || newMethod.getName().equals("")) { - kind = Constants.INVOKESPECIAL; } else if (newMethod.isStatic()) { kind = Constants.INVOKESTATIC; + } else if (newMethod.isPrivate() || newMethod.getName().equals("")) { + kind = Constants.INVOKESPECIAL; } else { kind = Constants.INVOKEVIRTUAL; } @@ -139,10 +139,10 @@ public class Utility { short kind; if (m.getEnclosingClass().isInterface()) { kind = Constants.INVOKEINTERFACE; - } else if (m.isPrivate() || m.getName().equals("")) { - kind = Constants.INVOKESPECIAL; } else if (m.isStatic()) { kind = Constants.INVOKESTATIC; + } else if (m.isPrivate() || m.getName().equals("")) { + kind = Constants.INVOKESPECIAL; } else { kind = Constants.INVOKEVIRTUAL; } -- 2.39.5