Issue Details (XML | Word | Printable)

Key: SPR-1056
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Juergen Hoeller
Reporter: Artur Wronski
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Spring Framework

XmlBeanFactory hasn't got constructor with FileInputStream parameter

Created: 18/Jun/05 04:34 AM   Updated: 15/Feb/08 07:16 AM   Resolved: 20/Jun/05 03:19 PM
Component/s: SpringDOC
Affects Version/s: 1.2.1
Fix Version/s: 1.2.2

Time Tracking:
Not Specified


 Description  « Hide

In the manual (page 17) there is example:

InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory = new XmlBeanFactory(is);

There isn't such constructor for XmlBeanFactory.
It should look like that:

InputStream is = new FileInputStream("beans.xml");
XmlBeanFactory factory=new XmlBeanFactory(new InputStreamResource(is));



Juergen Hoeller added a comment - 20/Jun/05 03:19 PM

Thanks for spotting this - fixed!

Juergen


Brett Randall added a comment - 12/Feb/08 01:18 PM

Looks like this issue needs to be reopened. The example is still there (now on page 39 of the PDF under 2.5.1) with the wrong constructor arg (InputStream).

Thanks,
Brett


Juergen Hoeller added a comment - 15/Feb/08 07:16 AM

Indeed - thanks for spotting this! I've fixed this for 2.5.2 and 2.0.9.

Juergen