Skip to content

Commit 1175afb

Browse files
committed
Merge pull request #16
* updated to version 1.2.6 * updated readme and CHANGELOG.txt * format code
1 parent 1841671 commit 1175afb

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.2.6 - 12 Nov 2018
2+
- Merged pull request https://github.com/blueconic/browscap-java/pull/16.
3+
Reduce dependencies by leveraging commons-csv.
4+
Startup performance is not affected.
5+
16
1.2.5 - 21 Sept 2018
27
- Merged pull request https://github.com/blueconic/browscap-java/pull/14.
38
It is now possible to supply your own BrowsCap ZIP file as file input stream in the constructor.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Add this to the dependencies in your pom.xml.
4242
<dependency>
4343
<groupId>com.blueconic</groupId>
4444
<artifactId>browscap-java</artifactId>
45-
<version>1.2.5</version>
45+
<version>1.2.6</version>
4646
</dependency>
4747
```
4848

src/main/java/com/blueconic/browscap/impl/UserAgentFileParser.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public static UserAgentParser parse(final Reader input, final Collection<BrowsCa
6161
private UserAgentParser parse(final Reader input) throws IOException, ParseException {
6262

6363
final List<Rule> rules = new ArrayList<>();
64-
CSVFormat format = CSVFormat.DEFAULT.withSkipHeaderRecord();
64+
final CSVFormat format = CSVFormat.DEFAULT.withSkipHeaderRecord();
6565
try (CSVParser records = format.parse(input)) {
66-
for (CSVRecord record : records) {
66+
for (final CSVRecord record : records) {
6767
final Rule rule = getRule(record);
6868
if (rule != null) {
6969
rules.add(rule);
@@ -113,7 +113,7 @@ private static String normalizePattern(final String pattern) {
113113
return lowerCase;
114114
}
115115

116-
private Map<BrowsCapField, String> getBrowsCapFields(CSVRecord record) {
116+
private Map<BrowsCapField, String> getBrowsCapFields(final CSVRecord record) {
117117
final Map<BrowsCapField, String> values = new EnumMap<>(BrowsCapField.class);
118118
for (final BrowsCapField field : myFields) {
119119
values.put(field, getValue(record.get(field.getIndex())));
@@ -193,7 +193,7 @@ Rule createRule(final String pattern, final Capabilities capabilities) {
193193
return new Rule(prefix, suffixArray, postfix, pattern, capabilities);
194194
}
195195

196-
private Rule getWildCardRule() {
196+
private Rule getWildCardRule() {
197197
// The default match all pattern
198198
final Map<BrowsCapField, String> fieldValues = new EnumMap<>(BrowsCapField.class);
199199
for (final BrowsCapField field : myFields) {

0 commit comments

Comments
 (0)