diff --git a/KJFrame/gradle.properties b/KJFrame/gradle.properties index 1d3591c8..8d4e904b 100644 --- a/KJFrame/gradle.properties +++ b/KJFrame/gradle.properties @@ -15,4 +15,4 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +#org.gradle.parallel=true diff --git a/KJFrame/kjframe/src/main/java/org/kymjs/kjframe/KJBitmap.java b/KJFrame/kjframe/src/main/java/org/kymjs/kjframe/KJBitmap.java index 350be29c..0bdd3c2c 100644 --- a/KJFrame/kjframe/src/main/java/org/kymjs/kjframe/KJBitmap.java +++ b/KJFrame/kjframe/src/main/java/org/kymjs/kjframe/KJBitmap.java @@ -75,7 +75,7 @@ public KJBitmap(BitmapConfig bitmapConfig) { public KJBitmap(HttpConfig httpConfig, BitmapConfig bitmapConfig) { this.mConfig = bitmapConfig; displayer = new ImageDisplayer(httpConfig, mConfig); - doLoadingViews = new Vector(30); + doLoadingViews = new Vector<>(30); } /** @@ -233,6 +233,9 @@ public void display(View imageView, String imageUrl, int width, int height, if (StringUtils.isEmpty(imageUrl)) { showLogIfOpen("image url is empty"); setViewImage(imageView, errorBitmap); + if (callback != null) { + callback.onFailure(new RuntimeException("image url is empty")); + } return; }