Mercurial > projects > dwt2
diff base/src/java/util/ResourceBundle.d @ 54:70388b0e6dad
[swt lin] compiles
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 23:31:11 +0100 |
parents | 1bf55a6eb092 |
children | bbe49769ec18 |
line wrap: on
line diff
--- a/base/src/java/util/ResourceBundle.d Fri Mar 27 21:29:10 2009 +0100 +++ b/base/src/java/util/ResourceBundle.d Fri Mar 27 23:31:11 2009 +0100 @@ -147,11 +147,11 @@ } } - public bool hasString( String key ){ + public bool hasString( CString key ){ return ( key in map ) !is null; } - public String getString( String key ){ + public String getString( CString key ){ if( auto v = key in map ){ version(D_Version2){ return (*v).idup; @@ -159,7 +159,7 @@ return (*v).dup; } } - throw new MissingResourceException( "key not found", this.classinfo.name, key ); + throw new MissingResourceException( "key not found", this.classinfo.name, key._idup() ); } public String[] getKeys(){ @@ -172,7 +172,7 @@ public static ResourceBundle getBundle( ImportData data ){ return new ResourceBundle( data ); } - public static ResourceBundle getBundle( String name ){ + public static ResourceBundle getBundle( CString name ){ try{ version(Tango){ return new ResourceBundle( cast(String) File.get(name) );