SLDTransformer unable to generate NamedStyle elements -----------------------------------------------------
Key: GEOT-1165 URL: http://jira.codehaus.org/browse/GEOT-1165 Project: GeoTools Issue Type: Bug Components: core main Affects Versions: 2.4.0 Environment: Linux gumbi 2.6.19-1.2911.fc6 #1 SMP Sat Feb 10 15:51:47 EST 2007 i686 i686 i386 GNU/Linux java version "1.5.0_11" svn At revision 24494 Reporter: raif Assigned To: James Macgill Fix For: 2.4.0 Attachments: gt2-main-20070219.patch the following JUnit test fails on the Trunk (svn At revision 24494) with an NPE: public void testSLDEncoder3() throws TransformerException { StyledLayerDescriptor sld = new StyledLayerDescriptorImpl(); NamedLayer namedLayer = new NamedLayerImpl(); namedLayer.setName("named-layer"); Style style = new NamedStyleImpl(); style.setName("named-style"); namedLayer.addStyle(style); sld.addStyledLayer(namedLayer); SLDTransformer sldTransformer = new SLDTransformer(); sldTransformer.setIndentation(3); String sldAsXML = sldTransformer.transform(sld); System.out.println("SLD: " + sldAsXML); } the attached patch essentially allows the transformer to generate the proper Style (NamedStyle and UserStyle) elements rather than always creating UserStyle elements which the current visit() method does. cheers; rsn -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel