From 404c652c9335f56a467cd92c65edefb0ccac9232 Mon Sep 17 00:00:00 2001 From: Sim Sun Date: Tue, 2 Jan 2024 16:16:19 -0800 Subject: [PATCH] Fix the javadoc warnings Summary: Fix below javadoc warnings: ``` /Users/simsun/fbsource/fbandroid/libraries/soloader/java/com/facebook/soloader/SoSource.java:95: warning: no param for soName protected File getSoFileByName(String soName) throws IOException { ^ /Users/simsun/fbsource/fbandroid/libraries/soloader/java/com/facebook/soloader/SoSource.java:95: warning: no return protected File getSoFileByName(String soName) throws IOException { ^ /Users/simsun/fbsource/fbandroid/libraries/soloader/java/com/facebook/soloader/SoSource.java:95: warning: no throws for java.io.IOException protected File getSoFileByName(String soName) throws IOException { ^ Generating /var/folders/48/qgw4nzlj2p56xl344pd8rfh40000gn/T/tmp7j2fsb_l/com/facebook/soloader/AsyncInitSoSource.html... Generating /var/folders/48/qgw4nzlj2p56xl344pd8rfh40000gn/T/tmp7j2fsb_l/com/facebook/soloader/BackupSoSource.html... /Users/simsun/fbsource/fbandroid/libraries/soloader/java/com/facebook/soloader/UnpackingSoSource.java:484: warning: no throws for java.io.IOException public void prepareForceRefresh() throws IOException { ^ Generating /var/folders/48/qgw4nzlj2p56xl344pd8rfh40000gn/T/ ``` Differential Revision: D52492588 fbshipit-source-id: b38e09417c50fa1a98d2996c45599e89c803a22b --- java/com/facebook/soloader/SoSource.java | 4 ++++ java/com/facebook/soloader/UnpackingSoSource.java | 6 +++++- .../facebook/soloader/recovery/RecoveryStrategyFactory.java | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/java/com/facebook/soloader/SoSource.java b/java/com/facebook/soloader/SoSource.java index 280b8fe..8f27c41 100644 --- a/java/com/facebook/soloader/SoSource.java +++ b/java/com/facebook/soloader/SoSource.java @@ -90,6 +90,10 @@ public abstract int loadLibrary( /** * Returns the so file for the specified library. Returns null if the library does not exist or if * it's not backed by a file. + * + * @param soName Name of library to load + * @return File if library found; {@code null} if not. + * @throws IOException IOException */ @Nullable protected File getSoFileByName(String soName) throws IOException { diff --git a/java/com/facebook/soloader/UnpackingSoSource.java b/java/com/facebook/soloader/UnpackingSoSource.java index 76e267d..dea07bb 100644 --- a/java/com/facebook/soloader/UnpackingSoSource.java +++ b/java/com/facebook/soloader/UnpackingSoSource.java @@ -480,7 +480,11 @@ public String getLibraryPath(String soName) throws IOException { return soFile.getCanonicalPath(); } - /** Prepare this SoSource by unconditonally unpacking/re-unpacking it. */ + /** + * Prepare this SoSource by unconditonally unpacking/re-unpacking it. + * + * @throws IOException IOException + */ public void prepareForceRefresh() throws IOException { prepare(SoSource.PREPARE_FLAG_FORCE_REFRESH); } diff --git a/java/com/facebook/soloader/recovery/RecoveryStrategyFactory.java b/java/com/facebook/soloader/recovery/RecoveryStrategyFactory.java index 2141be2..a16a9a1 100644 --- a/java/com/facebook/soloader/recovery/RecoveryStrategyFactory.java +++ b/java/com/facebook/soloader/recovery/RecoveryStrategyFactory.java @@ -18,7 +18,7 @@ public interface RecoveryStrategyFactory { /** - * @returns an instance of RecoveryStrategy that will be used to recover from failures to load a + * @return an instance of RecoveryStrategy that will be used to recover from failures to load a * native library. The recover method of the returned object might be called multiple times * until false is returned or until a successfull retry of the load is performed. All calls * are guaranteed to hapen sequentially, within the context of a single library load. This