Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Class inheriting from Canvas should not implement a method called update() (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
CompatibilityArticle
Created: User:Technical writer 1 (25 Jan 2007)
Last edited: hamishwillee (14 Aug 2013)

Description

If an object has Canvas as its base class and implements a method named update(), the MIDlet in question will not function properly. This affects both S60 devices as well as S60 emulators.

If this MIDlet is executed in an S60 emulator, the emulator will exit with the following error message:

java.lang.Error: ClassFormatError: Override of final method

The reason this error is is that in the Symbian Java ME implementation the method update() of class Canvas is defined to be final, and the inheriting class cannot override a final method of the base class.

Solution

A workaround is to change the name of this method to something other than "update". You can also obfuscate the MIDlet to avoid this problem.

This page was last modified on 14 August 2013, at 06:05.
376 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×