• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • MicroEmulator
  • Bugs

MIDlet.getAppProperty throws exception for missing JAD prop

Brought to you by: barteo, vlads
This project can now be found here.
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Tickets ▾
    • Patches
    • Bugs
    • Feature Requests
  • Discussion
  • Donate
  • Code
  • Cvs
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • Target: 2.0.1
  • Target: 2.0.3
  • Target: 2.0.4
  • v2.x.x-SNAPSHOT

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#104 MIDlet.getAppProperty throws exception for missing JAD prop

open
nobody
None
5
2009-08-19
2009-08-19
Nick Richards
No

Running the August 18 2009 v3.0.0 SNAPSHOT emulator locally on the apps/microemu-demo.jad "java -jar microemulator.jar -Xautotest:http://localhost:8000/microemu-demo.jad" with JRE 1.6.0_13 where the JAD is modified to point "MIDlet-Jar-URL: http://localhost:8000/microemu-demo.jar" and using a local web server on Mac OSX 10.5 "python -m SimpleHTTPServer" in the apps/ folder the emulator throws:

java.lang.IllegalArgumentException: microemu.accessible.host
at java.util.jar.Attributes$Name.<init>(Attributes.java:447)
at java.util.jar.Attributes.getValue(Attributes.java:99)
at org.microemu.util.JadProperties.getProperty(JadProperties.java:118)
at org.microemu.util.JadProperties.getProperty(JadProperties.java:127)
at org.microemu.app.Common.getAppProperty(Common.java:169)
at org.microemu.MIDletBridge.getAppProperty(MIDletBridge.java:127)
at javax.microedition.midlet.MIDlet.getAppProperty(MIDlet.java:84)
at org.microemu.midp.examples.simpledemo.HTTPPanel.<init>(HTTPPanel.java:65)
at org.microemu.midp.examples.simpledemo.SimpleDemoMIDlet.startApp(SimpleDemoMIDlet.java:67)
at javax.microedition.midlet.MIDlet$MIDletAccessor.startApp(MIDlet.java:49)
at org.microemu.app.Common.startMidlet(Common.java:428)
at org.microemu.app.Common.access$200(Common.java:94)
at org.microemu.app.Common$1.run(Common.java:301)

This exception should not be thrown by getAppProperty.

http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/midlet/MIDlet.html#getAppProperty%28java.lang.String%29

A missing JAD property, in this case "microemu.accessible.host", should result in getAppProperty returning a null String.

Further, Sun says a NullPointerException will be thrown by getAppProperty when the parameter passed into the method is null. I believe Sun should have thrown an IllegalArgumentException here.

MicroEmulator's getAppProperty should return a null String.

Discussion

  • Bartek Teodorczyk

    Bartek Teodorczyk - 2009-11-18

    Issue item has been moved to http://code.google.com/p/microemu/issues/detail?id=12

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×