This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new bae011b798 Minor editions to previous commit: - Report the reason why
metadata was missing. - Use the same punctuation than other resources/comments.
bae011b798 is described below
commit bae011b798926dcacf9010d279d8c7007c71dd33
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Mon Jul 31 14:02:24 2023 +0200
Minor editions to previous commit:
- Report the reason why metadata was missing.
- Use the same punctuation than other resources/comments.
---
.../java/org/apache/sis/internal/sql/feature/Database.java | 10 +++++-----
.../apache/sis/internal/sql/feature/Resources_fr.properties | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java
b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java
index 36c378273e..b41dcc84f5 100644
---
a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java
+++
b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Database.java
@@ -16,7 +16,6 @@
*/
package org.apache.sis.internal.sql.feature;
-import java.sql.SQLFeatureNotSupportedException;
import java.util.Set;
import java.util.Map;
import java.util.List;
@@ -33,6 +32,7 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
import java.sql.Types;
import javax.sql.DataSource;
import org.opengis.util.GenericName;
@@ -241,6 +241,7 @@ public class Database<G> extends Syntax {
* we continue looping in case the type information is duplicated with
more information later.
*/
Boolean unsigned = null;
+ SQLException cause = null;
try (ResultSet reflect = metadata.getTypeInfo()) {
while (reflect.next()) {
if (reflect.getInt(Reflection.DATA_TYPE) == Types.TINYINT) {
@@ -250,16 +251,15 @@ public class Database<G> extends Syntax {
}
}
} catch (SQLFeatureNotSupportedException e) {
- // If metadata cannot be fetched, consider it equivalent to an
empty metadata: assume default interpretation
+ // If metadata cannot be fetched, consider it equivalent to an
empty metadata: assume default interpretation.
unsigned = null;
+ cause = e;
}
-
if (unsigned == null) {
unsigned = true;
listeners.warning(Resources.forLocale(listeners.getLocale())
-
.getString(Resources.Keys.AssumeUnsigned));
+
.getString(Resources.Keys.AssumeUnsigned), cause);
}
-
this.source = source;
this.isByteSigned = !unsigned;
this.geomLibrary = geomLibrary;
diff --git
a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Resources_fr.properties
b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Resources_fr.properties
index 27403a8bce..41da052b70 100644
---
a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Resources_fr.properties
+++
b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/feature/Resources_fr.properties
@@ -24,7 +24,7 @@
# U+202F NARROW NO-BREAK SPACE before ; ! and ?
# U+00A0 NO-BREAK SPACE before :
#
-AssumeUnsigned = Les valeurs de type 'tinyint'/'byte'
seront consid�r�es comme non sign�es, car la base de donn�es ne fournit pas
d'information � ce sujet.
+AssumeUnsigned = Les valeurs de type
\u2018tinyint\u2019/\u2018byte\u2019 seront consid\u00e9r\u00e9es comme non
sign\u00e9es, car la base de donn\u00e9es ne fournit pas d'information \u00e0
ce sujet.
CanNotFetchCRS_1 = Ne peut pas obtenir un syst\u00e8me de
r\u00e9f\u00e9rence des coordonn\u00e9es pour le code SRID {0}.
CanNotFindSRID_1 = Ne peut pas trouver un identifiant dans la
base de donn\u00e9es pour le syst\u00e8me de r\u00e9f\u00e9rence
\u00ab\u202f{0}\u202f\u00bb.
DataSource = Fournisseur de connexions \u00e0 la base
de donn\u00e9es.