You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Andre Schild <A....@aarboard.ch> on 2003/12/31 12:48:56 UTC

2. [VFS] Problem with usage of HashMap

Has anyone had time to look at this issue ?

André

In the class AbstractFileSystem then list of files is stored in a HashMap. 

Unfortunaly this HashMap causes problems, depending on the filenames 
present in the directory. 

We encountered the problem in a directory who contains the filenames "i0.png" and "gn.png".
When we make the two Strings and look at the HashCode, then we see that they 
 return the same value.

String f1= new String("i0.png");
System.out.println(f1);
String f2= new String("gn.png");
System.out.println(f2.hashCode());


Those filenames are a small subset of the country flags of the awstats.sourceforge.net project.


I have reported it as a defect in scarab.

http://nagoya.apache.org:8080/scarab/issues/id/JAKA22 

André

aarboard ag
internet - networks - screen&print design - multimedia
Egliweg 10 - Postfach 214 - CH-2560 Nidau (Switzerland)
Phone +41 32 332 9714 - Fax +41 32 332 9715
www.aarboard.ch - a.schild@aarboard.ch 


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



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


Re: 2. [VFS] Problem with usage of HashMap

Posted by steve cohen <sc...@javactivity.org>.
Can you summarize your issue?  Scarab won't let me see anything even after I 
registered.  And the URL you provided doesn't work.

On Wednesday 31 December 2003 05:48 am, Andre Schild wrote:
> Has anyone had time to look at this issue ?
>
> André
>
> In the class AbstractFileSystem then list of files is stored in a HashMap.
>
> Unfortunaly this HashMap causes problems, depending on the filenames
> present in the directory.
>
> We encountered the problem in a directory who contains the filenames
> "i0.png" and "gn.png". When we make the two Strings and look at the
> HashCode, then we see that they return the same value.
>
> String f1= new String("i0.png");
> System.out.println(f1);
> String f2= new String("gn.png");
> System.out.println(f2.hashCode());
>
>
> Those filenames are a small subset of the country flags of the
> awstats.sourceforge.net project.
>
>
> I have reported it as a defect in scarab.
>
> http://nagoya.apache.org:8080/scarab/issues/id/JAKA22
>
> André
>
> aarboard ag
> internet - networks - screen&print design - multimedia
> Egliweg 10 - Postfach 214 - CH-2560 Nidau (Switzerland)
> Phone +41 32 332 9714 - Fax +41 32 332 9715
> www.aarboard.ch - a.schild@aarboard.ch
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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