Changeset 7484
- Timestamp:
- May 17, 2018, 8:46:09 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.12-stable/src/core/net/sf/basedb/util/GeoLocation.java
r7415 r7484 240 240 241 241 HttpEntity entity = response.getEntity(); 242 Header contentType = entity.getContentType(); 243 if (contentType != null && !"application/json".equals(contentType.getValue())) 244 { 245 throw new RuntimeException("Unexpected content type: "+contentType.getValue()); 242 Header contentTypeHeader = entity.getContentType(); 243 String contentType = contentTypeHeader != null ? contentTypeHeader.getValue() : null; 244 if (contentType != null && !contentType.contains("application/json")) 245 { 246 throw new RuntimeException("Unexpected content type: "+contentType); 246 247 } 247 248
Note: See TracChangeset
for help on using the changeset viewer.