Changeset 30738 in osm for applications/editors/josm/plugins/opendata/includes/org/apache
- Timestamp:
- 2014-10-19T01:27:04+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java
r30737 r30738 22 22 import java.io.InputStream; 23 23 import java.io.InputStreamReader; 24 import java.io.UnsupportedEncodingException;25 24 import java.util.Arrays; 26 25 import java.util.HashSet; … … 32 31 /** 33 32 * Converts the text meta-data file into a <tt>FunctionMetadataRegistry</tt> 34 * 33 * 35 34 * @author Josh Micich 36 35 */ … … 38 37 39 38 private static final String METADATA_FILE_NAME = "functionMetadata.txt"; 40 39 41 40 /** plain ASCII text metadata file uses three dots for ellipsis */ 42 41 private static final String ELLIPSIS = "..."; … … 59 58 } 60 59 61 BufferedReader br;62 try {63 br = new BufferedReader(new InputStreamReader(is,"UTF-8"));64 } catch(UnsupportedEncodingException e) {65 throw new RuntimeException(e);66 }67 60 FunctionDataBuilder fdb = new FunctionDataBuilder(400); 68 61 69 try { 62 try (BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"))) { 70 63 while (true) { 71 64 String line = br.readLine(); … … 82 75 processLine(fdb, line); 83 76 } 84 br.close();85 77 } catch (IOException e) { 86 78 throw new RuntimeException(e); … … 107 99 validateFunctionName(functionName); 108 100 // TODO - make POI use isVolatile 109 fdb.add(functionIndex, functionName, minParams, maxParams, 101 fdb.add(functionIndex, functionName, minParams, maxParams, 110 102 returnClassCode, parameterClassCodes, hasNote); 111 103 } 112 104 113 105 114 106 private static byte parseReturnTypeCode(String code) { … … 164 156 165 157 /** 166 * Makes sure that footnote digits from the original OOO document have not been accidentally 158 * Makes sure that footnote digits from the original OOO document have not been accidentally 167 159 * left behind 168 160 */ … … 182 174 return; 183 175 } 184 throw new RuntimeException("Invalid function name '" + functionName 176 throw new RuntimeException("Invalid function name '" + functionName 185 177 + "' (is footnote number incorrectly appended)"); 186 178 }
Note:
See TracChangeset
for help on using the changeset viewer.