[Git][java-team/csvjdbc][master] 10 commits: New upstream version 1.0.35+ds
Mechtilde Stehmann
gitlab at salsa.debian.org
Fri Sep 13 05:44:05 BST 2019
Mechtilde Stehmann pushed to branch master at Debian Java Maintainers / csvjdbc
Commits:
6f7b560d by Mechtilde at 2019-09-09T17:59:38Z
New upstream version 1.0.35+ds
- - - - -
31b84b3d by Mechtilde at 2019-09-09T18:00:02Z
Update upstream source from tag 'upstream/1.0.35+ds'
Update to upstream version '1.0.35+ds'
with Debian dir d64b77571ad728456bf10ebf32a731d3e4719928
- - - - -
5956ad90 by Mechtilde at 2019-09-09T18:14:20Z
debian/salsa-ci.yml was added when the repo was cloned
- - - - -
a6ecc2a5 by Mechtilde at 2019-09-09T18:15:53Z
debian/compat Use compat level 12
- - - - -
26e33568 by Mechtilde at 2019-09-09T18:30:46Z
debian/copyright
Add comment to Files-Excluded in Copyright
add entry for debian/*
- - - - -
3c1a46e4 by Mechtilde at 2019-09-09T18:31:50Z
debian/control
Declare compliance with Debien Policy 4.4.0
Add Uploader
change Version of debhelper
- - - - -
ac392eec by Mechtilde at 2019-09-09T18:49:33Z
Adapt debian/changelog to new version 1.0.35+ds-1
- - - - -
26a3c6ca by Mechtilde at 2019-09-13T04:09:40Z
Add consideration of +ds to debian/watch
- - - - -
ad461cc0 by Mechtilde at 2019-09-13T04:21:45Z
Use debhelper-compat for choosing compat level
- - - - -
9ff7f947 by Mechtilde at 2019-09-13T04:36:09Z
debian/changelog - getting fit for release
- - - - -
12 changed files:
- build/build.xml
- debian/changelog
- − debian/compat
- debian/control
- debian/copyright
- + debian/salsa-ci.yml
- + debian/source/lintian-overrides
- debian/watch
- pom.xml
- src/main/java/org/relique/jdbc/csv/CsvStatement.java
- src/test/java/org/relique/jdbc/csv/TestCsvDriver.java
- + src/testdata/utf8_bom.csv
Changes:
=====================================
build/build.xml
=====================================
@@ -36,7 +36,7 @@
<!-- =================================================================== -->
<property name="TALK" value="false" />
<property name="name" value="csvjdbc"/>
- <property name="rel" value="1.0-33"/>
+ <property name="rel" value="1.0-35"/>
<property name="rel.name" value="${name}-${rel}"/>
<property name="build.dir" value="../build"/>
<property name="src.dir" value="../src"/>
=====================================
debian/changelog
=====================================
@@ -1,11 +1,25 @@
-csvjdbc (1.0.34-2ubuntu1) UNRELEASED; urgency=medium
+csvjdbc (1.0.35+ds-1) unstable; urgency=medium
+ [ Christopher Hoskin ]
* Update VCS for Salsa
* Remove get-orig-source boilerplate from rules
* Use secure URL in watch
* Add upstream metadata
- -- Christopher Hoskin <mans0954 at debian.org> Tue, 24 Jul 2018 20:14:10 +0100
+ [ Mechtilde ]
+ * New upstream version 1.0.35+ds
+ + Add ds for repacked version
+ * debian/salsa-ci.yml was added when the repo was cloned
+ * Use compat level 12
+ * Add comment to Files-Excluded in Copyright
+ + add entry for debian/*
+ * Declare compliance with Debien Policy 4.4.0
+ + Add Uploader
+ + Change Version of debhelper
+ * Add consideration of +ds to debian/watch
+ * Use debhelper-compat for choosing compat level
+
+ -- Mechtilde Stehmann <mechtilde at debian.org> Fri, 13 Sep 2019 06:35:35 +0200
csvjdbc (1.0.34-2) unstable; urgency=medium
=====================================
debian/compat deleted
=====================================
@@ -1 +0,0 @@
-11
=====================================
debian/control
=====================================
@@ -3,9 +3,10 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Christopher Hoskin <mans0954 at debian.org>
-Build-Depends: debhelper (>= 11), default-jdk, maven-debian-helper
+ , Mechtilde Stehmann <mechtilde at debian.org>
+Build-Depends: debhelper-compat (= 12), default-jdk, maven-debian-helper
Build-Depends-Indep: libjavacc-maven-plugin-java, libmaven-javadoc-plugin-java, junit4, default-jdk-doc
-Standards-Version: 4.1.4
+Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/java-team/csvjdbc.git
Vcs-Browser: https://salsa.debian.org/java-team/csvjdbc
Homepage: http://csvjdbc.sourceforge.net
=====================================
debian/copyright
=====================================
@@ -2,6 +2,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: CsvJdbc
Source: http://csvjdbc.sourceforge.net
Files-Excluded: lib/dans-dbf-lib-*.jar
+Comment: binary Java libraries
Files: *
Copyright: 2008-2011, Mario Frasca <mfrasca at users.sourceforge.net>,
@@ -11,6 +12,7 @@ License: LGPL-2.1+
Files: debian/*
Copyright: 2016-2017, Christopher Hoskin <mans0954 at debian.org>
+ 2019, Mechtilde Stehmann <mechtilde at debian.org>
License: LGPL-2.1+
License: LGPL-2.1+
=====================================
debian/salsa-ci.yml
=====================================
@@ -0,0 +1,3 @@
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
=====================================
debian/source/lintian-overrides
=====================================
@@ -0,0 +1,2 @@
+missing-build-dependency debhelper
+# Use debhelper-compat for choosing compat level
=====================================
debian/watch
=====================================
@@ -1,4 +1,5 @@
version=4
-opts="mode=git, pgpmode=none, uversionmangle=s/([\d\.]+)-([\d\.]+)/$1.$2/" \
+opts="mode=git, pgpmode=none,dversionmangle=s/\+ds$//,\
+uversionmangle=s/([\d\.]+)-([\d\.]+)/$1.$2/" \
https://git.code.sf.net/p/csvjdbc/code/ \
refs/tags/(?:v|csvjdbc-)([\d\.-]+)
=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.csvjdbc</groupId>
<artifactId>csvjdbc</artifactId>
- <version>1.0.34</version>
+ <version>1.0.35</version>
<packaging>jar</packaging>
<name>CsvJdbc</name>
<description>a Java JDBC driver for reading comma-separated-value files</description>
@@ -18,7 +18,7 @@
<scm>
<connection>scm:git:ssh://git.code.sf.net/p/csvjdbc/code</connection>
- <tag>csvjdbc-1.0.34</tag>
+ <tag>csvjdbc-1.0.35</tag>
<url>http://sourceforge.net/p/csvjdbc/_list/git</url>
</scm>
=====================================
src/main/java/org/relique/jdbc/csv/CsvStatement.java
=====================================
@@ -426,6 +426,32 @@ public class CsvStatement implements Statement
input = new LineNumberReader(tableReader.getReader(this, tableName));
}
+ String charset = connection.getCharset();
+ if (charset != null)
+ {
+ if (charset.equalsIgnoreCase("UTF-8"))
+ {
+ /*
+ * Microsoft Windows programs write the Byte Order Mark
+ * (BOM) 0xEF 0xBB 0xBF at the start of UTF-8 text files.
+ *
+ * Java does not support this and returns these three
+ * bytes as first bytes in the file, so we have to skip
+ * them manually, if they exist.
+ */
+ input.mark(1);
+ int bom = input.read();
+ if (bom != 0xFEFF)
+ {
+ /*
+ * First character is not a BOM,
+ * so reset back to start of file.
+ */
+ input.reset();
+ }
+ }
+ }
+
String headerline = connection.getHeaderline(tableName);
CsvRawReader rawReader = new CsvRawReader(input,
tableName,
=====================================
src/test/java/org/relique/jdbc/csv/TestCsvDriver.java
=====================================
@@ -2727,6 +2727,28 @@ public class TestCsvDriver
assertFalse(results.next());
}
+ @Test
+ public void testSkippingUtf8ByteOrderMark() throws SQLException, ParseException
+ {
+ Properties props = new Properties();
+ props.put("charset", "UTF-8");
+
+ /*
+ * Check that the 3 byte Byte Order Mark at start of file is skipped.
+ */
+ Connection conn = DriverManager.getConnection("jdbc:relique:csv:"
+ + filePath, props);
+ Statement stmt = conn.createStatement();
+ ResultSet results = stmt.executeQuery("SELECT * FROM utf8_bom");
+
+ assertTrue(results.next());
+ ResultSetMetaData metadata = results.getMetaData();
+ assertEquals("name of column 1 is incorrect", "foo", metadata.getColumnName(1));
+ assertEquals("name of column 2 is incorrect", "bar", metadata.getColumnName(2));
+ assertEquals("Incorrect value 1", "1", results.getString(1));
+ assertEquals("Incorrect value 2", "3", results.getString(2));
+ }
+
@Test
public void testSkippingLeadingLines() throws SQLException
{
=====================================
src/testdata/utf8_bom.csv
=====================================
@@ -0,0 +1,3 @@
+"foo","bar","b☺z"
+1,3,5
+2,4,6
View it on GitLab: https://salsa.debian.org/java-team/csvjdbc/compare/a91e4334680d9941242b90600c4d9ac94a9a32ae...9ff7f94711720fb0d32ffb1f246a6e269b6e72a4
--
View it on GitLab: https://salsa.debian.org/java-team/csvjdbc/compare/a91e4334680d9941242b90600c4d9ac94a9a32ae...9ff7f94711720fb0d32ffb1f246a6e269b6e72a4
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190913/0635861f/attachment.html>
More information about the pkg-java-commits
mailing list