Commit a24109f3 authored by Varun Patil's avatar Varun Patil

Add null check in resizeImageUrl

parent ec054f30
...@@ -34,6 +34,7 @@ public class Constants { ...@@ -34,6 +34,7 @@ public class Constants {
public static final double[] MAP_WEIGHTS_Y = {0.09738953520399705, -4.519868444089616, 62.38493718381985, 16.664561869057696, -2.168377988768651, 0.0919143297622087, 0.32304266159540823, 0.21688067854428716, -12.81393255320748}; public static final double[] MAP_WEIGHTS_Y = {0.09738953520399705, -4.519868444089616, 62.38493718381985, 16.664561869057696, -2.168377988768651, 0.0919143297622087, 0.32304266159540823, 0.21688067854428716, -12.81393255320748};
public static final String resizeImageUrl(String url, Integer dim) { public static final String resizeImageUrl(String url, Integer dim) {
if (url == null) { return url; }
return url.replace("api.insti.app/static/", "img.insti.app/static/" + dim.toString() + "/"); return url.replace("api.insti.app/static/", "img.insti.app/static/" + dim.toString() + "/");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment