Polish
See gh-20192
This commit is contained in:
committed by
Stephane Nicoll
parent
ff4de95b3e
commit
e2d87a89d0
@@ -70,7 +70,7 @@ public enum ApiVersion {
|
||||
private static ApiVersion forType(String type) {
|
||||
if (type.startsWith(MEDIA_TYPE_PREFIX)) {
|
||||
type = type.substring(MEDIA_TYPE_PREFIX.length());
|
||||
int suffixIndex = type.indexOf("+");
|
||||
int suffixIndex = type.indexOf('+');
|
||||
type = (suffixIndex != -1) ? type.substring(0, suffixIndex) : type;
|
||||
try {
|
||||
return valueOf(type.toUpperCase());
|
||||
|
||||
Reference in New Issue
Block a user