File tree 2 files changed +8
-14
lines changed
src/main/java/com/bumptech/glide/module
test/src/test/java/com/bumptech/glide/module
2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -60,11 +60,13 @@ public List<GlideModule> parse() {
60
60
}
61
61
}
62
62
}
63
+ if (Log .isLoggable (TAG , Log .DEBUG )) {
64
+ Log .d (TAG , "Finished loading Glide modules" );
65
+ }
63
66
} catch (PackageManager .NameNotFoundException e ) {
64
- throw new RuntimeException ("Unable to find metadata to parse GlideModules" , e );
65
- }
66
- if (Log .isLoggable (TAG , Log .DEBUG )) {
67
- Log .d (TAG , "Finished loading Glide modules" );
67
+ if (Log .isLoggable (TAG , Log .ERROR )) {
68
+ Log .e (TAG , "Failed to parse glide modules" , e );
69
+ }
68
70
}
69
71
70
72
return modules ;
Original file line number Diff line number Diff line change @@ -125,20 +125,12 @@ public void parse_withNullMetadata_doesNotThrow() throws NameNotFoundException {
125
125
}
126
126
127
127
@ Test
128
- public void parse_withMissingName_throwsRuntimeException () throws NameNotFoundException {
128
+ public void parse_withMissingName_doesNotThrow () throws NameNotFoundException {
129
129
PackageManager pm = mock (PackageManager .class );
130
130
doThrow (new NameNotFoundException ("name" )).when (pm ).getApplicationInfo (anyString (), anyInt ());
131
131
when (context .getPackageManager ()).thenReturn (pm );
132
132
133
- assertThrows (
134
- "Unable to find metadata to parse GlideModules" ,
135
- RuntimeException .class ,
136
- new ThrowingRunnable () {
137
- @ Override
138
- public void run () {
139
- parser .parse ();
140
- }
141
- });
133
+ parser .parse ();
142
134
}
143
135
144
136
private void addModuleToManifest (Class <?> moduleClass ) {
You can’t perform that action at this time.
0 commit comments