Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @ 25:5ec116ba7d71
When single character use faster version of indexOf(<char>)
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 20 Oct 2016 16:58:20 +0200 (2016-10-20) |
parents | a27ee2cb14a0 |
children | 7e0d71a22677 c2bf983dc79b |
comparison
equal
deleted
inserted
replaced
24:0a0807113962 | 25:5ec116ba7d71 |
---|---|
206 if (debug) { | 206 if (debug) { |
207 try { | 207 try { |
208 String fname = props.getProperty("logfile", "monet_" + | 208 String fname = props.getProperty("logfile", "monet_" + |
209 System.currentTimeMillis() + ".log"); | 209 System.currentTimeMillis() + ".log"); |
210 File f = new File(fname); | 210 File f = new File(fname); |
211 int ext = fname.lastIndexOf("."); | 211 int ext = fname.lastIndexOf('.'); |
212 if (ext < 0) ext = fname.length(); | 212 if (ext < 0) ext = fname.length(); |
213 String pre = fname.substring(0, ext); | 213 String pre = fname.substring(0, ext); |
214 String suf = fname.substring(ext); | 214 String suf = fname.substring(ext); |
215 | 215 |
216 for (int i = 1; f.exists(); i++) { | 216 for (int i = 1; f.exists(); i++) { |