×
Namespaces

Variants
Actions

Archived:RecordStore.AUTHMODE ANY throws NullPointerException on S60 2nd Edition (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
Tested with
Devices(s): Nokia 6680, Nokia 7610
CompatibilityArticle
Created: User:Technical writer 1 (24 Jan 2008)
Last edited: hamishwillee (19 Nov 2013)

Contents

Overview

Using RecordStore.AUTHMODE_ANY in S60 2nd Edition devices throws NullPointerException.

Description

After a RecordStore has been created and the MIDlet tries to set the authorization mode to RecordStore.AUTHMODE_ANY, which defines that other MIDlet suites can have access to the record store, NullPointerException will be thrown. RecordStore.AUTHMODE_PRIVATE defines that only the MIDlet suite which has created the record store can access it.

How to reproduce

The problem can be reproduced with two RecordStore methods, openRecordStore() and setMode().

The following example uses the openRecordStore() method:

RecordStore store;
....
 
try {
store = RecordStore.openRecordStore("TestStore", true, RecordStore.AUTHMODE_ANY, true);
 
if (store!=null)
display.setCurrent(new TextBox("New database", "Database created", 100, TextField.ANY))
 
}
catch (Exception exception) {
display.setCurrent(new TextBox("Failure", exception.toString(), 100, TextField.ANY));
}
 
}

Solution

This problem has been corrected in S60 3rd Edition.

This page was last modified on 19 November 2013, at 09:39.
65 page views in the last 30 days.