comparison src/org/tmatesoft/hg/internal/LineReader.java @ 624:507602cb4fb3

FIXMEs and TODOs: pay some technical debt
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 20 May 2013 20:34:33 +0200
parents 8cbc2a883d95
children 6526d8adbc0f
comparison
equal deleted inserted replaced
623:fedc54356091 624:507602cb4fb3
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.internal; 17 package org.tmatesoft.hg.internal;
18 18
19 import static org.tmatesoft.hg.util.LogFacility.Severity.Warn;
20
21 import java.io.BufferedReader; 19 import java.io.BufferedReader;
22 import java.io.File; 20 import java.io.File;
23 import java.io.FileInputStream; 21 import java.io.FileInputStream;
24 import java.io.FileReader; 22 import java.io.FileReader;
25 import java.io.IOException; 23 import java.io.IOException;
27 import java.io.Reader; 25 import java.io.Reader;
28 import java.nio.charset.Charset; 26 import java.nio.charset.Charset;
29 import java.util.Collection; 27 import java.util.Collection;
30 28
31 import org.tmatesoft.hg.repo.HgInvalidFileException; 29 import org.tmatesoft.hg.repo.HgInvalidFileException;
32 import org.tmatesoft.hg.repo.ext.MqManager;
33 import org.tmatesoft.hg.util.LogFacility; 30 import org.tmatesoft.hg.util.LogFacility;
34 31
35 /** 32 /**
36 * Handy class to read line-based configuration files 33 * Handy class to read line-based configuration files
37 * 34 *
123 } 120 }
124 } 121 }
125 } catch (IOException ex) { 122 } catch (IOException ex) {
126 throw new HgInvalidFileException(ex.getMessage(), ex, file); 123 throw new HgInvalidFileException(ex.getMessage(), ex, file);
127 } finally { 124 } finally {
128 if (statusFileReader != null) { 125 new FileUtils(log).closeQuietly(statusFileReader);
129 try {
130 statusFileReader.close();
131 } catch (IOException ex) {
132 log.dump(MqManager.class, Warn, ex, null);
133 }
134 }
135 // try { 126 // try {
136 // consumer.end(file, paramObj); 127 // consumer.end(file, paramObj);
137 // } catch (IOException ex) { 128 // } catch (IOException ex) {
138 // log.warn(MqManager.class, ex, null); 129 // log.warn(getClass(), ex, null);
139 // } 130 // }
140 } 131 }
141 } 132 }
142 } 133 }