[stringtemplate-interest] bug: Colon as dir separator doesn't work on Windows

Nicola Musatti Nicola.Musatti at objectway.it
Fri Oct 23 06:15:53 PDT 2009


Hallo,
I had a mysterious bug where I kept receiving messages as the following:

StringTemplate: no such group file JavaTemplate.stg

when my template group files were stored on a different drive from the 
one I was running my program from. I tracked it down to PathGroupLoader 
expecting colons as separators. Note that I only have a single directory 
in my path, but as the drive letter gets split away, my template files 
are only found when they are on the current drive.

A possible fix would be to use java.io.File.pathSeparator instead of a 
literal ":".

Cheers,
Nicola Musatti

P.S. I'm aware that PathGroupLoader works according to its specs, it's 
the specs that are broken :-)

-- 
La presente comunicazione potrebbe contenere informazioni riservate e/o protette
da segreto professionale ed e' indirizzata esclusivamente ai destinatari della
medesima qui indicati. Se avete ricevuto per errore la presente comunicazione,
siete invitati a segnalarcelo, rispondendo a questo stesso indirizzo di e-mail,
e a cancellare il presente messaggio dal Vostro sistema. E' strettamente proibito
e potrebbe essere fonte di violazione di legge qualsiasi uso, comunicazione, copia
o diffusione dei contenuti di questa comunicazione da parte di chi la abbia
ricevuta per errore o in violazione degli scopi della presente.
Il messaggio e' stato analizzato alla ricerca di virus o contenuti pericolosi
ed e' risultato NON infetto.



More information about the stringtemplate-interest mailing list