diff -r 98ccebc37403 -r dc7c549001d5 javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java --- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java Fri May 14 15:47:24 2010 +0300 +++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java Thu May 27 12:49:31 2010 +0300 @@ -183,17 +183,23 @@ // Determine what is the of this MIDlet, // (which attribute "Nokia-MIDlet-Localized-" contains the localized // name of this MIDlet) - if ((value.getValue().indexOf(midletInfo.getName()) > -1) && - name.getValue().startsWith("MIDlet-")) + String valueStr = value.getValue(); + String nameStr = name.getValue(); + if ((valueStr.indexOf(midletInfo.getName()) > -1) && + nameStr.startsWith("MIDlet-") && + !nameStr.equals("MIDlet-Name") + ) { try { // Try to parse the rest of attribute name (after "MIDlet-") - // into an int. If this throws exception, the attribute was - // propably 'MIDlet-Name' - midletN = Integer.parseInt(name.getValue().substring(7)); + // into an int. + midletN = Integer.parseInt(nameStr.substring(7)); } - catch (NumberFormatException ne) {}; + catch (NumberFormatException ne) + { + Log.logW("Error in getting localized name: " + nameStr, ne); + } } }