static fixes
This commit is contained in:
parent
55f5cce4cd
commit
47c5c2afb0
|
|
@ -52,9 +52,7 @@ public class ConsoleLogProcessor extends LogProcessor {
|
|||
newline = newline != -1 ? newline : length;
|
||||
do {
|
||||
final int end = Math.min(newline, i + MAX_LOG_LENGTH);
|
||||
if (Log.isLoggable(tag, level.getPriority())) {
|
||||
Log.println(level.getPriority(), tag, messageToLog.substring(i, end));
|
||||
}
|
||||
Log.println(level.getPriority(), tag, messageToLog.substring(i, end));
|
||||
i = end;
|
||||
}
|
||||
while (i < newline);
|
||||
|
|
|
|||
|
|
@ -132,9 +132,7 @@ public final class OnSubscribeRefCountWithCacheTime<T> implements OnSubscribe<T>
|
|||
}
|
||||
|
||||
private void doSubscribe(@NonNull final Subscriber<? super T> subscriber, @NonNull final CompositeSubscription currentBase) {
|
||||
// handle unsubscribing from the base subscription
|
||||
subscriber.add(disconnect(currentBase));
|
||||
|
||||
source.unsafeSubscribe(new Subscriber<T>(subscriber) {
|
||||
@Override
|
||||
public void onError(@NonNull final Throwable throwable) {
|
||||
|
|
@ -159,6 +157,10 @@ public final class OnSubscribeRefCountWithCacheTime<T> implements OnSubscribe<T>
|
|||
lock.lock();
|
||||
try {
|
||||
if (baseSubscription == currentBase) {
|
||||
if (worker != null) {
|
||||
worker.unsubscribe();
|
||||
worker = null;
|
||||
}
|
||||
baseSubscription.unsubscribe();
|
||||
baseSubscription = new CompositeSubscription();
|
||||
subscriptionCount.set(0);
|
||||
|
|
|
|||
|
|
@ -36,27 +36,27 @@ public interface Converter<TObject, TStoreObject> {
|
|||
/**
|
||||
* Converts specific object of objectType to object of storeObjectClass allowed to store.
|
||||
*
|
||||
* @param objectClass Type of object;
|
||||
* @param storeObjectClass Type of store object allowed to store;
|
||||
* @param objectType Type of object;
|
||||
* @param storeObjectType Type of store object allowed to store;
|
||||
* @param object Object to be converted to store object;
|
||||
* @return Object that is allowed to store into specific {@link Store};
|
||||
* @throws ConversionException Exception during conversion. Usually it indicates illegal state.
|
||||
*/
|
||||
@Nullable
|
||||
TStoreObject toStoreObject(@NonNull Type objectClass, @NonNull Type storeObjectClass, @Nullable TObject object)
|
||||
TStoreObject toStoreObject(@NonNull Type objectType, @NonNull Type storeObjectType, @Nullable TObject object)
|
||||
throws ConversionException;
|
||||
|
||||
/**
|
||||
* Converts specific store object of storeObjectClass to object of objectType.
|
||||
*
|
||||
* @param objectClass Type of object;
|
||||
* @param storeObjectClass Type of store object allowed to store;
|
||||
* @param objectType Type of object;
|
||||
* @param storeObjectType Type of store object allowed to store;
|
||||
* @param storeObject Object from specific {@link Store};
|
||||
* @return Object converted from store object;
|
||||
* @throws ConversionException Exception during conversion. Usually it indicates illegal state.
|
||||
*/
|
||||
@Nullable
|
||||
TObject toObject(@NonNull Type objectClass, @NonNull Type storeObjectClass, @Nullable TStoreObject storeObject)
|
||||
TObject toObject(@NonNull Type objectType, @NonNull Type storeObjectType, @Nullable TStoreObject storeObject)
|
||||
throws ConversionException;
|
||||
|
||||
class ConversionException extends Exception {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public abstract class Migrator<TKey, TOldStoreObject, TNewStoreObject> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Observable that migrates object with specific key from some version to migrator's version.
|
||||
* Single that migrates object with specific key from some version to migrator's version.
|
||||
*
|
||||
* @param key Key of object to migrate;
|
||||
* @param version Current version of object;
|
||||
|
|
@ -80,7 +80,7 @@ public abstract class Migrator<TKey, TOldStoreObject, TNewStoreObject> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Observable that represents internal migration logic specified by implementation.
|
||||
* Single that represents internal migration logic specified by implementation.
|
||||
*
|
||||
* @param key Key of object to migrate;
|
||||
* @param version Current version of object;
|
||||
|
|
|
|||
Loading…
Reference in New Issue