commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor G." <igl...@yahoo.com>
Subject [PATCH] commons-collections ExtendedProperties class "include" feature enhancement
Date Sun, 16 Mar 2003 03:26:46 GMT
This patch includes 2 enhancements:
1. When ExtendedProperties class  initialized with with ExtendedProperties()
constructor, it does not allow to include files, because basePath has not been
initialized and corrupted file name by prepending word "null" in fron of such
name.

2. Added abiltiy to include "resources" from the classpath, not only files.
This is very useful inside EJB container, especially that EJB specification
does not allow access filesystem directly.

here is a patch:

374d373
<         basePath="";
512,513c511,512
<                         InputStream resInclude =
this.getClass().getResourceAsStream( value );
<                         if ( resInclude != null ) {
---
>                         
>                         if (value.startsWith(fileSeparator))
514,515d512
<                             this.load( resInclude );
<                         } else if (value.startsWith(fileSeparator))

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message