This is an automated email from the ASF dual-hosted git repository. amanin pushed a commit to branch refactor/strict_storage_connector in repository https://gitbox.apache.org/repos/asf/sis.git
commit 0fad6c68a7b76000b7a828231f32818105d31f8f Author: Alexis Manin <[email protected]> AuthorDate: Wed Mar 24 14:19:26 2021 +0100 doc(Storage): slight improvement of apidoc for storage connector deprecated methods. --- .../main/java/org/apache/sis/storage/StorageConnector.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java index 9b6eca4..7211bb9 100644 --- a/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java +++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java @@ -292,19 +292,21 @@ public class StorageConnector implements AutoCloseable { } /** - * Please use a safe alternative instead, like {@link #useAs(Class, StorageOperatingFunction)}. - * Only call this if safe methods do not support the storage type you require. - * + * @deprecated Please use a safe alternative instead, like {@link #useAs(Class, StorageOperatingFunction)}. + * If safe methods do not support the storage type you require, use {@code unsafe().getStorageAs() } to ease tracing + * of unsafe calls. * @return A connector that does not provides control over resource usage. It does not automatically rewind * automatically used resources. That means that resource lifecycle becomes <em>entirely</em> caller responsability. */ + @Deprecated public <T> T getStorageAs(final Class<T> type) throws IllegalArgumentException, DataStoreException { return storage.getStorageAs(type); } /** - * Please use a safe alternative instead, like {@link #useAs(Class, StorageOperatingFunction)}. - * Only call this if safe methods do not support the storage type you require. + * @deprecated Please use a safe alternative instead, like {@link #useAs(Class, StorageOperatingFunction)}. + * If safe methods do not support the storage type you require, use {@code unsafe().getStorage() } to ease tracing + * of unsafe calls. * * @return A connector that does not provides control over resource usage. It does not automatically rewind * automatically used resources. That means that resource lifecycle becomes <em>entirely</em> caller responsability.
