Bug 452525

Summary: JNLP PersitenceService does not trigger FileNotFoundException as the documented on the API
Product: [Fedora] Fedora Reporter: Robert Marcano <robert>
Component: java-1.6.0-openjdkAssignee: Joshua Sumali <jsumali>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: langel, lkundrak, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-15 15:52:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Marcano 2008-06-23 15:12:48 UTC
Description of problem:

The JNLP javadoc says that when retrieving the contents of a file, it must
trigger a FileNotFoundException if the store is not found, the current NetX
implementation return a dummy FileContents that later trigger the
FileNotFoundException when calling getInputStream(). This cause problems with
code that check if the store is created with the PersitenceService>>get() method
before calling getInputStream()

http://java.sun.com/products/javawebstart/1.0.1/javadoc/javax/jnlp/PersistenceService.html#get(java.net.URL)


Version-Release number of selected component (if applicable):
java-1.6.0-openjdk-1.6.0.0-0.15.b09.fc9.i386

Steps to Reproduce:
1.Clear all netx cache and .netx directory
2.Call PersistenceService>>get()
3.It must signal a FileNotFoundException because never has been created a
persistence store
  
Actual results:
No exception is thrown calling PersistenceService>>get(), only after calling
getInputStream()

Caused by: java.io.FileNotFoundException: [path to file here] (No such file or
directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at
net.sourceforge.jnlp.services.XFileContents.getInputStream(XFileContents.java:68)
	... 20 more

Expected results:
FileNotFoundException when calling PersistenceService>>get() if the store has
not been created

Comment 1 Joshua Sumali 2008-06-27 17:05:03 UTC
Hi,

Thanks for reporting this bug. It has been fixed in the IcedTea repository.

Comment 2 Robert Marcano 2008-06-27 17:45:46 UTC
thanks to you for the fix, I still have a few other bugs that I am investigating
workarounds in our application. I will report them after developing a few testcases

Comment 3 Lillian Angel 2008-07-15 15:52:41 UTC
Updated in rawhide, will be in soon.