Closed Mshey closed 2 years ago
I think the last usage of the WrapperConnection classes was removed in 3.3.0.
Including:
UserWrapperConnection
AttributesWrapperConnection
FeatureWrapperConnection
TileWrapperConnection
UserCustomWrapperConnection
They were previously used to read table and column metadata. That logic was replaced by a common geopackage-core implementation. They could probably be removed or deprecated.
In what context are you trying to use FeatureWrapperConnection? Or can you provide a code usage example?
Are you trying to perform a raw query on a specific feature table?
FeatureDao featureDao = geoPackage.getFeatureDao(featureTable);
FeatureCursor cursor = featureDao.rawQuery(sql, selectionArgs);
try {
for (FeatureRow featureRow : featureCursor) {
// ...
}
}finally {
cursor.close();
}
Thank you for your quick answer. We just migrated from 3.4.0 to 6.2.0 (big step, I know :P), so now we have encountered a lot of bugs. I change the item type from FeatureWrapperConnection to FeatureDao, and everything is working fine. Have great day!
Calling rawQuery(String sql, String[] selectionArgs) on a FeatureWrapperConnection item throws NPE. As I investigated, I encountered a little bug in the geopackage library. This is my stacktrace:
As you can see, the NPE is thrown here:
But if you got back until the FeatureWrapperConnection class, you can observe, that the wrapCursor method calls the FeatureCursor constructor with table parameter set to null:
Can you please put a null check in the UserCursor constructor, so that it won't throw any NPE in the future?
Version Information: