×
Namespaces

Variants
Actions

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

From Nokia Developer 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 09:05.
83 page views in the last 30 days.
×