Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 12:03, 23 August 2007.

KIJ000558 - Class inheriting from Canvas should not implement a method called update()

From Forum Nokia Wiki


Class inheriting from Canvas should not implement a method called update()
KIJ000558
Overview
-
Reported against
S60 2nd Edition and FP1, FP2, FP3
S60 3rd Edition
Category
Java
Subcategory
MIDP 1.0 and 2.0
Date identified
January 25, 2007
Symptoms
-
Detailed 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.
How to reproduce
-
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.
Related Discussions
Thread Thread Starter Forum Replies Last Post
Set Wallpaper geekzy Mobile Java Media (Graphics & Sounds) 10 2006-09-26 08:51
Updating a List with deviceDiscovered adamzieba Mobile Java General 0 2007-07-21 10:49
Drawing into CAknDialog? Juggle4Evr1 Symbian User Interface 1 2003-07-07 10:14
When to call virtual method in base class rossj1 General Symbian C++ 1 2004-03-16 08:42
Using the whole CANVAS pat4nadia Mobile Java General 1 2004-02-21 14:44
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZKnowledgeBaseContentQ
     qfnZtypeQUqfnTypeZKnownIssueQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX