From: Nina J. <jel...@gm...> - 2010-10-16 09:11:59
|
Hi Egon, On 16 October 2010 11:58, Egon Willighagen <ego...@gm...>wrote: > Hi Nina, Tobias, > > On Sat, Oct 16, 2010 at 10:27 AM, Nina Jeliazkova > <jel...@gm...> wrote: > > ----------- Fixed ------- > > public boolean hasNext() { > > if (!nextAvailableIsKnown) { > > hasNext = false; > > > > // now try to parse the next Molecule > > try { > > if ((currentLine = input.readLine()) != null) { > > currentFormat = > > (IChemFormat)MDLV2000Format.getInstance(); > > StringBuffer buffer = new StringBuffer(); > > while (currentLine != null && !currentLine.equals("M > > END")) { > > I have heard of similar things here... isReady() can indeed mean that > the stream does not ended yet, I am not sure if this is a valid behaviour or a restlet bug, but it is good to have a workaround. http://download.oracle.com/javase/1.4.2/docs/api/java/io/InputStreamReader.html#ready%28%29 > but that there currently is no byte > ready... (e.g. network lag)... readLine() is likely blocking, but > makes perfect sense. > Yes, readLine() is blocking (that's why it works actually ) > > Nina, please convert this into a git patch. > OK. > > All: any clue for a unit test here? I do not... I think this fix will > go into the library without unit test... if someone does come up with > one, we can always add that later... > I can provide a test, but it includes restlet.org dependency and reading from online resources, which might not be good options for the CDK build. Nina > > Egon > > -- > Dr E.L. Willighagen > Homepage: http://egonw.github.com/ > LinkedIn: http://se.linkedin.com/in/egonw > Blog: http://chem-bla-ics.blogspot.com/ > PubList: http://www.citeulike.org/user/egonw/tag/papers > > > ------------------------------------------------------------------------------ > Download new Adobe(R) Flash(R) Builder(TM) 4 > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > Flex(R) Builder(TM)) enable the development of rich applications that run > across multiple browsers and platforms. Download your free trials today! > http://p.sf.net/sfu/adobe-dev2dev > _______________________________________________ > Cdk-devel mailing list > Cdk...@li... > https://lists.sourceforge.net/lists/listinfo/cdk-devel > |