Community
Participate
Working Groups
From an email sent to the user's list 6/26/2003: ------------------------------------------ ajc 1.1 NPE when an aspect declares hashcode() as follows: interface Identifiable { void setId(Id id); Id getId(); } aspect IdentifiableAspect { private Id Identifiable.id = null; public Id Identifiable.getId() { return this.id; } public void Identifiable.setId(Id id) { this.id = id; } public int Identifiable.hashCode() { return (this.getId() == null) ? super.hashCode() : this.getId().hashCode(); } } A workaround for callers the compiler controls is to replace the declaration with around advice: int around(Identifiable i): target(i) && call(public int hashCode()) { return (i.getId() == null) ? proceed(i) : i.getId().hashCode(); }
*** Bug 40589 has been marked as a duplicate of this bug. ***
Raising to P2 based on second independent report of problem. I'm working on a fix.
tests and fix in tree Handle use of super inside of inter-type declaration on an interface. If the interface has more than one super interface, that is a compile-time error because super can not be resolved.
updated target milestone field to 1.1.1
*** Bug 43163 has been marked as a duplicate of this bug. ***