Skip to content

Commit c393ebc

Browse files
committed
Fix warnings in Glide.java
1 parent 88e4fea commit c393ebc

File tree

1 file changed

+3
-1
lines changed
  • library/src/main/java/com/bumptech/glide

1 file changed

+3
-1
lines changed

library/src/main/java/com/bumptech/glide/Glide.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private static void initializeGlide(Context context) {
237237
}
238238

239239
@Nullable
240-
@SuppressWarnings({"unchecked", "deprecation"})
240+
@SuppressWarnings({"unchecked", "deprecation", "TryWithIdenticalCatches"})
241241
private static GeneratedAppGlideModule getAnnotationGeneratedGlideModules() {
242242
GeneratedAppGlideModule result = null;
243243
try {
@@ -256,6 +256,7 @@ private static GeneratedAppGlideModule getAnnotationGeneratedGlideModules() {
256256
throw new IllegalStateException("GeneratedAppGlideModuleImpl is implemented incorrectly."
257257
+ " If you've manually implemented this class, remove your implementation. The Annotation"
258258
+ " processor will generate a correct implementation.", e);
259+
// These exceptions can't be squashed across all versions of Android.
259260
} catch (IllegalAccessException e) {
260261
throw new IllegalStateException("GeneratedAppGlideModuleImpl is implemented incorrectly."
261262
+ " If you've manually implemented this class, remove your implementation. The Annotation"
@@ -483,6 +484,7 @@ public void trimMemory(int level) {
483484
* This method should always be called on a background thread, since it is a blocking call.
484485
* </p>
485486
*/
487+
@SuppressWarnings("unused") // Public API
486488
public void clearDiskCache() {
487489
Util.assertBackgroundThread();
488490
engine.clearDiskCache();

0 commit comments

Comments
 (0)