From: Jules K. <J.K...@cm...> - 2010-07-09 10:24:54
|
Hello CDK developers, I believe I found a minor 'bug' in the org.openscience.cdk.layout.TemplateHandler class. I came across this when using the StructureDiagramGenerator. In the fragment below, I believe the println and printstacktrace (lines 115+116) should be removed in favour of the logger calls. (This is from the CDK-1.3.5 source jar from the SF pages) -- org.openscience.cdk.layout.TemplateHandler 113: } catch (Exception exc) { 114: logger.debug("Could not read templates"); 115: System.out.println("Reason: " + exc.getMessage()); 116: exc.printStackTrace(); 117: logger.debug(exc); 118: } --- suggested improvement 113: } catch (Exception exc) { 114: logger.debug("template list not available, continuing without template, reason: ", exc); 115: } This occurred because the resource "org/openscience/cdk/layout/templates/templates.list" (loaded at line 98). does not exist in the CDK jar. Does this not-existing qualify as another bug? I traced the resource, and it exists in the jchempaint package (3.0.1 source jar from sourceforge file pages). My guess is that the templates.list file should be moved to the CDK package, or the StructureDiagramGenerator should not depend on the templates being available (as is already effectively the case, the code runs without a hitch other than the error message being spewed to the terminal). Moving seems to be preferred, as the documentation indicates you use the templates to layout difficult molecules 'like adamantane'. Since I can see this is a pretty trivial fix, I'd like to learn how to fix this myself so I can just submit a patch and not bother you anymore. I tried to figure out how to work with the git or svn repository, but I'm completely new to version control (I come from the "save as numbered back-up-file" type of 'version control'). Are there any good introduction/tutorials/getting started things you'd recommend? Also: is this the proper mailing list for bugs like this? or should it go to cdk-user? Kind regards, Jules Kerssemakers |