naming fixes

This commit is contained in:
Gavriil Sitnikov 2017-03-09 17:24:18 +03:00
parent 3848be4035
commit 377ac44332
1 changed files with 5 additions and 5 deletions

View File

@ -238,7 +238,7 @@ public final class PreferenceUtils {
@Nullable @Nullable
@Override @Override
public String toStoreObject(@NonNull final Type objectClass, @NonNull final Type stringClass, @Nullable final T object) public String toStoreObject(@NonNull final Type objectType, @NonNull final Type storeObjectType, @Nullable final T object)
throws ConversionException { throws ConversionException {
return object != null ? object.name() : null; return object != null ? object.name() : null;
} }
@ -247,12 +247,12 @@ public final class PreferenceUtils {
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
//unchecked: we checked it before cast //unchecked: we checked it before cast
public T toObject(@NonNull final Type objectClass, @NonNull final Type stringClass, @Nullable final String stringObject) public T toObject(@NonNull final Type objectType, @NonNull final Type storeObjectType, @Nullable final String stringObject)
throws ConversionException { throws ConversionException {
if (!(objectClass instanceof Class) || !((Class) objectClass).isEnum()) { if (!(objectType instanceof Class) || !((Class) objectType).isEnum()) {
throw new ConversionException(String.format("Type %s is not enum class", objectClass)); throw new ConversionException(String.format("Type %s is not enum class", objectType));
} }
return stringObject != null ? Enum.valueOf((Class<T>) objectClass, stringObject) : null; return stringObject != null ? Enum.valueOf((Class<T>) objectType, stringObject) : null;
} }
} }