inheritance

Overriding default accessor method across different classloaders breaks polymorphism

Hello. I come across to a strange behavior while trying to override a method with default accessor (ex: void run()). According to Java spec, a class can use or override default members of base class if classes belongs to the same package. Everything works correctly while all classes loaded from the same classloader. But if I try to load...

Django model inheritance: create sub-instance of existing instance (downcast)?

Hi, I'm trying to integrate a 3rd party Django app that made the unfortunate decision to inherit from django.contrib.auth.models.User, which is a big no-no for pluggable apps. Quoting Malcolm Tredinnick: More importantly, though, just as in Python you cannot "downcast" with Django's model inheritance. That is, if you've already cr...