[stringtemplate-interest] bug in org.antlr.stringtemplate.StringTemplate.removeAttribute(String)

Terence Parr parrt at cs.usfca.edu
Tue Mar 25 15:14:50 PDT 2008


thanks...added bug:

http://www.antlr.org:8888/browse/ST-37

Ter
On Mar 25, 2008, at 4:05 AM, Harry wrote:
> Hi,
>
> I spotted a little bug in the method
>
> org.antlr.stringtemplate.StringTemplate.removeAttribute(String)
>
> when "attributes" is null, a NullPointerException is called. In  
> other places of
> the code
> a check is made to verify if "attributes" is null or not. In my  
> opinion, when
> "attributes"
> is null, nothing should occur, so I would write :
>
>  if (attributes != null) attributes.remove(name);
>
> instead of
>
>  attributes.remove(name);
>
> Best regards,
>
>                                                       Harry Karadimas
> ______________________________________________________________________
> Dr Harry Karadimas  Medecin Ingenieur
> resp. Recherche et Developpement, Administration Wintel
> Departement d'Information Hospitalier (DIH)
> C.H.U. Albert Chenevier - Henri Mondor
> 51, av. du Marechal de Lattre de Tassigny               94010  CRETEIL
> tel : (00 33 1) 49 81 21 79                fax : (00 33 1) 49 81 27 08
> secr.: (00 33 1) 49 81 23 82         m.el.:harry.karadimas at hmn.aphp.fr
>
>
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list