From: <ha...@us...> - 2006-11-22 17:03:35
|
Revision: 6289 http://svn.sourceforge.net/jmol/?rev=6289&view=rev Author: hansonr Date: 2006-11-22 09:01:17 -0800 (Wed, 22 Nov 2006) Log Message: ----------- actually, JME file reading was already disabled; this re-enables it. Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java Modified: trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2006-11-22 16:51:05 UTC (rev 6288) +++ trunk/Jmol/src/org/jmol/adapter/smarter/Resolver.java 2006-11-22 17:01:17 UTC (rev 6289) @@ -96,8 +96,12 @@ throws Exception { String[] lines = new String[16]; LimitedLineReader llr = new LimitedLineReader(bufferedReader, 16384); - for (int i = 0; i < lines.length; ++i) + int nLines = 0; + for (int i = 0; i < lines.length; ++i) { lines[i] = llr.readLineWithNewline(); + if (lines[i].length() > 0) + nLines++; + } if (checkV3000(lines)) return "V3000"; if (checkMol(lines)) @@ -142,7 +146,7 @@ } } - if (lines[1] == null && lines[0] != null && lines[0].length() > 0 + if (nLines == 1 && lines[0].length() > 0 && Character.isDigit(lines[0].charAt(0))) return "Jme"; //only one line, and that line starts with a number This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |