[OSM-dev] First JOSM patch

Sander Hoentjen sander at hoentjen.eu
Sat Apr 21 21:30:51 BST 2007

On Sat, 2007-04-21 at 20:35 +0200, Frederik Ramm wrote:
> Hi Sander & all others with JOSM patches,
> > Since I got no reply, I am wondering where i should submit this patch.
> > Does anyone have any pointers?
> Imi, the original JOSM author and maintainer of the JOSM SVN, is quite 
> busy ATM. However I've talked him into granting me commit access to his 
> SVN a few days ago, and have been introduced to the build automatism 
> etc., and I'll start checking and commiting the patches that have been 
> posted here. I'll be the interim JOSM maintainer until Imi takes over 
> again. I'll announce new versions on talk, and regularly check the JOSM 
> trac at josm.eigenheimstrasse.de.
> If anyone has patches for JOSM, you can send them to me directly. (Don't 
> resend stuff that was already on this list, I have saved and prepared 
> them for inclusion already.)
> Concerning your particular patch, I wanted to test whether this really 
> is a bug but haven't found a way how one can change one's OSM password 
> to one of the right length ;-) I might have to set up a new account for 
> that.

Ok, please let me know if you have any issues with the patch. Anyway if
you think logically:
You call the function encode(String s)
say String s is of length 5
it goes into for loop
first run it takes the first 3 letters, second run the last 2
this means "int l" will be 2
this in turn means that the 3th out.append line will run the
"true-part" (l>1), which is:
enc.charAt((buf.charAt(1) & 0x0f) << 2 | (buf.charAt(2) & 0xc0) >> 6)
since buf is of length 2, there is no buf.charAt(2)
my patch checks for this condition.

Thanks for the reply anyway, and i will wait patiently :)


More information about the dev mailing list