conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
super(CATEGORIES, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(CATEGORIES, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(CATEGORIES, new ParameterList(), new Factory());
<<<<<<<
super(CATEGORIES, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(CATEGORIES, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(CATEGORIES, new ParameterList(), new Factory());
<<<<<<<
super(CATEGORIES, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(CATEGORIES, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(CATEGORIES, aList, new Factory());
<<<<<<<
super(CATEGORIES, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(CATEGORIES, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(CATEGORIES, new ParameterList(), new Factory());
<<<<<<<
super(CATEGORIES, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(CATEGORIES, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(CATEGORIES, aList, new Factory()); |
<<<<<<<
super(REQUEST_STATUS, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(REQUEST_STATUS, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(REQUEST_STATUS, new ParameterList(), new Factory());
<<<<<<<
super(REQUEST_STATUS, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(REQUEST_STATUS, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(REQUEST_STATUS, aList, new Factory());
<<<<<<<
super(REQUEST_STATUS, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(REQUEST_STATUS, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(REQUEST_STATUS, new ParameterList(), new Factory());
<<<<<<<
super(REQUEST_STATUS, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(REQUEST_STATUS, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(REQUEST_STATUS, aList, new Factory()); |
<<<<<<<
super(LOCATION_TYPE, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(LOCATION_TYPE, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION_TYPE, new ParameterList(), new Factory());
<<<<<<<
super(LOCATION_TYPE, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(LOCATION_TYPE, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION_TYPE, new ParameterList(), new Factory());
<<<<<<<
super(LOCATION_TYPE, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(LOCATION_TYPE, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION_TYPE, aList, new Factory());
<<<<<<<
super(LOCATION_TYPE, new ParameterList(), new OneOrLessParameterValidator(Parameter.LANGUAGE),
new Factory());
=======
super(LOCATION_TYPE, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION_TYPE, new ParameterList(), new Factory());
<<<<<<<
super(LOCATION_TYPE, aList, new OneOrLessParameterValidator(Parameter.LANGUAGE), new Factory());
=======
super(LOCATION_TYPE, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION_TYPE, aList, new Factory()); |
<<<<<<<
=======
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
>>>>>>>
import java.io.IOException;
import java.net.URL;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
<<<<<<<
ALIASES.load(ResourceLoader.getResourceAsStream("net/fortuna/ical4j/model/tz.alias"));
} catch (IOException ioe) {
LoggerFactory.getLogger(TimeZoneRegistryImpl.class).warn(
=======
aliasInputStream = ResourceLoader.getResourceAsStream("net/fortuna/ical4j/model/tz.alias");
ALIASES.load(aliasInputStream);
} catch (IOException ioe) {
LogFactory.getLog(TimeZoneRegistryImpl.class).warn(
>>>>>>>
aliasInputStream = ResourceLoader.getResourceAsStream("net/fortuna/ical4j/model/tz.alias");
ALIASES.load(aliasInputStream);
} catch (IOException ioe) {
LoggerFactory.getLogger(TimeZoneRegistryImpl.class).warn(
<<<<<<<
ALIASES.load(ResourceLoader.getResourceAsStream("tz.alias"));
} catch (Exception e) {
LoggerFactory.getLogger(TimeZoneRegistryImpl.class).debug(
"Error loading custom timezone aliases: " + e.getMessage());
=======
aliasInputStream = ResourceLoader.getResourceAsStream("tz.alias");
ALIASES.load(aliasInputStream);
} catch (Exception e) {
LogFactory.getLog(TimeZoneRegistryImpl.class).debug(
"Error loading custom timezone aliases: " + e.getMessage());
} finally {
if (aliasInputStream != null) {
try {
aliasInputStream.close();
} catch (IOException e) {
LogFactory.getLog(TimeZoneRegistryImpl.class).warn(
"Error closing resource stream: " + e.getMessage());
}
}
>>>>>>>
aliasInputStream = ResourceLoader.getResourceAsStream("tz.alias");
ALIASES.load(aliasInputStream);
} catch (Exception e) {
LoggerFactory.getLogger(TimeZoneRegistryImpl.class).debug(
"Error loading custom timezone aliases: " + e.getMessage());
} finally {
if (aliasInputStream != null) {
try {
aliasInputStream.close();
} catch (IOException e) {
LoggerFactory.getLogger(TimeZoneRegistryImpl.class).warn(
"Error closing resource stream: " + e.getMessage());
}
} |
<<<<<<<
super(RELATED_TO, new ParameterList(), new OneOrLessParameterValidator(Parameter.RELTYPE),
new Factory());
=======
super(RELATED_TO, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(RELATED_TO, new ParameterList(), new Factory());
<<<<<<<
super(RELATED_TO, new ParameterList(), new OneOrLessParameterValidator(Parameter.RELTYPE),
new Factory());
=======
super(RELATED_TO, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(RELATED_TO, new ParameterList(), new Factory());
<<<<<<<
super(RELATED_TO, aList, new OneOrLessParameterValidator(Parameter.RELTYPE), new Factory());
=======
super(RELATED_TO, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(RELATED_TO, aList, new Factory()); |
<<<<<<<
try {
duration = Period.parse(value);
} catch (DateTimeParseException e) {
duration = Duration.parse(value);
=======
negative = false;
weeks = 0;
days = 0;
hours = 0;
minutes = 0;
seconds = 0;
String token = null;
String prevToken;
final StringTokenizer t = new StringTokenizer(value, "+-PWDTHMS", true);
while (t.hasMoreTokens()) {
prevToken = token;
token = t.nextToken();
if ("+".equals(token)) {
negative = false;
}
else if ("-".equals(token)) {
negative = true;
}
// does nothing..
// else if ("P".equals(token)) {
// }
else if ("W".equals(token)) {
weeks = Integer.parseInt(prevToken);
}
else if ("D".equals(token)) {
days = Integer.parseInt(prevToken);
}
// does nothing..
// else if ("T".equals(token)) {
// }
else if ("H".equals(token)) {
hours = Integer.parseInt(prevToken);
}
else if ("M".equals(token)) {
minutes = Integer.parseInt(prevToken);
}
else if ("S".equals(token)) {
seconds = Integer.parseInt(prevToken);
}
>>>>>>>
try {
duration = Period.parse(value);
} catch (DateTimeParseException e) {
duration = Duration.parse(value);
}
<<<<<<<
duration = Duration.between(LocalDateTime.ofInstant(Instant.ofEpochMilli(date1.getTime()), ZoneId.systemDefault()),
LocalDateTime.ofInstant(Instant.ofEpochMilli(date2.getTime()), ZoneId.systemDefault()));
// if (((Duration)duration).getSeconds() % SECONDS_PER_DAY == 0) {
// duration = Period.between(LocalDate.from(Instant.ofEpochMilli(date1.getTime()).atZone(ZoneId.systemDefault()).toLocalDate()),
// LocalDate.from(Instant.ofEpochMilli(date2.getTime()).atZone(ZoneId.systemDefault()).toLocalDate()));
// }
}
=======
Date start;
Date end;
// Negative range? (start occurs after end)
negative = date1.compareTo(date2) > 0;
if (negative) {
// Swap the dates (which eliminates the need to bother with
// negative after this!)
start = date2;
end = date1;
}
else {
start = date1;
end = date2;
}
final Calendar startCal;
if (start instanceof net.fortuna.ical4j.model.Date) {
startCal = Dates.getCalendarInstance((net.fortuna.ical4j.model.Date)start);
} else {
startCal = Calendar.getInstance();
}
startCal.setTime(start);
final Calendar endCal = Calendar.getInstance(startCal.getTimeZone());
endCal.setTime(end);
// Init our duration interval (which is in units that evolve as we
// compute, below)
long dur = 0;
// Count days to get to the right year (loop in the very rare chance
// that a leap year causes us to come up short)
int nYears = endCal.get(Calendar.YEAR) - startCal.get(Calendar.YEAR);
while (nYears > 0) {
startCal.add(Calendar.DATE, DAYS_PER_YEAR * nYears);
dur += DAYS_PER_YEAR * nYears;
nYears = endCal.get(Calendar.YEAR) - startCal.get(Calendar.YEAR);
}
// Count days to get to the right day
dur += endCal.get(Calendar.DAY_OF_YEAR)
- startCal.get(Calendar.DAY_OF_YEAR);
// Count hours to get to right hour
dur *= HOURS_PER_DAY; // days -> hours
dur += endCal.get(Calendar.HOUR_OF_DAY)
- startCal.get(Calendar.HOUR_OF_DAY);
// ... to the right minute
dur *= MINUTES_PER_HOUR; // hours -> minutes
dur += endCal.get(Calendar.MINUTE) - startCal.get(Calendar.MINUTE);
// ... and second
dur *= SECONDS_PER_MINUTE; // minutes -> seconds
dur += endCal.get(Calendar.SECOND) - startCal.get(Calendar.SECOND);
// Now unwind our units
seconds = (int) (dur % SECONDS_PER_MINUTE);
dur = dur / SECONDS_PER_MINUTE; // seconds -> minutes (drop remainder seconds)
minutes = (int) (dur % MINUTES_PER_HOUR);
dur /= MINUTES_PER_HOUR; // minutes -> hours (drop remainder minutes)
hours = (int) (dur % HOURS_PER_DAY);
dur /= HOURS_PER_DAY; // hours -> days (drop remainder hours)
days = (int) dur;
weeks = 0;
>>>>>>>
duration = Duration.between(LocalDateTime.ofInstant(Instant.ofEpochMilli(date1.getTime()), ZoneId.systemDefault()),
LocalDateTime.ofInstant(Instant.ofEpochMilli(date2.getTime()), ZoneId.systemDefault()));
// if (((Duration)duration).getSeconds() % SECONDS_PER_DAY == 0) {
// duration = Period.between(LocalDate.from(Instant.ofEpochMilli(date1.getTime()).atZone(ZoneId.systemDefault()).toLocalDate()),
// LocalDate.from(Instant.ofEpochMilli(date2.getTime()).atZone(ZoneId.systemDefault()).toLocalDate()));
// }
} |
<<<<<<<
super(LOCATION, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE, Parameter.VVENUE),
new Factory());
=======
super(LOCATION, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION, new ParameterList(), new Factory());
<<<<<<<
super(LOCATION, new ParameterList(), new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE, Parameter.VVENUE),
new Factory());
=======
super(LOCATION, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION, new ParameterList(), new Factory());
<<<<<<<
super(LOCATION, aList, new OneOrLessParameterValidator(Parameter.ALTREP, Parameter.LANGUAGE, Parameter.VVENUE),
new Factory());
=======
super(LOCATION, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(LOCATION, aList, new Factory()); |
<<<<<<<
super(TEL, new ParameterList(), new OneOrLessParameterValidator(Parameter.TYPE), new Factory());
=======
super(TEL, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(TEL, new ParameterList(), new Factory());
<<<<<<<
super(TEL, new ParameterList(), new OneOrLessParameterValidator(Parameter.TYPE), new Factory());
=======
super(TEL, new ParameterList(), PropertyFactoryImpl.getInstance());
>>>>>>>
super(TEL, new ParameterList(), new Factory());
<<<<<<<
super(TEL, aList, new OneOrLessParameterValidator(Parameter.TYPE), new Factory());
=======
super(TEL, aList, PropertyFactoryImpl.getInstance());
>>>>>>>
super(TEL, aList, new Factory()); |
<<<<<<<
StorageEngine<ByteArray, Slop, byte[]> slopStore = storeRepo.getSlopStore();
=======
StorageEngine<ByteArray, Slop> slopStore = storeRepo.getSlopStore();
EventThrottler throttler = new EventThrottler(maxWriteBytesPerSec);
>>>>>>>
StorageEngine<ByteArray, Slop, byte[]> slopStore = storeRepo.getSlopStore();
EventThrottler throttler = new EventThrottler(maxWriteBytesPerSec);
<<<<<<<
Store<ByteArray, byte[], byte[]> store = storeRepo.getNodeStore(slop.getStoreName(),
slop.getNodeId());
try {
if(slop.getOperation() == Operation.PUT)
store.put(keyAndVal.getFirst(),
new Versioned<byte[]>(slop.getValue(), versioned.getVersion()),
slop.getTransforms());
else if(slop.getOperation() == Operation.DELETE)
store.delete(keyAndVal.getFirst(), versioned.getVersion());
else
logger.error("Unknown slop operation: " + slop.getOperation());
slopStore.delete(slop.makeKey(), versioned.getVersion());
slopsPushed++;
} catch(ObsoleteVersionException e) {
// okay it is old, just delete it
slopStore.delete(slop.makeKey(), versioned.getVersion());
=======
Node node = cluster.getNodeById(slop.getNodeId());
if(failureDetector.isAvailable(node)) {
Store<ByteArray, byte[]> store = storeRepo.getNodeStore(slop.getStoreName(),
node.getId());
Long startNs = System.nanoTime();
try {
int nBytes = slop.getKey().length();
if(slop.getOperation() == Operation.PUT) {
store.put(slop.getKey(),
new Versioned<byte[]>(slop.getValue(), versioned.getVersion()));
nBytes += slop.getValue().length +
((VectorClock) versioned.getVersion()).sizeInBytes() + 1;
}
else if(slop.getOperation() == Operation.DELETE)
store.delete(slop.getKey(), versioned.getVersion());
else
logger.error("Unknown slop operation: " + slop.getOperation());
failureDetector.recordSuccess(node, deltaMs(startNs));
slopStore.delete(slop.makeKey(), versioned.getVersion());
slopsPushed++;
throttler.maybeThrottle(nBytes);
} catch(ObsoleteVersionException e) {
// okay it is old, just delete it
slopStore.delete(slop.makeKey(), versioned.getVersion());
} catch(UnreachableStoreException e) {
failureDetector.recordException(node, deltaMs(startNs), e);
}
>>>>>>>
Node node = cluster.getNodeById(slop.getNodeId());
if(failureDetector.isAvailable(node)) {
Store<ByteArray, byte[], byte[]> store = storeRepo.getNodeStore(slop.getStoreName(),
node.getId());
Long startNs = System.nanoTime();
try {
int nBytes = slop.getKey().length();
if(slop.getOperation() == Operation.PUT) {
store.put(slop.getKey(),
new Versioned<byte[]>(slop.getValue(),
versioned.getVersion()),
slop.getTransforms());
nBytes += slop.getValue().length
+ ((VectorClock) versioned.getVersion()).sizeInBytes()
+ 1;
} else if(slop.getOperation() == Operation.DELETE)
store.delete(slop.getKey(), versioned.getVersion());
else
logger.error("Unknown slop operation: " + slop.getOperation());
failureDetector.recordSuccess(node, deltaMs(startNs));
slopStore.delete(slop.makeKey(), versioned.getVersion());
slopsPushed++;
throttler.maybeThrottle(nBytes);
} catch(ObsoleteVersionException e) {
// okay it is old, just delete it
slopStore.delete(slop.makeKey(), versioned.getVersion());
} catch(UnreachableStoreException e) {
failureDetector.recordException(node, deltaMs(startNs), e);
} |
<<<<<<<
import com.simplecity.amp_library.utils.sorting.AlbumSortHelper;
import com.simplecity.amp_library.utils.sorting.SongSortHelper;
=======
import com.simplecity.amp_library.playback.MediaManager;
import com.simplecity.amp_library.ui.detail.DetailSortHelper;
>>>>>>>
import com.simplecity.amp_library.playback.MediaManager; |
<<<<<<<
import com.simplecity.amp_library.playback.PlaybackMonitor;
=======
import com.simplecity.amp_library.ui.activities.MainActivity;
import com.simplecity.amp_library.ui.presenters.PlayerPresenter;
>>>>>>>
import com.simplecity.amp_library.ui.presenters.PlayerPresenter;
<<<<<<<
public static final String UPDATE_PLAYING_FRAGMENT = "update_playing_fragment";
private SeekBar seekBar;
=======
private SizableSeekBar seekBar;
>>>>>>>
private SeekBar seekBar;
<<<<<<<
subscriptions.add(PlaybackMonitor.getInstance().getProgressObservable()
.filter(progress -> !isSeeking)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(progress -> {
seekBar.setProgress((int) (progress * 1000));
}));
subscriptions.add(PlaybackMonitor.getInstance().getCurrentTimeObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(pos -> refreshCurrentTimeText(pos / 1000)));
subscriptions.add(Observable.interval(500, TimeUnit.MILLISECONDS)
.onBackpressureDrop()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(aLong -> {
if (MusicUtils.isPlaying()) {
currentTime.setVisibility(View.VISIBLE);
} else {
currentTime.setVisibility(currentTime.getVisibility() == View.INVISIBLE ? View.VISIBLE : View.INVISIBLE);
}
}));
Observable<SeekBarChangeEvent> sharedSeekBarEvents = RxSeekBar.changeEvents(seekBar)
=======
Observable<SeekBarChangeEvent> sharedSeekBarEvents = RxSeekBar.changeEvents(seekBar)
>>>>>>>
Observable<SeekBarChangeEvent> sharedSeekBarEvents = RxSeekBar.changeEvents(seekBar)
<<<<<<<
void update() {
updateTrackInfo();
setPauseButtonImage();
setShuffleButtonImage();
setRepeatButtonImage();
}
@Override
public void onClick(View view) {
if (view == playPauseView) {
playPauseView.toggle();
MusicUtils.playOrPause();
} else if (view == nextButton) {
MusicUtils.next();
} else if (view == prevButton) {
MusicUtils.previous(true);
} else if (view == repeatButton) {
cycleRepeat();
} else if (view == shuffleButton) {
toggleShuffle();
}
}
/**
* Method refreshCurrentTimeText.
*
* @param pos the {@link long} getPosition of the current track}
*/
private void refreshCurrentTimeText(final long pos) {
if (pos != currentMediaPlayerTime) {
currentTime.setText(StringUtils.makeTimeString(this.getActivity(), pos));
}
currentMediaPlayerTime = pos;
}
public void updateTrackInfo() {
String totalTime = StringUtils.makeTimeString(this.getActivity(), MusicUtils.getDuration() / 1000);
String currentQueuePos = String.valueOf(MusicUtils.getQueuePosition() + 1);
String queueLength = String.valueOf(MusicUtils.getQueue().size());
if (totalTime != null && totalTime.length() != 0) {
this.totalTime.setText(totalTime);
}
Song song = MusicUtils.getSong();
if (song != null) {
track.setText(song.name);
track.setSelected(true);
album.setText(String.format("%s | %s", song.artistName, song.albumName));
}
// queuePosition.setText(String.format("%s / %s", currentQueuePos, queueLength));
FragmentActivity activity = getActivity();
if (activity != null) {
activity.supportInvalidateOptionsMenu();
}
Fragment fragment = getChildFragmentManager().findFragmentById(R.id.main_container);
if (fragment != null && fragment instanceof LyricsFragment) {
((LyricsFragment) fragment).updateLyrics();
}
}
private final RepeatingImageButton.RepeatListener mRewindListener = (v, howlong, repcnt) -> scanBackward(repcnt, howlong);
private final RepeatingImageButton.RepeatListener mFastForwardListener = (v, howlong, repcnt) -> scanForward(repcnt, howlong);
public void scanForward(final int repcnt, long delta) {
if (repcnt == 0) {
startSeekPos = MusicUtils.getPosition();
lastSeekEventTime = 0;
} else {
if (delta < 5000) {
// seek at 10x speed for the first 5 seconds
delta = delta * 10;
} else {
// seek at 40x after that
delta = 50000 + (delta - 5000) * 40;
}
long newpos = startSeekPos + delta;
final long duration = MusicUtils.getDuration();
if (newpos >= duration) {
// move to next track
MusicUtils.next();
startSeekPos -= duration; // is OK to go negative
newpos -= duration;
}
if (delta - lastSeekEventTime > 250 || repcnt < 0) {
MusicUtils.seekTo(newpos);
lastSeekEventTime = delta;
}
}
}
public void scanBackward(final int repcnt, long delta) {
if (repcnt == 0) {
startSeekPos = MusicUtils.getPosition();
lastSeekEventTime = 0;
} else {
if (delta < 5000) {
// seek at 10x speed for the first 5 seconds
delta = delta * 10;
} else {
// seek at 40x after that
delta = 50000 + (delta - 5000) * 40;
}
long newpos = startSeekPos - delta;
if (newpos < 0) {
// move to previous track
MusicUtils.previous(true);
final long duration = MusicUtils.getDuration();
startSeekPos += duration;
newpos += duration;
}
if (delta - lastSeekEventTime > 250 || repcnt < 0) {
MusicUtils.seekTo(newpos);
lastSeekEventTime = delta;
}
}
}
public void setShuffleButtonImage() {
if (shuffleButton == null) {
return;
}
switch (MusicUtils.getShuffleMode()) {
case MusicService.ShuffleMode.OFF:
shuffleButton.setImageDrawable(DrawableUtils.getWhiteDrawable(getActivity(), R.drawable.ic_shuffle_white));
shuffleButton.setContentDescription(getString(R.string.btn_shuffle_off));
break;
default:
shuffleButton.setImageDrawable(DrawableUtils.getColoredAccentDrawableNonWhite(getActivity(), getResources().getDrawable(R.drawable.ic_shuffle_white)));
shuffleButton.setContentDescription(getString(R.string.btn_shuffle_on));
break;
}
}
public void setPauseButtonImage() {
if (playPauseView == null) {
return;
}
if (MusicUtils.isPlaying()) {
if (playPauseView.isPlay()) {
playPauseView.toggle();
playPauseView.setContentDescription(getString(R.string.btn_pause));
}
} else {
if (!playPauseView.isPlay()) {
playPauseView.toggle();
playPauseView.setContentDescription(getString(R.string.btn_play));
}
}
}
public void setRepeatButtonImage() {
if (repeatButton == null) {
return;
}
switch (MusicUtils.getRepeatMode()) {
case MusicService.RepeatMode.ALL:
repeatButton.setImageDrawable(DrawableUtils.getColoredAccentDrawableNonWhite(getActivity(), getResources().getDrawable(R.drawable.ic_repeat_white)));
repeatButton.setContentDescription(getResources().getString(R.string.btn_repeat_all));
break;
case MusicService.RepeatMode.ONE:
repeatButton.setImageDrawable(DrawableUtils.getColoredAccentDrawableNonWhite(getActivity(), getResources().getDrawable(R.drawable.ic_repeat_one_white)));
repeatButton.setContentDescription(getResources().getString(R.string.btn_repeat_current));
break;
default:
repeatButton.setImageDrawable(DrawableUtils.getWhiteDrawable(getActivity(), R.drawable.ic_repeat_white));
repeatButton.setContentDescription(getResources().getString(R.string.btn_repeat_off));
break;
}
}
private void cycleRepeat() {
MusicUtils.cycleRepeat();
setRepeatButtonImage();
}
private void toggleShuffle() {
MusicUtils.toggleShuffleMode();
setRepeatButtonImage();
setShuffleButtonImage();
}
=======
>>>>>>> |
<<<<<<<
import android.util.Log;
=======
>>>>>>>
import android.util.Log; |
<<<<<<<
store.submitGetAllRequest(keys, transforms, callback);
=======
store.submitGetAllRequest(keys, callback, timeoutMs);
>>>>>>>
store.submitGetAllRequest(keys, transforms, callback, timeoutMs); |
<<<<<<<
=======
private boolean editable;
private boolean showAlbumArt;
private boolean showPlayCount;
>>>>>>>
<<<<<<<
public void setPrefix(PrefixHighlighter prefixHighlighter, char[] prefix) {
this.prefixHighlighter = prefixHighlighter;
this.prefix = prefix;
}
=======
public void setShowPlayCount(boolean showPlayCount) {
this.showPlayCount = showPlayCount;
}
private boolean showTrackNumber = false;
>>>>>>>
public void setShowPlayCount(boolean showPlayCount) {
this.showPlayCount = showPlayCount;
}
public void setPrefix(PrefixHighlighter prefixHighlighter, char[] prefix) {
this.prefixHighlighter = prefixHighlighter;
this.prefix = prefix;
} |
<<<<<<<
View rootView;
=======
>>>>>>> |
<<<<<<<
contextualToolbar.setOnMenuItemClickListener(
AlbumArtistMenuUtils.getAlbumArtistMenuClickListener(getContext(), mediaManager, Single.defer(() -> Single.just(contextualToolbarHelper.getItems())),
albumArtistMenuFragmentHelper.getCallbacks()));
=======
contextualToolbar.setOnMenuItemClickListener(
AlbumArtistMenuUtils.getAlbumArtistMenuClickListener(
getContext(),
Single.defer(() -> Single.just(contextualToolbarHelper.getItems())),
albumArtistMenuFragmentHelper.getCallbacks()
));
>>>>>>>
contextualToolbar.setOnMenuItemClickListener(
AlbumArtistMenuUtils.getAlbumArtistMenuClickListener(
getContext(),
mediaManager,
Single.defer(() -> Single.just(contextualToolbarHelper.getItems())),
albumArtistMenuFragmentHelper.getCallbacks()
)); |
<<<<<<<
=======
import com.simplecity.amp_library.utils.DialogUtils;
import com.simplecity.amp_library.utils.LogUtils;
>>>>>>>
import com.simplecity.amp_library.utils.DialogUtils;
import com.simplecity.amp_library.utils.LogUtils;
<<<<<<<
contextualToolbar.setOnMenuItemClickListener(MenuUtils.getAlbumMenuClickListener(
getContext(),
() -> Stream.of(contextualToolbarHelper.getItems())
.map(SelectableViewModel::getItem)
.collect(Collectors.toList())
)
);
contextualToolbarHelper = new ContextualToolbarHelper<>(contextualToolbar, new ContextualToolbarHelper.Callback() {
@Override
public void notifyItemChanged(int position) {
adapter.notifyItemChanged(position, 0);
=======
Observable<List<Song>> songsObservable = Observable.defer(() ->
Observable.merge(Stream.of(checkedAlbums)
.map(Album::getSongsObservable)
.collect(Collectors.toList()))
.reduce((songs, songs2) -> Stream.concat(Stream.of(songs), Stream.of(songs2))
.collect(Collectors.toList())));
switch (menuItem.getItemId()) {
case NEW_PLAYLIST:
songsObservable
.observeOn(AndroidSchedulers.mainThread())
.subscribe(songs -> PlaylistUtils.createPlaylistDialog(getActivity(), songs),
error -> LogUtils.logException("AlbumFragment: Error creating new playlist", error));
return true;
case PLAYLIST_SELECTED:
songsObservable
.observeOn(AndroidSchedulers.mainThread())
.subscribe(songs -> {
Playlist playlist = (Playlist) menuItem.getIntent().getSerializableExtra(ShuttleUtils.ARG_PLAYLIST);
PlaylistUtils.addToPlaylist(getContext(), playlist, songs);
}, error -> LogUtils.logException("AlbumFragment: Error adding to playlist", error));
return true;
case R.id.delete: {
new DialogUtils.DeleteDialogBuilder()
.context(getContext())
.singleMessageId(R.string.delete_album_artist_desc)
.multipleMessage(R.string.delete_album_artist_desc_multiple)
.itemNames(Stream.of(checkedAlbums)
.map(album -> album.name)
.collect(Collectors.toList()))
.songsToDelete(songsObservable)
.build()
.show();
mode.finish();
return true;
}
case R.id.menu_add_to_queue: {
songsObservable
.observeOn(AndroidSchedulers.mainThread())
.subscribe(songs -> MusicUtils.addToQueue(getActivity(), songs) ,
error -> LogUtils.logException("AlbumFragment: Error adding to queue", error));
break;
>>>>>>>
contextualToolbar.setOnMenuItemClickListener(MenuUtils.getAlbumMenuClickListener(
getContext(),
() -> Stream.of(contextualToolbarHelper.getItems())
.map(SelectableViewModel::getItem)
.collect(Collectors.toList())
)
);
contextualToolbarHelper = new ContextualToolbarHelper<>(contextualToolbar, new ContextualToolbarHelper.Callback() {
@Override
public void notifyItemChanged(int position) {
adapter.notifyItemChanged(position, 0); |
<<<<<<<
import com.simplecity.amp_library.utils.playlists.FavoritesPlaylistManager;
import dagger.android.AndroidInjection;
=======
>>>>>>>
import com.simplecity.amp_library.utils.playlists.FavoritesPlaylistManager;
import dagger.android.AndroidInjection;
<<<<<<<
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.List;
import javax.inject.Inject;
=======
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.List;
>>>>>>>
import java.util.ArrayList;
import java.util.ConcurrentModificationException;
import java.util.List;
import javax.inject.Inject;
<<<<<<<
private PlaybackManager playbackManager;
private DummyNotificationHelper dummyNotificationHelper = new DummyNotificationHelper();
@Inject
Repository.SongsRepository songsRepository;
@Inject
Repository.AlbumsRepository albumsRepository;
@Inject
Repository.AlbumArtistsRepository albumArtistsRepository;
@Inject
Repository.PlaylistsRepository playlistsRepository;
@Inject
Repository.GenresRepository genresRepository;
@Inject
PlaybackSettingsManager playbackSettingsManager;
@Inject
SettingsManager settingsManager;
@Inject
AnalyticsManager analyticsManager;
@Inject
FavoritesPlaylistManager favoritesPlaylistManager;
=======
private DummyNotificationHelper dummyNotificationHelper = new DummyNotificationHelper();
>>>>>>>
private PlaybackManager playbackManager;
private DummyNotificationHelper dummyNotificationHelper = new DummyNotificationHelper();
@Inject
Repository.SongsRepository songsRepository;
@Inject
Repository.AlbumsRepository albumsRepository;
@Inject
Repository.AlbumArtistsRepository albumArtistsRepository;
@Inject
Repository.PlaylistsRepository playlistsRepository;
@Inject
Repository.GenresRepository genresRepository;
@Inject
PlaybackSettingsManager playbackSettingsManager;
@Inject
SettingsManager settingsManager;
@Inject
AnalyticsManager analyticsManager;
@Inject
FavoritesPlaylistManager favoritesPlaylistManager;
<<<<<<<
String action = intent.getAction();
String command = intent.getStringExtra(MediaButtonCommand.CMD_NAME);
analyticsManager.dropBreadcrumb(TAG, String.format("onStartCommand() Action: %s, Command: %s", action, command));
if (command != null) {
action = commandToAction(command);
=======
final String action = intent.getAction();
String cmd = intent.getStringExtra("command");
AnalyticsManager.dropBreadcrumb(TAG, String.format("onStartCommand() Action: %s, Command: %s", action, cmd));
if (MediaButtonCommand.NEXT.equals(cmd) || ServiceCommand.NEXT_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
gotoNext(true);
} else if (MediaButtonCommand.PREVIOUS.equals(cmd) || ServiceCommand.PREV_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
if (getSeekPosition() < 2000) {
previous();
} else {
seekTo(0);
play();
}
} else if (MediaButtonCommand.TOGGLE_PAUSE.equals(cmd) || ServiceCommand.TOGGLE_PAUSE_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
if (isPlaying()) {
AnalyticsManager.dropBreadcrumb(TAG, "Pausing due to media button or service command");
pause();
} else {
play();
}
} else if (MediaButtonCommand.PAUSE.equals(cmd) || ServiceCommand.PAUSE_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
AnalyticsManager.dropBreadcrumb(TAG, "Pausing due to media button or service command (2)");
pause();
} else if (MediaButtonCommand.PLAY.equals(cmd)) {
dummyNotificationHelper.showDummyNotification(this);
play();
} else if (ServiceCommand.STOP_ACTION.equals(action) || MediaButtonCommand.STOP.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
AnalyticsManager.dropBreadcrumb(TAG, "Pausing due to media button or service stop command");
pause();
releaseServiceUiAndStop();
notificationStateHandler.removeCallbacksAndMessages(null);
//For some reason, the notification will only fuck off if this call is delayed.
new Handler().postDelayed(() -> stopForegroundImpl(true, false), 150);
} else if (ServiceCommand.SHUFFLE_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
toggleShuffleMode();
} else if (ServiceCommand.REPEAT_ACTION.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
toggleRepeat();
} else if (MediaButtonCommand.TOGGLE_FAVORITE.equals(action) || ServiceCommand.TOGGLE_FAVORITE.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
toggleFavorite();
} else if (ExternalIntents.PLAY_STATUS_REQUEST.equals(action)) {
dummyNotificationHelper.showDummyNotification(this);
notifyChange(ExternalIntents.PLAY_STATUS_RESPONSE);
} else if (ServiceCommand.SHUTDOWN.equals(action)) {
shutdownScheduled = false;
releaseServiceUiAndStop();
return START_NOT_STICKY;
>>>>>>>
String action = intent.getAction();
String command = intent.getStringExtra(MediaButtonCommand.CMD_NAME);
analyticsManager.dropBreadcrumb(TAG, String.format("onStartCommand() Action: %s, Command: %s", action, command));
if (command != null) {
action = commandToAction(command);
<<<<<<<
dummyNotificationHelper.showDummyNotification(this);
// If the service is not already started:
// - No queue: ANR
// - With queue: No ANR
// Possible solution: (A) Show the Shuttle notification, despite the fact that music isn't playing. Need to customise notification to allow for an empty queue (no current song)
=======
dummyNotificationHelper.showDummyNotification(this);
>>>>>>>
dummyNotificationHelper.showDummyNotification(this);
// If the service is not already started:
// - No queue: ANR
// - With queue: No ANR
// Possible solution: (A) Show the Shuttle notification, despite the fact that music isn't playing. Need to customise notification to allow for an empty queue (no current song)
<<<<<<<
dummyNotificationHelper.showDummyNotification(this);
// If service is not already started: ANR
=======
dummyNotificationHelper.showDummyNotification(this);
>>>>>>>
dummyNotificationHelper.showDummyNotification(this);
// If service is not already started: ANR
<<<<<<<
if (notificationHelper.startForeground(
this,
playlistsRepository,
songsRepository,
queueManager.getCurrentSong(),
isPlaying(),
playbackManager.getMediaSessionToken(),
settingsManager,
favoritesPlaylistManager
)) {
dummyNotificationHelper.setForegroundedByApp(true);
}
=======
if (notificationHelper.startForeground(this, queueManager.getCurrentSong(), isPlaying(), playbackManager.getMediaSessionToken())) {
dummyNotificationHelper.setForegroundedByApp(true);
}
>>>>>>>
if (notificationHelper.startForeground(
this,
playlistsRepository,
songsRepository,
queueManager.getCurrentSong(),
isPlaying(),
playbackManager.getMediaSessionToken(),
settingsManager,
favoritesPlaylistManager
)) {
dummyNotificationHelper.setForegroundedByApp(true);
} |
<<<<<<<
private AnalyticsManager analyticsManager;
public MusicNotificationHelper(Context context, AnalyticsManager analyticsManager) {
=======
private CompositeDisposable compositeDisposable = new CompositeDisposable();
public MusicNotificationHelper(Context context) {
>>>>>>>
private AnalyticsManager analyticsManager;
private CompositeDisposable compositeDisposable = new CompositeDisposable();
public MusicNotificationHelper(Context context, AnalyticsManager analyticsManager) {
<<<<<<<
favoritesPlaylistManager.isFavorite(song)
=======
compositeDisposable.add(PlaylistUtils.isFavorite(song)
>>>>>>>
compositeDisposable.add(favoritesPlaylistManager.isFavorite(song) |
<<<<<<<
import es.moki.ratelimitj.core.limiter.request.ReactiveRequestRateLimiter;
import es.moki.ratelimitj.core.limiter.request.RequestLimitRule;
import es.moki.ratelimitj.core.limiter.request.RequestRateLimiter;
=======
import es.moki.ratelimitj.core.limiter.request.*;
>>>>>>>
import es.moki.ratelimitj.core.limiter.request.*;
import es.moki.ratelimitj.core.limiter.request.ReactiveRequestRateLimiter;
import es.moki.ratelimitj.core.limiter.request.RequestLimitRule;
import es.moki.ratelimitj.core.limiter.request.RequestRateLimiter;
<<<<<<<
// TODO on upgrade to Lettuce 5.1.0 check for new RedisNoScriptException
private static final Predicate<Throwable> STARTS_WITH_NO_SCRIPT_ERROR = e -> e.getMessage().startsWith("NOSCRIPT");
private final LimitRuleJsonSerialiser serialiser = new LimitRuleJsonSerialiser();
private final RedisScriptingReactiveCommands<String, String> redisScriptingReactiveCommands;
private final RedisKeyReactiveCommands<String, String> redisKeyCommands;
=======
private final StatefulRedisConnection<String, String> connection;
>>>>>>>
// TODO on upgrade to Lettuce 5.1.0 check for new RedisNoScriptException
private static final Predicate<Throwable> STARTS_WITH_NO_SCRIPT_ERROR = e -> e.getMessage().startsWith("NOSCRIPT");
private final RedisScriptingReactiveCommands<String, String> redisScriptingReactiveCommands;
private final RedisKeyReactiveCommands<String, String> redisKeyCommands;
<<<<<<<
requireNonNull(redisScriptingReactiveCommands, "redisScriptingReactiveCommands can not be null");
requireNonNull(redisKeyCommands, "redisKeyCommands can not be null");
this.redisScriptingReactiveCommands = redisScriptingReactiveCommands;
this.redisKeyCommands = redisKeyCommands;
scriptLoader = new RedisScriptLoader(redisScriptingReactiveCommands, "sliding-window-ratelimit.lua");
rulesJson = serialiserLimitRules(rules);
=======
requireNonNull(connection, "connection can not be null");
this.connection = connection;
scriptLoader = new RedisScriptLoader(connection, "sliding-window-ratelimit.lua");
requestLimitRulesSupplier = new SerializedRequestLimitRulesSupplier(rules);
>>>>>>>
requireNonNull(redisScriptingReactiveCommands, "redisScriptingReactiveCommands can not be null");
requireNonNull(redisKeyCommands, "redisKeyCommands can not be null");
this.redisScriptingReactiveCommands = redisScriptingReactiveCommands;
this.redisKeyCommands = redisKeyCommands;
scriptLoader = new RedisScriptLoader(redisScriptingReactiveCommands, "sliding-window-ratelimit.lua");
requestLimitRulesSupplier = new SerializedRequestLimitRulesSupplier(rules);
<<<<<<<
private String serialiserLimitRules(Set<RequestLimitRule> rules) {
return serialiser.encode(rules);
}
=======
// TODO support multi keys
public CompletionStage<Boolean> overLimitAsync(String key) {
return overLimitAsync(key, 1);
}
public CompletionStage<Boolean> overLimitAsync(String key, int weight) {
return eqOrGeLimitAsync(key, weight, true);
}
@Override
public CompletionStage<Boolean> resetLimitAsync(String key) {
return connection.async().del(key).thenApply(result -> 1 == result);
}
>>>>>>> |
<<<<<<<
pageTitle.setConvertedText(summary.getApiTitle());
revision = summary.getRevision();
=======
>>>>>>>
revision = summary.getRevision();
<<<<<<<
disposables.add(ServiceFactory.getRest(pageTitle.getWikiSite()).getMediaList(pageTitle.getConvertedText(), revision)
=======
disposables.add(ServiceFactory.getRest(pageTitle.getWikiSite()).getMediaList(pageTitle.getPrefixedText())
>>>>>>>
disposables.add(ServiceFactory.getRest(pageTitle.getWikiSite()).getMediaList(pageTitle.getPrefixedText(), revision) |
<<<<<<<
addDescriptionsTask.setImagePlaceHolderShown(true);
addDescriptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_short_text_white_24dp));
addDescriptionsTask.setNoActionLayout(true);
translateDescriptionsTeaserTask = new SuggestedEditsTask();
translateDescriptionsTeaserTask.setTitle(getString(R.string.suggested_edits_task_multilingual_title));
translateDescriptionsTeaserTask.setDescription(getString(R.string.suggested_edits_task_multilingual_description));
translateDescriptionsTeaserTask.setImagePlaceHolderShown(false);
translateDescriptionsTeaserTask.setNoActionLayout(false);
translateDescriptionsTeaserTask.setDisabled(!Prefs.isSuggestedEditsTranslateDescriptionsUnlocked());
translateDescriptionsTeaserTask.setEnabledPositiveActionString(getString(R.string.suggested_edits_task_multilingual_positive));
translateDescriptionsTeaserTask.setEnabledNegativeActionString(getString(R.string.suggested_edits_task_multilingual_negative));
=======
addDescriptionsTask.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.ic_short_text_white_24dp));
>>>>>>>
addDescriptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_short_text_white_24dp));
<<<<<<<
translateDescriptionsTask.setImagePlaceHolderShown(true);
translateDescriptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_translate_title_descriptions));
translateDescriptionsTask.setNoActionLayout(Prefs.isSuggestedEditsTranslateDescriptionsUnlocked());
translateDescriptionsTask.setDisabled(!Prefs.isSuggestedEditsTranslateDescriptionsUnlocked());
=======
translateDescriptionsTask.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.ic_icon_translate_title_descriptions));
>>>>>>>
translateDescriptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_translate_title_descriptions));
<<<<<<<
addImageCaptionsTask.setImagePlaceHolderShown(true);
addImageCaptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_caption_images));
=======
addImageCaptionsTask.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.ic_icon_caption_images));
>>>>>>>
addImageCaptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_caption_images));
<<<<<<<
translateImageCaptionsTask.setImagePlaceHolderShown(true);
translateImageCaptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_caption_translate));
translateImageCaptionsTask.setNoActionLayout(Prefs.isSuggestedEditsTranslateCaptionsUnlocked());
translateImageCaptionsTask.setDisabled(!Prefs.isSuggestedEditsTranslateCaptionsUnlocked());
=======
translateImageCaptionsTask.setImageDrawable(ContextCompat.getDrawable(requireContext(), R.drawable.ic_icon_caption_translate));
multilingualTeaserTask = new SuggestedEditsTask();
multilingualTeaserTask.setTitle(getString(R.string.suggested_edits_task_multilingual_title));
multilingualTeaserTask.setDescription(getString(R.string.suggested_edits_task_multilingual_description));
multilingualTeaserTask.setShowImagePlaceholder(false);
multilingualTeaserTask.setShowActionLayout(true);
multilingualTeaserTask.setDisabled(!Prefs.isSuggestedEditsTranslateDescriptionsUnlocked());
multilingualTeaserTask.setUnlockActionPositiveButtonString(getString(R.string.suggested_edits_task_multilingual_positive));
multilingualTeaserTask.setUnlockActionNegativeButtonString(getString(R.string.suggested_edits_task_multilingual_negative));
>>>>>>>
translateImageCaptionsTask.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_icon_caption_translate));
multilingualTeaserTask = new SuggestedEditsTask();
multilingualTeaserTask.setTitle(getString(R.string.suggested_edits_task_multilingual_title));
multilingualTeaserTask.setDescription(getString(R.string.suggested_edits_task_multilingual_description));
multilingualTeaserTask.setShowImagePlaceholder(false);
multilingualTeaserTask.setShowActionLayout(true);
multilingualTeaserTask.setDisabled(!Prefs.isSuggestedEditsTranslateDescriptionsUnlocked());
multilingualTeaserTask.setUnlockActionPositiveButtonString(getString(R.string.suggested_edits_task_multilingual_positive));
multilingualTeaserTask.setUnlockActionNegativeButtonString(getString(R.string.suggested_edits_task_multilingual_negative)); |
<<<<<<<
if (!leadImagesHandler.isLeadImageEnabled()) {
bridge.execute(JavaScriptActionHandler.setTopMargin(leadImagesHandler.getTopMargin()));
}
editHandler.setPage(model.getPage());
=======
>>>>>>>
editHandler.setPage(model.getPage()); |
<<<<<<<
=======
import org.wikipedia.settings.languages.WikipediaLanguagesActivity;
>>>>>>>
import org.wikipedia.settings.languages.WikipediaLanguagesActivity;
<<<<<<<
@BindView(R.id.my_contributions_progress_view) MyContributionsProgressView myContributionsProgressView;
=======
@BindView(R.id.username) TextView username;
@BindView(R.id.contributions_text) TextView contributionsText;
>>>>>>>
@BindView(R.id.my_contributions_progress_view) MyContributionsProgressView myContributionsProgressView;
<<<<<<<
private void updateMyContributionsInfo() {
// TODO: using the endpoint to update the information
myContributionsProgressView.update(1, Prefs.getTotalUserDescriptionsEdited());
=======
private void updateUI() {
username.setText(AccountUtil.getUserName());
contributionsText.setText(getResources().getQuantityString(R.plurals.edit_action_contribution_count,
Prefs.getTotalUserDescriptionsEdited(), Prefs.getTotalUserDescriptionsEdited()));
requireActivity().invalidateOptionsMenu();
>>>>>>>
private void updateMyContributionsInfo() {
// TODO: using the endpoint to update the information
myContributionsProgressView.update(Prefs.getTotalUserDescriptionsEdited());
requireActivity().invalidateOptionsMenu();
<<<<<<<
case R.id.menu_help:
=======
case R.id.edit_tasks_menu_help:
>>>>>>>
case R.id.menu_help: |
<<<<<<<
config.getSocketKeepAlive(),
config.isJmxEnabled());
=======
config.getSocketKeepAlive());
if(config.isJmxEnabled())
JmxUtils.registerMbean(storeFactory,
JmxUtils.createObjectName(JmxUtils.getPackageName(storeFactory.getClass()),
JmxUtils.getClassName(storeFactory.getClass())
+ jmxId()));
>>>>>>>
config.getSocketKeepAlive(),
config.isJmxEnabled());
if(config.isJmxEnabled())
JmxUtils.registerMbean(storeFactory,
JmxUtils.createObjectName(JmxUtils.getPackageName(storeFactory.getClass()),
JmxUtils.getClassName(storeFactory.getClass())
+ jmxId())); |
<<<<<<<
import androidx.annotation.NonNull;
=======
>>>>>>> |
<<<<<<<
@NonNull public void setSections(List<Section> sections) {
this.sections = sections;
}
=======
public String getConvertedTitle() {
return title.getConvertedText();
}
>>>>>>>
@NonNull public void setSections(List<Section> sections) {
this.sections = sections;
}
public String getConvertedTitle() {
return title.getConvertedText();
} |
<<<<<<<
new SlopSerializer(),
new IdentitySerializer()));
=======
new SlopSerializer()));
scheduler.schedule(new SlopPusherJob(storeRepository,
metadata.getCluster(),
failureDetector,
voldemortConfig.getSlopMaxWriteBytesPerSec()),
new Date(),
voldemortConfig.getSlopFrequencyMs());
>>>>>>>
new SlopSerializer(),
new IdentitySerializer()));
scheduler.schedule(new SlopPusherJob(storeRepository,
metadata.getCluster(),
failureDetector,
voldemortConfig.getSlopMaxWriteBytesPerSec()),
new Date(),
voldemortConfig.getSlopFrequencyMs());
<<<<<<<
store = new LoggingStore<ByteArray, byte[], byte[]>(store,
cluster.getName(),
SystemTime.INSTANCE);
=======
store = new LoggingStore<ByteArray, byte[]>(store,
cluster.getName(),
SystemTime.INSTANCE);
if(!"slop".equals(store.getName())) {
if(voldemortConfig.isRedirectRoutingEnabled())
store = new RedirectingStore(store,
metadata,
storeRepository,
failureDetector,
storeFactory);
>>>>>>>
store = new LoggingStore<ByteArray, byte[], byte[]>(store,
cluster.getName(),
SystemTime.INSTANCE);
if(!"slop".equals(store.getName())) {
if(voldemortConfig.isRedirectRoutingEnabled())
store = new RedirectingStore(store,
metadata,
storeRepository,
failureDetector,
storeFactory);
<<<<<<<
Store<ByteArray, byte[], byte[]> store = routedStoreFactory.create(cluster,
def,
nodeStores,
nonblockingStores,
true,
cluster.getNodeById(localNode)
.getZoneId(),
failureDetector);
=======
Store<ByteArray, byte[]> store = routedStoreFactory.create(cluster,
def,
nodeStores,
nonblockingStores,
null,
true,
cluster.getNodeById(localNode)
.getZoneId(),
failureDetector);
>>>>>>>
Store<ByteArray, byte[], byte[]> store = routedStoreFactory.create(cluster,
def,
nodeStores,
nonblockingStores,
null,
true,
cluster.getNodeById(localNode)
.getZoneId(),
failureDetector); |
<<<<<<<
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TRANSLATE_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.NAV_MENU;
import static org.wikipedia.Constants.InvokeSource.NOTIFICATION;
import static org.wikipedia.Constants.InvokeSource.ONBOARDING_DIALOG;
=======
import androidx.annotation.NonNull;
>>>>>>>
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TRANSLATE_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.NAV_MENU;
import static org.wikipedia.Constants.InvokeSource.NOTIFICATION;
import static org.wikipedia.Constants.InvokeSource.ONBOARDING_DIALOG;
import androidx.annotation.NonNull; |
<<<<<<<
populateData(updatedCluster, Arrays.asList(0, 1, 2));
=======
populateData(updatedCluster, Arrays.asList(0, 1, 2), rebalanceClient.getAdminClient());
>>>>>>>
populateData(updatedCluster, Arrays.asList(0, 1, 2), rebalanceClient.getAdminClient());
<<<<<<<
populateData(updatedCluster, Arrays.asList(0, 1));
=======
populateData(updatedCluster, Arrays.asList(0, 1), rebalanceClient.getAdminClient());
>>>>>>>
populateData(updatedCluster, Arrays.asList(0, 1), rebalanceClient.getAdminClient());
<<<<<<<
final StoreClient<String, String, String> storeClient = new DefaultStoreClient<String, String, String>(testStoreName,
null,
factory,
3);
=======
final StoreClient<String, String> storeClient = new DefaultStoreClient<String, String>(testStoreNameRW,
null,
factory,
3);
>>>>>>>
final StoreClient<String, String, String> storeClient = new DefaultStoreClient<String, String, String>(testStoreNameRW,
null,
factory,
3);
<<<<<<<
final StoreClient<String, String, String> storeClient = new DefaultStoreClient<String, String, String>(testStoreName,
null,
factory,
3);
=======
final StoreClient<String, String> storeClient = new DefaultStoreClient<String, String>(testStoreNameRW,
null,
factory,
3);
>>>>>>>
final StoreClient<String, String, String> storeClient = new DefaultStoreClient<String, String, String>(testStoreNameRW,
null,
factory,
3);
<<<<<<<
final Store<ByteArray, byte[], byte[]> serverSideRoutingStore = getSocketStore(testStoreName,
node.getHost(),
node.getSocketPort(),
true);
=======
final Store<ByteArray, byte[]> serverSideRoutingStore = getSocketStore(testStoreNameRW,
node.getHost(),
node.getSocketPort(),
true);
>>>>>>>
final Store<ByteArray, byte[], byte[]> serverSideRoutingStore = getSocketStore(testStoreNameRW,
node.getHost(),
node.getSocketPort(),
true);
<<<<<<<
Store<ByteArray, byte[], byte[]> store = getSocketStore(testStoreName,
node.getHost(),
node.getSocketPort());
=======
Store<ByteArray, byte[]> storeRW = getSocketStore(testStoreNameRW,
node.getHost(),
node.getSocketPort());
Store<ByteArray, byte[]> storeRO = getSocketStore(testStoreNameRO,
node.getHost(),
node.getSocketPort());
>>>>>>>
Store<ByteArray, byte[], byte[]> storeRW = getSocketStore(testStoreNameRW,
node.getHost(),
node.getSocketPort());
Store<ByteArray, byte[], byte[]> storeRO = getSocketStore(testStoreNameRO,
node.getHost(),
node.getSocketPort());
<<<<<<<
List<Versioned<byte[]>> value = store.get(keyBytes, null);
=======
List<Versioned<byte[]>> value = storeRW.get(keyBytes);
>>>>>>>
List<Versioned<byte[]>> value = storeRW.get(keyBytes, null);
<<<<<<<
List<Versioned<byte[]>> values = store.get(keyBytes, null);
=======
List<Versioned<byte[]>> values = storeRW.get(keyBytes);
>>>>>>>
List<Versioned<byte[]>> values = storeRW.get(keyBytes, null); |
<<<<<<<
=======
import androidx.annotation.NonNull;
import org.apache.commons.lang3.StringUtils;
>>>>>>>
import androidx.annotation.NonNull;
<<<<<<<
import io.reactivex.annotations.NonNull;
=======
>>>>>>> |
<<<<<<<
=======
import android.os.Build;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.View;
>>>>>>>
<<<<<<<
import androidx.annotation.VisibleForTesting;
=======
>>>>>>>
<<<<<<<
=======
import org.wikipedia.util.L10nUtil;
import org.wikipedia.util.ReleaseUtil;
import org.wikipedia.util.ResourceUtil;
>>>>>>>
<<<<<<<
// kick off an event to the WebView that will cause it to clear its contents,
// and then report back to us when the clearing is complete, so that we can synchronize
// the transitions of our native components to the new page content.
// The callback event from the WebView will then call the loadOnWebViewReady()
// function, which will continue the loading process.
if (model.getTitle().getThumbUrl() == null) {
leadImagesHandler.hide();
}
// Kick off by checking whether this page exists in a reading list, since that will determine
// whether we'll (re)save it to offline cache.
=======
>>>>>>>
<<<<<<<
public void onConfigurationChanged() {
leadImagesHandler.beginLayout();
if (fragment.isAdded()) {
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
}
bridge.execute(JavaScriptActionHandler.setTopMargin(leadImagesHandler.getTopMarginForContent()));
=======
public void onConfigurationChanged() {
leadImagesHandler.loadLeadImage();
leadImagesHandler.setWebViewPaddingTop();
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
>>>>>>>
public void onConfigurationChanged() {
leadImagesHandler.loadLeadImage();
bridge.execute(JavaScriptActionHandler.setTopMargin(leadImagesHandler.getPaddingTop()));
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
<<<<<<<
@VisibleForTesting
protected void commonSectionFetchOnCatch(@NonNull Throwable caught) {
if (!fragment.isAdded()) {
=======
private void commonSectionFetchOnCatch(@NonNull Throwable caught, int startSequenceNum) {
if (!fragment.isAdded() || !sequenceNumber.inSync(startSequenceNum)) {
>>>>>>>
protected void commonSectionFetchOnCatch(@NonNull Throwable caught) {
if (!fragment.isAdded()) {
<<<<<<<
=======
private void setUpBridgeListeners() {
bridge.addListener("loadRemainingError", (messageType, payload) -> {
try {
if (!fragment.isAdded() || model.getTitle() == null || !sequenceNumber.inSync(payload.getInt("sequence"))) {
return;
}
commonSectionFetchOnCatch(new HttpStatusException(new okhttp3.Response.Builder()
.code(payload.getInt("status")).protocol(Protocol.HTTP_1_1).message("")
.request(new Request.Builder()
.url(model.getTitle().getMobileUri()).build()).build()),
payload.getInt("sequence"));
} catch (JSONException e) {
L.logRemoteErrorIfProd(e);
}
});
bridge.addListener("pageLoadComplete", (messageType, payload) -> {
if (!fragment.isAdded()) {
return;
}
app.getSessionFunnel().restSectionsFetchEnd();
if (fragment.callback() != null) {
fragment.callback().onPageUpdateProgressBar(false, true, 0);
}
try {
if (model.getPage() == null || !sequenceNumber.inSync(payload.getInt("sequence"))) {
return;
}
if (payload.has("sections")) {
// augment our current Page object with updated Sections received from JS
List<Section> sectionList = new ArrayList<>();
JSONArray sections = payload.getJSONArray("sections");
for (int i = 0; i < sections.length(); i++) {
JSONObject s = sections.getJSONObject(i);
sectionList.add(new Section(s.getInt("id"),
s.getInt("toclevel") - 1,
s.getString("line"),
s.getString("anchor"),
""));
}
Page page = model.getPage();
page.getSections().addAll(sectionList);
}
} catch (JSONException e) {
L.e(e);
}
loading = false;
networkErrorCallback = null;
fragment.onPageLoadComplete();
});
}
>>>>>>>
<<<<<<<
=======
private void pageLoadLeadSection(final int startSequenceNum) {
>>>>>>>
<<<<<<<
private void updateThumbnail(String thumbUrl) {
model.getTitle().setThumbUrl(thumbUrl);
model.getTitleOriginal().setThumbUrl(thumbUrl);
}
=======
private void pageLoadDisplayLeadSection() {
Page page = model.getPage();
Request remainingRequest = PageClientFactory.create(model.getTitle().getWikiSite(), model.getTitle().namespace())
.sectionsUrl(model.getTitle().getWikiSite(), model.shouldForceNetwork() ? CacheControl.FORCE_NETWORK : null,
model.shouldSaveOffline() ? OfflineCacheInterceptor.SAVE_HEADER_SAVE : null,
model.getTitle().getPrefixedText());
sendLeadSectionPayload(page, remainingRequest.url().toString());
if (webView.getVisibility() != View.VISIBLE) {
webView.setVisibility(View.VISIBLE);
}
refreshView.setRefreshing(false);
if (fragment.callback() != null) {
fragment.callback().onPageUpdateProgressBar(true, true, 0);
}
}
private void sendLeadSectionPayload(@NonNull Page page, @NonNull String remainingUrl) {
JSONObject leadSectionPayload = leadSectionPayload(page, remainingUrl);
bridge.sendMessage("displayLeadSection", leadSectionPayload);
app.getSessionFunnel().restSectionsFetchStart();
}
@SuppressWarnings("checkstyle:magicnumber")
private JSONObject setLeadSectionMetadata(@NonNull JSONObject obj,
@NonNull Page page) throws JSONException {
SparseArray<String> localizedStrings = localizedStrings(page);
return obj.put("sequence", sequenceNumber.get())
.put("title", page.getDisplayTitle())
.put("description", StringUtils.capitalize(model.getTitle().getDescription()))
.put("allowDescriptionEdit", DescriptionEditUtil.isEditAllowed(page))
.put("hasPronunciation", !TextUtils.isEmpty(page.getTitlePronunciationUrl()))
.put("string_table_infobox", localizedStrings.get(R.string.table_infobox))
.put("string_table_other", localizedStrings.get(R.string.table_other))
.put("string_table_close", localizedStrings.get(R.string.table_close))
.put("string_expand_refs", localizedStrings.get(R.string.expand_refs))
.put("string_add_description", localizedStrings.get(R.string.description_edit_add_description))
.put("isBeta", ReleaseUtil.isPreProdRelease()) // True for any non-production release type
.put("siteLanguage", model.getTitle().getWikiSite().languageCode())
.put("siteBaseUrl", model.getTitle().getWikiSite().url())
.put("isMainPage", page.isMainPage())
.put("isFilePage", page.isFilePage())
.put("fromRestBase", page.isFromRestBase())
.put("apiLevel", Build.VERSION.SDK_INT)
.put("showImages", Prefs.isImageDownloadEnabled())
.put("collapseTables", Prefs.isCollapseTablesEnabled())
.put("theme", app.getCurrentTheme().getPageLibClass())
.put("imagePlaceholderBackgroundColor", "#" + Integer.toHexString(ResourceUtil.getThemedColor(fragment.requireContext(), android.R.attr.colorBackground) & 0xFFFFFF))
.put("dimImages", app.getCurrentTheme().isDark() && Prefs.shouldDimDarkModeImages())
.put("paddingTop", leadImagesHandler.getPaddingTop())
.put("noedit", !isPageEditable(page)) // Controls whether edit pencils are visible.
.put("protect", page.isProtected());
}
private JSONObject leadSectionPayload(@NonNull Page page, @NonNull String remainingUrl) {
try {
JSONObject wrapper = setLeadSectionMetadata(new JSONObject(), page)
.put("section", page.getSections().get(0).toJSON())
.put("remainingUrl", remainingUrl);
if (sectionTargetFromIntent > 0 && sectionTargetFromIntent < model.getPage().getSections().size()) {
//if we have a section to scroll to (from our Intent):
wrapper.put("fragment", model.getPage().getSections().get(sectionTargetFromIntent).getAnchor());
} else if (sectionTargetFromTitle != null) {
//if we have a section to scroll to (from our PageTitle):
wrapper.put("fragment", sectionTargetFromTitle);
} else if (!TextUtils.isEmpty(model.getTitle().getFragment())) {
// It's possible, that the link was a redirect and the new title has a fragment
// scroll to it, if there was no fragment so far
wrapper.put("fragment", model.getTitle().getFragment());
}
return wrapper;
} catch (JSONException e) {
throw new RuntimeException(e);
}
}
private SparseArray<String> localizedStrings(Page page) {
return getStringsForArticleLanguage(page.getTitle(),
ResourceUtil.getIdArray(fragment.requireContext(), R.array.page_localized_string_ids));
}
private boolean isPageEditable(Page page) {
return (AccountUtil.isLoggedIn() || !isAnonEditingDisabled())
&& !page.isFilePage()
&& !page.isMainPage();
}
private boolean isAnonEditingDisabled() {
return app.getRemoteConfig().getConfig().optBoolean("disableAnonEditing", false);
}
>>>>>>>
private void updateThumbnail(String thumbUrl) {
model.getTitle().setThumbUrl(thumbUrl);
model.getTitleOriginal().setThumbUrl(thumbUrl);
}
<<<<<<<
private void pageLoadLeadSectionComplete(PageLead pageLead) {
if (!fragment.isAdded()) {
=======
private void pageLoadLeadSectionComplete(PageLead pageLead, int startSequenceNum) {
if (!fragment.isAdded() || !sequenceNumber.inSync(startSequenceNum)) {
>>>>>>>
private void pageLoadLeadSectionComplete(PageLead pageLead) {
if (!fragment.isAdded()) {
<<<<<<<
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
fragment.requireActivity().invalidateOptionsMenu();
=======
leadImagesHandler.loadLeadImage();
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
fragment.requireActivity().invalidateOptionsMenu();
>>>>>>>
leadImagesHandler.loadLeadImage();
fragment.setToolbarFadeEnabled(leadImagesHandler.isLeadImageEnabled());
fragment.requireActivity().invalidateOptionsMenu();
<<<<<<<
updateThumbnail(pageImage.getImageName());
}
=======
model.getTitle().setThumbUrl(pageImage.getImageName());
model.getTitleOriginal().setThumbUrl(pageImage.getImageName());
pageLoadDisplayLeadSection();
}
>>>>>>>
model.getTitle().setThumbUrl(pageImage.getImageName());
model.getTitleOriginal().setThumbUrl(pageImage.getImageName());
} |
<<<<<<<
response = new WebResourceResponse(rsp.body().contentType().type() + "/" + rsp.body().contentType().subtype(),
rsp.body().contentType().charset(Charset.defaultCharset()).name(),
rsp.code(),
StringUtils.defaultIfBlank(rsp.message(), "Unknown error"),
toMap(rsp.headers()),
getInputStream(rsp));
=======
return new WebResourceResponse(rsp.body().contentType().type() + "/" + rsp.body().contentType().subtype(),
rsp.body().contentType().charset(Charset.defaultCharset()).name(),
rsp.code(),
StringUtils.defaultIfBlank(rsp.message(), "Unknown error"),
toMap(addResponseHeaders(rsp.headers())),
getInputStream(rsp));
>>>>>>>
response = new WebResourceResponse(rsp.body().contentType().type() + "/" + rsp.body().contentType().subtype(),
rsp.body().contentType().charset(Charset.defaultCharset()).name(),
rsp.code(),
StringUtils.defaultIfBlank(rsp.message(), "Unknown error"),
toMap(addResponseHeaders(rsp.headers())),
getInputStream(rsp)); |
<<<<<<<
public void setState(@NonNull String pageTitle, @NonNull String listTitle, boolean offline) {
=======
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public ReadingListItemActionsView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
init();
}
public void setState(@NonNull String pageTitle, @NonNull String removeFromListText, boolean offline) {
>>>>>>>
public void setState(@NonNull String pageTitle, @NonNull String removeFromListText, boolean offline) { |
<<<<<<<
@Nullable final String retypedPassword, @Nullable final String twoFactorCode,
@Nullable final String loginToken, @NonNull final LoginCallback cb) {
disposables.add(getLoginResponse(wiki, userName, password, retypedPassword, twoFactorCode, loginToken)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap(loginResponse -> {
LoginResult loginResult = loginResponse.toLoginResult(wiki, password);
if (loginResult != null) {
if (loginResult.pass() && !TextUtils.isEmpty(loginResult.getUserName())) {
// The server could do some transformations on user names, e.g. on some
// wikis is uppercases the first letter.
String actualUserName = loginResult.getUserName();
return getExtendedInfo(wiki, actualUserName, loginResult);
} else if ("UI".equals(loginResult.getStatus())) {
if (loginResult instanceof LoginOAuthResult) {
cb.twoFactorPrompt(new LoginFailedException(loginResult.getMessage()), loginToken);
} else if (loginResult instanceof LoginResetPasswordResult) {
cb.passwordResetPrompt(loginToken);
} else {
cb.error(new LoginFailedException(loginResult.getMessage()));
}
=======
@Nullable final String retypedPassword, @Nullable final String twoFactorCode,
@NonNull final String loginToken, @NonNull final LoginCallback cb) {
loginCall = TextUtils.isEmpty(twoFactorCode) && TextUtils.isEmpty(retypedPassword)
? ServiceFactory.get(wiki).postLogIn(userName, password, loginToken, Service.WIKIPEDIA_URL)
: ServiceFactory.get(wiki).postLogIn(userName, password, retypedPassword, twoFactorCode, loginToken, true);
loginCall.enqueue(new Callback<LoginResponse>() {
@Override
public void onResponse(@NonNull Call<LoginResponse> call, @NonNull Response<LoginResponse> response) {
if (call.isCanceled()) {
return;
}
LoginResponse loginResponse = response.body();
LoginResult loginResult = loginResponse.toLoginResult(wiki, password);
if (loginResult != null) {
if (loginResult.pass() && !TextUtils.isEmpty(loginResult.getUserName())) {
// The server could do some transformations on user names, e.g. on some
// wikis is uppercases the first letter.
String actualUserName = loginResult.getUserName();
getExtendedInfo(wiki, actualUserName, loginResult, cb);
} else if ("UI".equals(loginResult.getStatus())) {
if (loginResult instanceof LoginOAuthResult) {
cb.twoFactorPrompt(new LoginFailedException(loginResult.getMessage()), loginToken);
} else if (loginResult instanceof LoginResetPasswordResult) {
cb.passwordResetPrompt(loginToken);
>>>>>>>
@Nullable final String retypedPassword, @Nullable final String twoFactorCode,
@NonNull final String loginToken, @NonNull final LoginCallback cb) {
disposables.add(getLoginResponse(wiki, userName, password, retypedPassword, twoFactorCode, loginToken)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.flatMap(loginResponse -> {
LoginResult loginResult = loginResponse.toLoginResult(wiki, password);
if (loginResult != null) {
if (loginResult.pass() && !TextUtils.isEmpty(loginResult.getUserName())) {
// The server could do some transformations on user names, e.g. on some
// wikis is uppercases the first letter.
String actualUserName = loginResult.getUserName();
return getExtendedInfo(wiki, actualUserName, loginResult);
} else if ("UI".equals(loginResult.getStatus())) {
if (loginResult instanceof LoginOAuthResult) {
cb.twoFactorPrompt(new LoginFailedException(loginResult.getMessage()), loginToken);
} else if (loginResult instanceof LoginResetPasswordResult) {
cb.passwordResetPrompt(loginToken);
} else {
cb.error(new LoginFailedException(loginResult.getMessage()));
} |
<<<<<<<
=======
@OnClick(R.id.view_list_card_item_menu) void showOverflowMenu(View anchorView) {
new ReadingListBookmarkMenu(anchorView, true, new ReadingListBookmarkMenu.Callback() {
@Override
public void onAddRequest(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onAddPageToList(entry);
}
}
@Override
public void onDeleted(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onRemovePageFromList(entry);
}
}
@Override
public void onShare() {
if (getCallback() != null && entry != null) {
getCallback().onSharePage(entry);
}
}
}).show(entry.getTitle());
}
@OnLongClick boolean onLongClick(View view) {
new ReadingListBookmarkMenu(view, true, new ReadingListBookmarkMenu.Callback() {
@Override
public void onAddRequest(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onAddPageToList(entry);
}
}
@Override
public void onDeleted(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onRemovePageFromList(entry);
}
}
@Override
public void onShare() {
if (getCallback() != null && entry != null) {
getCallback().onSharePage(entry);
}
}
}).show(entry.getTitle());
return false;
}
>>>>>>>
@OnLongClick boolean onLongClick(View view) {
new ReadingListBookmarkMenu(view, true, new ReadingListBookmarkMenu.Callback() {
@Override
public void onAddRequest(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onAddPageToList(entry);
}
}
@Override
public void onDeleted(@Nullable ReadingListPage page) {
if (getCallback() != null && entry != null) {
getCallback().onRemovePageFromList(entry);
}
}
@Override
public void onShare() {
if (getCallback() != null && entry != null) {
getCallback().onSharePage(entry);
}
}
}).show(entry.getTitle());
return false;
} |
<<<<<<<
NOTIFICATION,
NAV_MENU,
TOOLBAR,
WIDGET,
INTENT_SHARE,
INTENT_PROCESS_TEXT,
FEED_BAR,
VOICE,
APP_SHORTCUTS;
=======
FEED,
NOTIFICATION
>>>>>>>
NOTIFICATION,
NAV_MENU,
TOOLBAR,
WIDGET,
INTENT_SHARE,
INTENT_PROCESS_TEXT,
FEED_BAR,
VOICE,
APP_SHORTCUTS;
FEED,
NOTIFICATION |
<<<<<<<
revision = summary.getRevision();
titleText.setText(StringUtil.fromHtml(summary.getDisplayTitle()));
// TODO: remove after the restbase endpoint supports ZH variants
pageTitle.setConvertedText(summary.getConvertedTitle());
=======
pageTitle.setConvertedText(summary.getApiTitle());
titleText.setText(StringUtil.fromHtml(summary.getDisplayTitle()));
>>>>>>>
pageTitle.setConvertedText(summary.getApiTitle());
revision = summary.getRevision();
titleText.setText(StringUtil.fromHtml(summary.getDisplayTitle())); |
<<<<<<<
import org.wikipedia.suggestededits.SuggestedEditsTasksFragment;
=======
import org.wikipedia.suggestededits.SuggestedEditsSurvey;
>>>>>>>
import org.wikipedia.suggestededits.SuggestedEditsTasksFragment;
import org.wikipedia.suggestededits.SuggestedEditsSurvey; |
<<<<<<<
imageView.setOnClickListener(v -> {
if (isAdded()) {
parentActivity.toggleControls();
=======
imageView.setTapListener(new DoubleTapGestureListener(imageView) {
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
if (isAdded()) {
((GalleryActivity) requireActivity()).toggleControls();
}
return true;
>>>>>>>
imageView.setOnClickListener(v -> {
if (isAdded()) {
((GalleryActivity) requireActivity()).toggleControls(); |
<<<<<<<
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.EDIT_FEED_TRANSLATE_TITLE_DESC;
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_TRANSLATE_IMAGE_CAPTION;
=======
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_EDITS_ADD_DESC;
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_EDITS_TRANSLATE_DESC;
>>>>>>>
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_TRANSLATE_IMAGE_CAPTION;
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_EDITS_ADD_DESC;
import static org.wikipedia.Constants.InvokeSource.SUGGESTED_EDITS_TRANSLATE_DESC;
<<<<<<<
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), EDIT_FEED_TITLE_DESC));
=======
startActivity(SuggestedEditsAddDescriptionsActivity.Companion.newIntent(requireActivity(), SUGGESTED_EDITS_ADD_DESC));
>>>>>>>
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), SUGGESTED_EDITS_ADD_DESC));
<<<<<<<
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), EDIT_FEED_TRANSLATE_TITLE_DESC));
}
} else if (task.equals(translateImageCaptionsTask)) {
if (WikipediaApp.getInstance().language().getAppLanguageCodes().size() > 1) {
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), SUGGESTED_TRANSLATE_IMAGE_CAPTION));
=======
startActivity(SuggestedEditsAddDescriptionsActivity.Companion.newIntent(requireActivity(), SUGGESTED_EDITS_TRANSLATE_DESC));
>>>>>>>
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), SUGGESTED_EDITS_TRANSLATE_DESC));
}
} else if (task.equals(translateImageCaptionsTask)) {
if (WikipediaApp.getInstance().language().getAppLanguageCodes().size() > 1) {
startActivity(SuggestedEditsCardsActivity.Companion.newIntent(requireActivity(), SUGGESTED_TRANSLATE_IMAGE_CAPTION)); |
<<<<<<<
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
=======
import com.github.chrisbanes.photoview.PhotoView;
>>>>>>>
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import com.github.chrisbanes.photoview.PhotoView; |
<<<<<<<
=======
import org.n52.sos.ogc.swe.SweConstants.SweCoordinateName;
import org.n52.sos.ogc.swe.SweConstants.SweDataComponentType;
>>>>>>>
<<<<<<<
=======
import org.n52.sos.ogc.swe.simpleType.SweQuantity;
import org.n52.sos.util.CollectionHelper;
import org.n52.sos.util.StringHelper;
>>>>>>>
import org.n52.sos.ogc.swe.simpleType.SweQuantity;
<<<<<<<
public List<? extends SweCoordinate<?>> getPosition() {
if (!isSetPosition() && isSetVector() && getVector().isSetCoordinates()) {
if (!isSetName() && vector.isSetName()) {
setName(vector.getName());
=======
public List<SweCoordinate<?>> getPosition() {
if (!isSetPosition()) {
if (isSetVector() && getVector().isSetCoordinates()) {
if (!isSetName() && vector.isSetName()) {
setName(vector.getName());
}
return vector.getCoordinates();
} else if (isSetAbstractDataComponent() && getAbstractDataComponent() instanceof SweDataRecord) {
SweDataRecord dataRecord = (SweDataRecord) getAbstractDataComponent();
if (dataRecord.isSetFields()) {
List<SweCoordinate<?>> coordinates = Lists.newArrayList();
for (SweField field : dataRecord.getFields()) {
if (field.getElement() instanceof SweQuantity) {
coordinates.add(new SweCoordinate<Double>(field.getName().getValue(), (SweQuantity)field.getElement()));
}
}
return coordinates;
}
>>>>>>>
public List<? extends SweCoordinate<?>> getPosition() {
if (!isSetPosition()) {
if (isSetVector() && getVector().isSetCoordinates()) {
if (!isSetName() && vector.isSetName()) {
setName(vector.getName());
}
return vector.getCoordinates();
} else if (isSetAbstractDataComponent() && getAbstractDataComponent() instanceof SweDataRecord) {
SweDataRecord dataRecord = (SweDataRecord) getAbstractDataComponent();
if (dataRecord.isSetFields()) {
List<SweCoordinate<?>> coordinates = Lists.newArrayList();
for (SweField field : dataRecord.getFields()) {
if (field.getElement() instanceof SweQuantity) {
coordinates.add(new SweCoordinate<Double>(field.getName().getValue(), (SweQuantity)field.getElement()));
}
}
return coordinates;
} |
<<<<<<<
import java.util.regex.Matcher;
import java.util.regex.Pattern;
=======
import java.util.TreeMap;
>>>>>>>
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.TreeMap; |
<<<<<<<
private boolean superPeerMode = true;
=======
/**
* Keeps track of running contexts.
* @see #startContext(Context)
* @see #stopContext(Context)
*/
private static HashSet<Context> activeContexts = new HashSet<Context>();
/**
* A method to be called when a Context begins its execution. This adds the
* context to the context set. When the contenxt's execution completes, it should
* call {@link #stopContext} to clear up resources.
* @param ctx The context that is starting.
* @see #stopContext(Context)
*/
public static void startContext(Context ctx) {
while (deinitializingEdt) {
// It is possible that deinitialize was called just before the
// last context was destroyed so there is a pending deinitialize
// working its way through the system. Give it some time
// before forcing the deinitialize
System.out.println("Waiting for deinitializing to complete before starting a new initialization");
try {
Thread.sleep(30);
} catch (Exception ex){}
}
if (deinitializing && instance != null) {
instance.deinitialize();
}
synchronized(activeContexts) {
activeContexts.add(ctx);
if (instance == null) {
// If this is our first rodeo, just call Display.init() as that should
// be sufficient to set everything up.
Display.init(ctx);
} else {
// If we've initialized before, we should "re-initialize" the implementation
// Reinitializing will force views to be created even if the EDT was already
// running in background mode.
reinit(ctx);
}
}
}
/**
* Cleans up resources in the given context. This method should be called by
* any Activity or Service that called startContext() when it started.
* @param ctx The context to stop.
*
* @see #startContext(Context)
*/
public static void stopContext(Context ctx) {
synchronized(activeContexts) {
activeContexts.remove(ctx);
if (activeContexts.isEmpty()) {
// If we are the last context, we should deinitialize
syncDeinitialize();
} else {
if (instance != null && getActivity() != null) {
// if this is an activity, then we should clean up
// our UI resources anyways because the last context
// to be cleaned up might not have access to the UI thread.
instance.deinitialize();
}
}
}
}
>>>>>>>
private boolean superPeerMode = true;
/**
* Keeps track of running contexts.
* @see #startContext(Context)
* @see #stopContext(Context)
*/
private static HashSet<Context> activeContexts = new HashSet<Context>();
/**
* A method to be called when a Context begins its execution. This adds the
* context to the context set. When the contenxt's execution completes, it should
* call {@link #stopContext} to clear up resources.
* @param ctx The context that is starting.
* @see #stopContext(Context)
*/
public static void startContext(Context ctx) {
while (deinitializingEdt) {
// It is possible that deinitialize was called just before the
// last context was destroyed so there is a pending deinitialize
// working its way through the system. Give it some time
// before forcing the deinitialize
System.out.println("Waiting for deinitializing to complete before starting a new initialization");
try {
Thread.sleep(30);
} catch (Exception ex){}
}
if (deinitializing && instance != null) {
instance.deinitialize();
}
synchronized(activeContexts) {
activeContexts.add(ctx);
if (instance == null) {
// If this is our first rodeo, just call Display.init() as that should
// be sufficient to set everything up.
Display.init(ctx);
} else {
// If we've initialized before, we should "re-initialize" the implementation
// Reinitializing will force views to be created even if the EDT was already
// running in background mode.
reinit(ctx);
}
}
}
/**
* Cleans up resources in the given context. This method should be called by
* any Activity or Service that called startContext() when it started.
* @param ctx The context to stop.
*
* @see #startContext(Context)
*/
public static void stopContext(Context ctx) {
synchronized(activeContexts) {
activeContexts.remove(ctx);
if (activeContexts.isEmpty()) {
// If we are the last context, we should deinitialize
syncDeinitialize();
} else {
if (instance != null && getActivity() != null) {
// if this is an activity, then we should clean up
// our UI resources anyways because the last context
// to be cleaned up might not have access to the UI thread.
instance.deinitialize();
}
}
}
}
<<<<<<<
if(!superPeerMode) {
// called by Codename One EDT to position the native component.
activity.runOnUiThread(new Runnable() {
public void run() {
if (layoutWrapper != null) {
if (v.getVisibility() == View.VISIBLE) {
RelativeLayout.LayoutParams layoutParams = layoutWrapper.createMyLayoutParams(
AndroidImplementation.AndroidPeer.this.getAbsoluteX(),
AndroidImplementation.AndroidPeer.this.getAbsoluteY(),
AndroidImplementation.AndroidPeer.this.getWidth(),
AndroidImplementation.AndroidPeer.this.getHeight());
layoutWrapper.setLayoutParams(layoutParams);
if (AndroidImplementation.this.relativeLayout != null) {
AndroidImplementation.this.relativeLayout.requestLayout();
}
=======
// called by Codename One EDT to position the native component.
getActivity().runOnUiThread(new Runnable() {
public void run() {
if (layoutWrapper != null) {
if (v.getVisibility() == View.VISIBLE) {
RelativeLayout.LayoutParams layoutParams = layoutWrapper.createMyLayoutParams(
AndroidImplementation.AndroidPeer.this.getAbsoluteX(),
AndroidImplementation.AndroidPeer.this.getAbsoluteY(),
AndroidImplementation.AndroidPeer.this.getWidth(),
AndroidImplementation.AndroidPeer.this.getHeight());
layoutWrapper.setLayoutParams(layoutParams);
if(AndroidImplementation.this.relativeLayout != null){
AndroidImplementation.this.relativeLayout.requestLayout();
>>>>>>>
if(!superPeerMode) {
// called by Codename One EDT to position the native component.
activity.runOnUiThread(new Runnable() {
public void run() {
if (layoutWrapper != null) {
if (v.getVisibility() == View.VISIBLE) {
RelativeLayout.LayoutParams layoutParams = layoutWrapper.createMyLayoutParams(
AndroidImplementation.AndroidPeer.this.getAbsoluteX(),
AndroidImplementation.AndroidPeer.this.getAbsoluteY(),
AndroidImplementation.AndroidPeer.this.getWidth(),
AndroidImplementation.AndroidPeer.this.getHeight());
layoutWrapper.setLayoutParams(layoutParams);
if (AndroidImplementation.this.relativeLayout != null) {
AndroidImplementation.this.relativeLayout.requestLayout();
} |
<<<<<<<
import com.google.common.collect.Lists;
=======
>>>>>>>
import com.google.common.collect.Lists; |
<<<<<<<
alwaysStrategy = new Strategy();
alwaysStrategy.setEntryRule(BooleanRule.TRUE);
alwaysStrategy.setExitRule(BooleanRule.TRUE);
buyAndHoldStrategy = new MockStrategy(new Operation[] { new Operation(0, OperationType.BUY), null, null, null },
new Operation[] { null, null, null, new Operation(4, OperationType.SELL) });
=======
alwaysStrategy = new AlwaysOperateStrategy();
buyAndHoldStrategy = new MockStrategy(new Operation[] { Operation.buyAt(0), null, null, null },
new Operation[] { null, null, null, Operation.sellAt(4) });
>>>>>>>
alwaysStrategy = new Strategy();
alwaysStrategy.setEntryRule(BooleanRule.TRUE);
alwaysStrategy.setExitRule(BooleanRule.TRUE);
buyAndHoldStrategy = new MockStrategy(new Operation[] { Operation.buyAt(0), null, null, null },
new Operation[] { null, null, null, Operation.sellAt(4) }); |
<<<<<<<
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
=======
>>>>>>>
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory; |
<<<<<<<
public static Packet decodeFrame(DatagramPacket frame) throws Exception {
ByteBuf in = frame.content();
=======
public static Packet decodeFrame(DatagramPacket datagram) {
ByteBuf in = datagram.content();
>>>>>>>
public static Packet decodeFrame(DatagramPacket frame) {
ByteBuf in = frame.content(); |
<<<<<<<
import com.shinemo.mpush.tools.crypto.CryptoUtils;
=======
import com.shinemo.mpush.tools.crypto.AESUtils;
>>>>>>>
import com.shinemo.mpush.tools.crypto.AESUtils;
<<<<<<<
import org.apache.commons.lang3.RandomStringUtils;
=======
>>>>>>> |
<<<<<<<
import static com.mpush.tools.config.CC.mp.net.wsEnabled;
import static com.mpush.zk.node.ZKServerNode.*;
=======
>>>>>>>
import static com.mpush.tools.config.CC.mp.net.wsEnabled;
<<<<<<<
.setNext(new ServerBoot(ConnectionServer.I(), CS_NODE))//3.启动长连接服务
.setNext(() -> new ServerBoot(WebSocketServer.I(), WS_NODE), wsEnabled())//4.启动websocket连接服务
.setNext(new ServerBoot(udpGateway() ? GatewayUDPConnector.I() : GatewayServer.I(), GS_NODE))//4.启动网关服务
=======
.setNext(new ServerBoot(ConnectionServer.I(), CS))//3.启动长连接服务
.setNext(new ServerBoot(udpGateway() ? GatewayUDPConnector.I() : GatewayServer.I(), GS))//4.启动网关服务
>>>>>>>
.setNext(new ServerBoot(ConnectionServer.I(), CS))//3.启动长连接服务
.setNext(() -> new ServerBoot(WebSocketServer.I(), WS), wsEnabled())//4.启动websocket连接服务
.setNext(new ServerBoot(udpGateway() ? GatewayUDPConnector.I() : GatewayServer.I(), GS))//4.启动网关服务 |
<<<<<<<
import java.util.Map;
import java.util.concurrent.atomic.LongAdder;
=======
import java.util.concurrent.ExecutorService;
>>>>>>>
import java.util.Map;
import java.util.concurrent.ExecutorService;
<<<<<<<
public void setPacket(Packet packet) {
this.packet = packet;
}
public void setConnection(Connection connection) {
this.connection = connection;
}
=======
public ExecutorService getExecutor() {
return connection.getChannel().eventLoop();
}
public void runInRequestThread(Runnable runnable) {
connection.getChannel().eventLoop().execute(runnable);
}
>>>>>>>
public void setPacket(Packet packet) {
this.packet = packet;
}
public void setConnection(Connection connection) {
this.connection = connection;
}
public ExecutorService getExecutor() {
return connection.getChannel().eventLoop();
}
public void runInRequestThread(Runnable runnable) {
connection.getChannel().eventLoop().execute(runnable);
} |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
public String testSaveLocationExists(){
if (fileManager.testSaveLocationExists())
return "SD Card available";
else
return "SD Card unavailable";
}
public String testDirOrFileExists(String file){
if (fileManager.isDirtoryOrFileExists(file))
return "File exists";
else
return "No this file";
}
public String deleteDirectory (String dir){
if (fileManager.deleteDir(dir))
return "Completed";
else
return "Not completed";
}
public String deleteFile (String file){
if (fileManager.deleteFile(file))
return "Completed";
else
return "Not completed";
}
public String createDirectory(String dir){
if (fileManager.createDirectory(dir))
return "Completed";
else
return "Not completed";
}
=======
/**
* AUDIO
* TODO: Basic functions done but needs more work on error handling and call backs, remove record hack
*/
AudioHandler audio = new AudioHandler("/sdcard/tmprecording.mp3");
public void startRecordingAudio(String file)
{
/* for this to work the recording needs to be specified in the constructor,
* a hack to get around this, I'm moving the recording after it's complete
*/
audio.startRecording(file);
}
public void stopRecordingAudio()
{
audio.stopRecording();
}
public void startPlayingAudio(String file)
{
audio.startPlaying(file);
}
public void stopPlayingAudio()
{
audio.stopPlaying();
}
public long getCurrentPositionAudio()
{
System.out.println(audio.getCurrentPosition());
return(audio.getCurrentPosition());
}
public long getDurationAudio(String file)
{
System.out.println(audio.getDuration(file));
return(audio.getDuration(file));
}
>>>>>>>
public String testSaveLocationExists(){
if (fileManager.testSaveLocationExists())
return "SD Card available";
else
return "SD Card unavailable";
}
public String testDirOrFileExists(String file){
if (fileManager.isDirtoryOrFileExists(file))
return "File exists";
else
return "No this file";
}
public String deleteDirectory (String dir){
if (fileManager.deleteDir(dir))
return "Completed";
else
return "Not completed";
}
public String deleteFile (String file){
if (fileManager.deleteFile(file))
return "Completed";
else
return "Not completed";
}
public String createDirectory(String dir){
if (fileManager.createDirectory(dir))
return "Completed";
else
return "Not completed";
}
/**
* AUDIO
* TODO: Basic functions done but needs more work on error handling and call backs, remove record hack
*/
AudioHandler audio = new AudioHandler("/sdcard/tmprecording.mp3");
public void startRecordingAudio(String file)
{
/* for this to work the recording needs to be specified in the constructor,
* a hack to get around this, I'm moving the recording after it's complete
*/
audio.startRecording(file);
}
public void stopRecordingAudio()
{
audio.stopRecording();
}
public void startPlayingAudio(String file)
{
audio.startPlaying(file);
}
public void stopPlayingAudio()
{
audio.stopPlaying();
}
public long getCurrentPositionAudio()
{
System.out.println(audio.getCurrentPosition());
return(audio.getCurrentPosition());
}
public long getDurationAudio(String file)
{
System.out.println(audio.getDuration(file));
return(audio.getDuration(file));
} |
<<<<<<<
import java.util.HashSet;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StenchGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Crab;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Gnoll;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.RatSkull;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.CurareDart;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.LightningTrap;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.sprites.*;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
=======
>>>>>>>
<<<<<<<
public class Ghost extends NPC {
=======
import java.util.HashSet;
public class Ghost extends Mob.NPC {
>>>>>>>
import java.util.HashSet;
public class Ghost extends NPC { |
<<<<<<<
for ( PropertyDescriptor persistentProperty : entityType.state().properties() ) {
if ( persistentProperty.queryable() ) {
Object value = state.propertyValueOf( persistentProperty.qualifiedName() );
json.key( persistentProperty.qualifiedName().name() );
serializer.serialize( value, persistentProperty.valueType() );
=======
for( PropertyDescriptor propDesc : entityType.state().properties() )
{
if( propDesc.queryable() )
{
String key = propDesc.qualifiedName().name();
Object value = state.getProperty( propDesc.qualifiedName() );
if( value == null || ValueType.isPrimitiveValue( value ) )
{
json.put( key, value );
}
else
{
// TODO Theses tests are pretty fragile, find a better way to fix this, Jackson API should behave better
String serialized = valueSerializer.serialize( value );
if( serialized.startsWith( "{" ) )
{
json.put( key, new JSONObject( serialized ) );
}
else if( serialized.startsWith( "[" ) )
{
json.put( key, new JSONArray( serialized ) );
}
else
{
json.put( key, serialized );
}
}
>>>>>>>
for( PropertyDescriptor propDesc : entityType.state().properties() )
{
if( propDesc.queryable() )
{
String key = propDesc.qualifiedName().name();
Object value = state.propertyValueOf( propDesc.qualifiedName() );
if( value == null || ValueType.isPrimitiveValue( value ) )
{
json.put( key, value );
}
else
{
// TODO Theses tests are pretty fragile, find a better way to fix this, Jackson API should behave better
String serialized = valueSerializer.serialize( value );
if( serialized.startsWith( "{" ) )
{
json.put( key, new JSONObject( serialized ) );
}
else if( serialized.startsWith( "[" ) )
{
json.put( key, new JSONArray( serialized ) );
}
else
{
json.put( key, serialized );
}
}
<<<<<<<
for ( AssociationDescriptor assocDesc : entityType.state().associations() ) {
if ( assocDesc.queryable() ) {
EntityReference associated = state.associationValueOf( assocDesc.qualifiedName() );
json.key( assocDesc.qualifiedName().name() );
if ( associated == null ) {
json.value( null );
} else {
if ( assocDesc.isAggregated() || support.indexNonAggregatedAssociations() ) {
if ( newStates.containsKey( associated.identity() ) ) {
json.json( toJSON( newStates.get( associated.identity() ), newStates, uow ) );
} else {
EntityState assocState = uow.entityStateOf( EntityReference.parseEntityReference( associated
.identity() ) );
json.json( toJSON( assocState, newStates, uow ) );
=======
for( AssociationDescriptor assocDesc : entityType.state().associations() )
{
if( assocDesc.queryable() )
{
String key = assocDesc.qualifiedName().name();
EntityReference associated = state.getAssociation( assocDesc.qualifiedName() );
Object value;
if( associated == null )
{
value = null;
}
else
{
if( assocDesc.isAggregated() || support.indexNonAggregatedAssociations() )
{
if( newStates.containsKey( associated.identity() ) )
{
value = new JSONObject( toJSON( newStates.get( associated.identity() ), newStates, uow ) );
}
else
{
EntityState assocState = uow.getEntityState( EntityReference.parseEntityReference( associated.identity() ) );
value = new JSONObject( toJSON( assocState, newStates, uow ) );
>>>>>>>
for( AssociationDescriptor assocDesc : entityType.state().associations() )
{
if( assocDesc.queryable() )
{
String key = assocDesc.qualifiedName().name();
EntityReference associated = state.associationValueOf( assocDesc.qualifiedName() );
Object value;
if( associated == null )
{
value = null;
}
else
{
if( assocDesc.isAggregated() || support.indexNonAggregatedAssociations() )
{
if( newStates.containsKey( associated.identity() ) )
{
value = new JSONObject( toJSON( newStates.get( associated.identity() ), newStates, uow ) );
}
else
{
EntityState assocState = uow.entityStateOf( EntityReference.parseEntityReference( associated.identity() ) );
value = new JSONObject( toJSON( assocState, newStates, uow ) );
<<<<<<<
for ( AssociationDescriptor manyAssocDesc : entityType.state().manyAssociations() ) {
if ( manyAssocDesc.queryable() ) {
JSONWriter assocs = json.key( manyAssocDesc.qualifiedName().name() ).array();
ManyAssociationState associateds = state.manyAssociationValueOf( manyAssocDesc.qualifiedName() );
for ( EntityReference associated : associateds ) {
if ( manyAssocDesc.isAggregated() || support.indexNonAggregatedAssociations() ) {
if ( newStates.containsKey( associated.identity() ) ) {
assocs.json( toJSON( newStates.get( associated.identity() ), newStates, uow ) );
} else {
EntityState assocState = uow.entityStateOf( EntityReference.parseEntityReference( associated
.identity() ) );
assocs.json( toJSON( assocState, newStates, uow ) );
=======
for( AssociationDescriptor manyAssocDesc : entityType.state().manyAssociations() )
{
if( manyAssocDesc.queryable() )
{
String key = manyAssocDesc.qualifiedName().name();
JSONArray array = new JSONArray();
ManyAssociationState associateds = state.getManyAssociation( manyAssocDesc.qualifiedName() );
for( EntityReference associated : associateds )
{
if( manyAssocDesc.isAggregated() || support.indexNonAggregatedAssociations() )
{
if( newStates.containsKey( associated.identity() ) )
{
array.put( new JSONObject( toJSON( newStates.get( associated.identity() ), newStates, uow ) ) );
}
else
{
EntityState assocState = uow.getEntityState( EntityReference.parseEntityReference( associated.identity() ) );
array.put( new JSONObject( toJSON( assocState, newStates, uow ) ) );
>>>>>>>
for( AssociationDescriptor manyAssocDesc : entityType.state().manyAssociations() )
{
if( manyAssocDesc.queryable() )
{
String key = manyAssocDesc.qualifiedName().name();
JSONArray array = new JSONArray();
ManyAssociationState associateds = state.manyAssociationValueOf( manyAssocDesc.qualifiedName() );
for( EntityReference associated : associateds )
{
if( manyAssocDesc.isAggregated() || support.indexNonAggregatedAssociations() )
{
if( newStates.containsKey( associated.identity() ) )
{
array.put( new JSONObject( toJSON( newStates.get( associated.identity() ), newStates, uow ) ) );
}
else
{
EntityState assocState = uow.entityStateOf( EntityReference.parseEntityReference( associated.identity() ) );
array.put( new JSONObject( toJSON( assocState, newStates, uow ) ) ); |
<<<<<<<
=======
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import static org.junit.Assert.*;
import static voldemort.utils.Ec2RemoteTestUtils.createInstances;
import static voldemort.utils.Ec2RemoteTestUtils.destroyInstances;
import static voldemort.utils.RemoteTestUtils.cleanupCluster;
import static voldemort.utils.RemoteTestUtils.deploy;
import static voldemort.utils.RemoteTestUtils.generateClusterDescriptor;
import static voldemort.utils.RemoteTestUtils.startClusterAsync;
import static voldemort.utils.RemoteTestUtils.stopClusterQuiet;
import static voldemort.utils.RemoteTestUtils.stopCluster;
import static voldemort.utils.RemoteTestUtils.toHostNames;
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
private int[][] getPartitionMap(int nodes, int perNode, boolean spareNode) {
int limit = spareNode ? nodes - 1 : nodes;
int[][] partitionMap = new int[nodes][];
int i, k;
for(i = 0, k = 0; i < limit; i++) {
partitionMap[i] = new int[perNode];
for(int j = 0; j < perNode; j++)
partitionMap[i][j] = k++;
}
if(spareNode)
partitionMap[limit] = new int[] {};
return partitionMap;
}
private static int[][] insertNode(int[][] template, int pivot) {
int templateLength = template.length;
int vectorTailLength = template[templateLength - 1].length - pivot;
int[][] layout = new int[templateLength + 1][];
layout[templateLength - 1] = new int[pivot];
layout[templateLength] = new int[vectorTailLength];
System.arraycopy(template, 0, layout, 0, templateLength - 1);
System.arraycopy(template[templateLength - 1], 0, layout[templateLength - 1], 0, pivot);
System.arraycopy(template[templateLength - 1],
pivot,
layout[templateLength],
0,
vectorTailLength);
return layout;
}
private static int[][] splitLastPartition(int[][] template, int pivot) {
int templateLength = template.length;
int vectorTailLength = template[templateLength - 2].length - pivot;
int[][] layout = new int[templateLength][];
layout[templateLength - 2] = new int[pivot];
layout[templateLength - 1] = new int[vectorTailLength];
System.arraycopy(template, 0, layout, 0, templateLength - 2);
System.arraycopy(template[templateLength - 2], 0, layout[templateLength - 2], 0, pivot);
System.arraycopy(template[templateLength - 2],
pivot,
layout[templateLength - 1],
0,
vectorTailLength);
return layout;
}
private int[] getPorts(int count) {
int[] ports = new int[count * 3];
for(int i = 0; i < count; i++) {
ports[3 * i] = 6665;
ports[3 * i + 1] = 6666;
ports[3 * i + 2] = 6667;
}
return ports;
}
=======
>>>>>>>
<<<<<<<
testEntries = ServerTestUtils.createRandomKeyValueString(ec2RebalancingTestConfig.numKeys);
originalCluster = updateCluster(originalCluster, nodeIds);
if(logger.isInfoEnabled())
=======
if (logger.isInfoEnabled())
>>>>>>>
if(logger.isInfoEnabled()) |
<<<<<<<
import java.io.StringWriter;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
=======
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
>>>>>>>
<<<<<<<
=======
import org.qi4j.api.injection.scope.Service;
import org.qi4j.api.value.ValueComposite;
>>>>>>>
<<<<<<<
=======
import org.qi4j.spi.value.ValueCompositeType;
>>>>>>>
import org.qi4j.spi.value.ValueCompositeType;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.io.StringWriter;
<<<<<<<
=======
@Service private EntityTypeRegistry typeRegistry;
>>>>>>> |
<<<<<<<
this.failureDetector = props.getString("failure.detector",
BannagePeriodFailureDetector.class.getName());
=======
// network class loader disable by default.
this.enableNetworkClassLoader = props.getBoolean("enable.network.classloader", false);
>>>>>>>
this.failureDetector = props.getString("failure.detector",
BannagePeriodFailureDetector.class.getName());
// network class loader disable by default.
this.enableNetworkClassLoader = props.getBoolean("enable.network.classloader", false);
<<<<<<<
=======
public int getAdminSocketTimeout() {
return adminSocketTimeout;
}
public void setAdminSocketTimeout(int adminSocketTimeout) {
this.adminSocketTimeout = adminSocketTimeout;
}
public int getAdminConnectionTimeout() {
return adminConnectionTimeout;
}
public void setAdminConnectionTimeout(int adminConnectionTimeout) {
this.adminConnectionTimeout = adminConnectionTimeout;
}
public String getReadOnlySearchStrategy() {
return readOnlySearchStrategy;
}
public void setReadOnlySearchStrategy(String readOnlySearchStrategy) {
this.readOnlySearchStrategy = readOnlySearchStrategy;
}
public boolean isNetworkClassLoaderEnabled() {
return enableNetworkClassLoader;
}
public void setEnableNetworkClassLoader(boolean enableNetworkClassLoader) {
this.enableNetworkClassLoader = enableNetworkClassLoader;
}
>>>>>>>
public int getAdminSocketTimeout() {
return adminSocketTimeout;
}
public void setAdminSocketTimeout(int adminSocketTimeout) {
this.adminSocketTimeout = adminSocketTimeout;
}
public int getAdminConnectionTimeout() {
return adminConnectionTimeout;
}
public void setAdminConnectionTimeout(int adminConnectionTimeout) {
this.adminConnectionTimeout = adminConnectionTimeout;
}
public String getReadOnlySearchStrategy() {
return readOnlySearchStrategy;
}
public void setReadOnlySearchStrategy(String readOnlySearchStrategy) {
this.readOnlySearchStrategy = readOnlySearchStrategy;
}
public boolean isNetworkClassLoaderEnabled() {
return enableNetworkClassLoader;
}
public void setEnableNetworkClassLoader(boolean enableNetworkClassLoader) {
this.enableNetworkClassLoader = enableNetworkClassLoader;
} |
<<<<<<<
this.failureDetector = failureDetector;
this.routingStrategy = new RoutingStrategyFactory(this.cluster).getRoutingStrategy(storeDef);
=======
this.routingStrategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster);
>>>>>>>
this.failureDetector = failureDetector;
this.routingStrategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster); |
<<<<<<<
import org.qi4j.api.service.Activatable;
import org.qi4j.api.service.ServiceComposite;
import org.qi4j.api.sideeffect.SideEffects;
import org.qi4j.library.locking.LockingAbstractComposite;
=======
import org.qi4j.api.service.Activatable;
import org.qi4j.api.service.ServiceComposite;
import org.qi4j.api.sideeffect.SideEffects;
import org.qi4j.entitystore.memory.ConcurrentModificationCheckConcern;
import org.qi4j.library.locking.LockingAbstractComposite;
>>>>>>>
import org.qi4j.api.service.Activatable;
import org.qi4j.api.service.ServiceComposite;
import org.qi4j.library.locking.LockingAbstractComposite; |
<<<<<<<
=======
import org.qi4j.api.common.MetaInfo;
>>>>>>>
<<<<<<<
for( EntityStoreUnitOfWork entityStoreUnitOfWork : storeUnitOfWork.values() )
=======
for (Map.Entry<EntityStore, EntityStoreUnitOfWork> entry : storeUnitOfWork.entrySet())
>>>>>>>
for( EntityStoreUnitOfWork entityStoreUnitOfWork : storeUnitOfWork.values() ) |
<<<<<<<
import org.qi4j.api.entity.EntityReference;
import org.qi4j.api.unitofwork.ConcurrentEntityModificationException;
import org.qi4j.api.unitofwork.EntityTypeNotFoundException;
import org.qi4j.api.unitofwork.NoSuchEntityException;
import org.qi4j.api.unitofwork.UnitOfWorkCallback;
=======
import org.qi4j.api.unitofwork.*;
>>>>>>>
import org.qi4j.api.entity.EntityReference;
import org.qi4j.api.unitofwork.*;
<<<<<<<
import org.qi4j.api.unitofwork.UnitOfWorkCompletionException;
import org.qi4j.api.unitofwork.UnitOfWorkException;
=======
>>>>>>>
<<<<<<<
import org.qi4j.spi.entity.ConcurrentEntityStateModificationException;
import org.qi4j.spi.entity.EntityNotFoundException;
import org.qi4j.spi.entity.EntityState;
import org.qi4j.spi.entity.EntityStatus;
import org.qi4j.spi.entity.EntityStore;
import org.qi4j.spi.entity.EntityStoreException;
import org.qi4j.spi.entity.EntityType;
import org.qi4j.spi.entity.StateCommitter;
=======
import org.qi4j.spi.entity.*;
import java.util.*;
>>>>>>>
import org.qi4j.spi.entity.*;
import java.util.*;
<<<<<<<
public EntityInstance get( EntityReference identity, ModuleUnitOfWork uow, EntityModel model, ModuleInstance module)
=======
public EntityInstance getReference( String identity, ModuleUnitOfWork uow, EntityModel model, ModuleInstance module )
>>>>>>>
public EntityInstance get( EntityReference identity, ModuleUnitOfWork uow, EntityModel model, ModuleInstance module)
<<<<<<<
return ess.state = ess.store.getEntityState( new EntityReference(identity) );
} else
=======
return ess.state = ess.store.getEntityState( qid );
}
else
>>>>>>>
return ess.state = ess.store.getEntityState( new EntityReference(identity) );
} else
<<<<<<<
EntityStateStore ess = stateCache.get( identity.toString() );
if (ess == null || ess.state == null)
=======
EntityStateStore ess = stateCache.get( qualifiedIdentity );
if( ess == null || ess.state == null )
>>>>>>>
EntityStateStore ess = stateCache.get( identity.toString() );
if (ess == null || ess.state == null) |
<<<<<<<
private static final String USE_DEFAULT_CLIENT = "use_default_client";
=======
public static final String CLIENT_REGISTRY_REFRESH_INTERVAL = "client_registry_refresh_interval";
public static final String ASYNC_JOB_THREAD_POOL_SIZE = "async_job_thread_pool_size";
>>>>>>>
private static final String USE_DEFAULT_CLIENT = "use_default_client";
public static final String CLIENT_REGISTRY_REFRESH_INTERVAL = "client_registry_refresh_interval";
public static final String ASYNC_JOB_THREAD_POOL_SIZE = "async_job_thread_pool_size";
<<<<<<<
this.setAsyncMetadataRefreshInMs(props.getLong(ASYNC_CHECK_METADATA_INTERVAL, 5000));
=======
this.setAsyncCheckMetadataInterval(props.getLong(ASYNC_CHECK_METADATA_INTERVAL));
}
if(props.containsKey(CLIENT_REGISTRY_REFRESH_INTERVAL)) {
this.setClientRegistryRefreshInterval(props.getInt(CLIENT_REGISTRY_REFRESH_INTERVAL));
}
if(props.containsKey(ASYNC_JOB_THREAD_POOL_SIZE)) {
this.setClientRegistryRefreshInterval(props.getInt(ASYNC_JOB_THREAD_POOL_SIZE));
>>>>>>>
this.setAsyncMetadataRefreshInMs(props.getLong(ASYNC_CHECK_METADATA_INTERVAL));
}
if(props.containsKey(CLIENT_REGISTRY_REFRESH_INTERVAL)) {
this.setClientRegistryUpdateInSecs(props.getInt(CLIENT_REGISTRY_REFRESH_INTERVAL));
}
if(props.containsKey(ASYNC_JOB_THREAD_POOL_SIZE)) {
this.setAsyncJobThreadPoolSize(props.getInt(ASYNC_JOB_THREAD_POOL_SIZE));
<<<<<<<
public ClientConfig setAsyncMetadataRefreshInMs(long asyncCheckMetadataInterval) {
=======
/**
* Set the interval on which client checks for metadata change on servers
*
* @param asyncCheckMetadataInterval The metadata change interval
*/
public ClientConfig setAsyncCheckMetadataInterval(long asyncCheckMetadataInterval) {
>>>>>>>
/**
* Set the interval on which client checks for metadata change on servers
*
* @param asyncCheckMetadataInterval The metadata change interval
*/
public ClientConfig setAsyncMetadataRefreshInMs(long asyncCheckMetadataInterval) {
<<<<<<<
public ClientConfig setClientRegistryUpdateInSecs(int clientRegistryRefrshInterval) {
=======
/**
* Set the interval on which client refreshes its corresponding entry of the
* client registry on the servers
*
* @param clientRegistryRefreshInterval The refresh interval in seconds
*/
public ClientConfig setClientRegistryRefreshInterval(int clientRegistryRefrshInterval) {
>>>>>>>
/**
* Set the interval on which client refreshes its corresponding entry of the
* client registry on the servers
*
* @param clientRegistryRefreshInterval The refresh interval in seconds
*/
public ClientConfig setClientRegistryUpdateInSecs(int clientRegistryRefrshInterval) { |
<<<<<<<
configModule.entities( JdbmEntityStoreConfiguration.class ).visibleIn( Visibility.layer );
new EntityTestAssembler().assemble( configModule );
=======
configModule.entities( JdbmConfiguration.class ).visibleIn( Visibility.layer );
new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule );
>>>>>>>
configModule.entities( JdbmEntityStoreConfiguration.class ).visibleIn( Visibility.layer );
new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( configModule ); |
<<<<<<<
public void put(ByteArray key, Versioned<byte[]> value, byte[] transforms)
throws VoldemortException {
=======
public void put(ByteArray key, Versioned<byte[]> value) throws VoldemortException {
if(this.isReadOnly)
throw new UnsupportedOperationException("Put is not supported on this store, it is read-only.");
>>>>>>>
public void put(ByteArray key, Versioned<byte[]> value, byte[] transforms)
throws VoldemortException {
if(this.isReadOnly)
throw new UnsupportedOperationException("Put is not supported on this store, it is read-only.");
<<<<<<<
if(stealInfo != null)
proxyGetAndLocalPut(key, stealInfo.getDonorId(), transforms);
=======
if(stealInfo != null)
proxyGetAndLocalPut(key, stealInfo.getDonorId());
>>>>>>>
if(stealInfo != null)
proxyGetAndLocalPut(key, stealInfo.getDonorId(), transforms);
<<<<<<<
if(VoldemortState.REBALANCING_MASTER_SERVER.equals(metadata.getServerState())
&& !getName().equals(MetadataStore.METADATA_STORE_NAME)) {
List<Integer> partitionIds = metadata.getRoutingStrategy(getName())
.getPartitionList(key.get());
=======
if(!getName().equals(MetadataStore.METADATA_STORE_NAME)
&& StoreState.REBALANCING.equals(metadata.getStoreState(getName()))) {
List<Integer> partitionIds = metadata.getRoutingStrategy(getName())
.getPartitionList(key.get());
>>>>>>>
if(!getName().equals(MetadataStore.METADATA_STORE_NAME)
&& StoreState.REBALANCING.equals(metadata.getStoreState(getName()))) {
List<Integer> partitionIds = metadata.getRoutingStrategy(getName())
.getPartitionList(key.get());
<<<<<<<
if(stealInfo != null)
proxyGetAndLocalPut(key, stealInfo.getDonorId(), transforms);
=======
if(stealInfo != null) {
List<Versioned<byte[]>> proxyValues = proxyGetAndLocalPut(key, stealInfo.getDonorId());
if(isReadOnly)
return proxyValues;
}
>>>>>>>
if(stealInfo != null) {
List<Versioned<byte[]>> proxyValues = proxyGetAndLocalPut(key,
stealInfo.getDonorId(),
transforms);
if(isReadOnly)
return proxyValues;
}
<<<<<<<
if(stealInfo != null)
proxyGetAndLocalPut(key, stealInfo.getDonorId(), null);
=======
if(stealInfo != null) {
List<Versioned<byte[]>> proxyValues = proxyGetAndLocalPut(key, stealInfo.getDonorId());
if(isReadOnly)
return StoreUtils.getVersions(proxyValues);
}
>>>>>>>
if(stealInfo != null) {
List<Versioned<byte[]>> proxyValues = proxyGetAndLocalPut(key,
stealInfo.getDonorId(),
null);
if(isReadOnly)
return StoreUtils.getVersions(proxyValues);
}
<<<<<<<
if(!redirectingKeys.isEmpty())
proxyGetAllAndLocalPut(redirectingKeys, rebalancePartitionsInfos, transforms);
=======
if(!redirectingKeys.isEmpty()) {
Map<ByteArray, List<Versioned<byte[]>>> proxyKeyValues = proxyGetAllAndLocalPut(redirectingKeys,
rebalancePartitionsInfos);
if(isReadOnly) {
return proxyKeyValues;
}
}
>>>>>>>
if(!redirectingKeys.isEmpty()) {
Map<ByteArray, List<Versioned<byte[]>>> proxyKeyValues = proxyGetAllAndLocalPut(redirectingKeys,
rebalancePartitionsInfos,
transforms);
if(isReadOnly) {
return proxyKeyValues;
}
}
<<<<<<<
Store<ByteArray, byte[], byte[]> redirectingStore = getRedirectingSocketStore(getName(),
donorNodeId);
List<Versioned<byte[]>> values = redirectingStore.get(key, transform);
=======
Store<ByteArray, byte[]> redirectingStore = getRedirectingSocketStore(getName(),
donorNodeId);
List<Versioned<byte[]>> values = redirectingStore.get(key);
>>>>>>>
Store<ByteArray, byte[], byte[]> redirectingStore = getRedirectingSocketStore(getName(),
donorNodeId);
List<Versioned<byte[]>> values = redirectingStore.get(key, transform);
<<<<<<<
private void proxyGetAndLocalPut(ByteArray key, int donorId, byte[] transforms)
throws VoldemortException {
List<Versioned<byte[]>> proxyValues = proxyGet(key, donorId, transforms);
for(Versioned<byte[]> proxyValue: proxyValues) {
try {
getInnerStore().put(key, proxyValue, null);
} catch(ObsoleteVersionException e) {
// ignore these
=======
private List<Versioned<byte[]>> proxyGetAndLocalPut(ByteArray key, int donorId)
throws VoldemortException {
List<Versioned<byte[]>> proxyValues = proxyGet(key, donorId);
if(!isReadOnly) {
for(Versioned<byte[]> proxyValue: proxyValues) {
try {
getInnerStore().put(key, proxyValue);
} catch(ObsoleteVersionException e) {
// ignore these
}
>>>>>>>
private List<Versioned<byte[]>> proxyGetAndLocalPut(ByteArray key,
int donorId,
byte[] transforms)
throws VoldemortException {
List<Versioned<byte[]>> proxyValues = proxyGet(key, donorId, transforms);
if(!isReadOnly) {
for(Versioned<byte[]> proxyValue: proxyValues) {
try {
getInnerStore().put(key, proxyValue, null);
} catch(ObsoleteVersionException e) {
// ignore these
}
<<<<<<<
private void proxyGetAllAndLocalPut(List<ByteArray> keys,
List<RebalancePartitionsInfo> stealInfoList,
Map<ByteArray, byte[]> transforms)
throws VoldemortException {
Map<ByteArray, List<Versioned<byte[]>>> proxyKeyValues = proxyGetAll(keys,
stealInfoList,
transforms);
for(Map.Entry<ByteArray, List<Versioned<byte[]>>> keyValuePair: proxyKeyValues.entrySet()) {
for(Versioned<byte[]> proxyValue: keyValuePair.getValue()) {
try {
getInnerStore().put(keyValuePair.getKey(), proxyValue, null);
} catch(ObsoleteVersionException e) {
// ignore these
=======
private Map<ByteArray, List<Versioned<byte[]>>> proxyGetAllAndLocalPut(List<ByteArray> keys,
List<RebalancePartitionsInfo> stealInfoList)
throws VoldemortException {
Map<ByteArray, List<Versioned<byte[]>>> proxyKeyValues = proxyGetAll(keys, stealInfoList);
if(!isReadOnly) {
for(Map.Entry<ByteArray, List<Versioned<byte[]>>> keyValuePair: proxyKeyValues.entrySet()) {
for(Versioned<byte[]> proxyValue: keyValuePair.getValue()) {
try {
getInnerStore().put(keyValuePair.getKey(), proxyValue);
} catch(ObsoleteVersionException e) {
// ignore these
}
>>>>>>>
private Map<ByteArray, List<Versioned<byte[]>>> proxyGetAllAndLocalPut(List<ByteArray> keys,
List<RebalancePartitionsInfo> stealInfoList,
Map<ByteArray, byte[]> transforms)
throws VoldemortException {
Map<ByteArray, List<Versioned<byte[]>>> proxyKeyValues = proxyGetAll(keys,
stealInfoList,
transforms);
if(!isReadOnly) {
for(Map.Entry<ByteArray, List<Versioned<byte[]>>> keyValuePair: proxyKeyValues.entrySet()) {
for(Versioned<byte[]> proxyValue: keyValuePair.getValue()) {
try {
getInnerStore().put(keyValuePair.getKey(), proxyValue, null);
} catch(ObsoleteVersionException e) {
// ignore these
} |
<<<<<<<
import org.qi4j.api.query.grammar.ContainsAllPredicate;
import org.qi4j.api.query.grammar.ContainsPredicate;
import java.util.Collection;
=======
>>>>>>>
import org.qi4j.api.query.grammar.ContainsAllPredicate;
import org.qi4j.api.query.grammar.ContainsPredicate;
import java.util.Collection; |
<<<<<<<
}
};
private Assembler entityStoreConfigAssembler()
{
return new Assembler()
{
@Override
public void assemble( ModuleAssembly module )
throws AssemblyException
{
new EntityTestAssembler().assemble( module );
module.entities( NativeConfiguration.class ).visibleIn( Visibility.application );
module.forMixin( NativeConfiguration.class )
.declareDefaults()
.dataDirectory()
.set( rdfDirectory().getAbsolutePath() );
module.entities( JdbmEntityStoreConfiguration.class ).visibleIn( Visibility.application );
module.forMixin( JdbmEntityStoreConfiguration.class )
.declareDefaults()
.file()
.set( jdbmDirectory().getAbsolutePath() );
}
=======
>>>>>>> |
<<<<<<<
private byte[] transforms;
=======
private final HintedHandoff hintedHandoff;
public boolean enableHintedHandoff;
>>>>>>>
private byte[] transforms;
private final HintedHandoff hintedHandoff;
public boolean enableHintedHandoff;
<<<<<<<
store.submitPutRequest(key, versionedCopy, transforms, callback);
=======
store.submitPutRequest(key, versionedCopy, callback, timeoutMs);
>>>>>>>
store.submitPutRequest(key, versionedCopy, transforms, callback, timeoutMs); |
<<<<<<<
import org.qi4j.api.entity.association.Association;
import org.qi4j.api.entity.EntityComposite;
import org.qi4j.api.query.grammar.AssociationReference;
import org.qi4j.runtime.query.QueryException;
import org.qi4j.runtime.entity.EntityInstance;
=======
>>>>>>>
import org.qi4j.api.entity.EntityComposite;
import org.qi4j.api.entity.association.Association;
import org.qi4j.api.query.grammar.AssociationReference;
import org.qi4j.runtime.entity.EntityInstance;
import org.qi4j.runtime.query.QueryException; |
<<<<<<<
import java.lang.reflect.Type;
=======
>>>>>>>
import java.lang.reflect.Type;
<<<<<<<
import org.qi4j.api.common.TypeName;
import org.qi4j.api.structure.Module;
=======
import org.qi4j.api.common.TypeName;
import org.qi4j.api.structure.Module;
import java.lang.reflect.Type;
>>>>>>>
import org.qi4j.api.common.TypeName;
import org.qi4j.api.structure.Module; |
<<<<<<<
return new Node(id, "localhost", 8080, 6666, list);
=======
return new Node(id, "localhost", 8080, 6666, 6667, list, new NodeStatus(time));
>>>>>>>
return new Node(id, "localhost", 8080, 6666, 6667, list); |
<<<<<<<
/**
* @return connector.http.host or null if undefined
*/
public String getConnectorHttpHost() {
return getString(Key.CONNECTOR_HTTP_HOST, null);
}
/**
* @return connector.http.host or 0 if undefined
*/
public int getConnectorHttpPort() {
return getInt(Key.CONNECTOR_HTTP_PORT, 0);
}
/**
* @return connector.http.int or null if undefined
*/
public String getConnectorAjpHost() {
return getString(Key.CONNECTOR_AJP_HOST, null);
}
/**
* @return connector.http.int or 0 if undefined
*/
public int getConnectorAjpCPort() {
return getInt(Key.CONNECTOR_AJP_PORT, 0);
}
=======
/**
* @return application.jwt.signkey
*/
public String getJwtsSignKey() {
return getString(Key.APPLICATION_JWT_SIGNKEY, null);
}
/**
* @return application.jwt.encrypt
*/
public boolean isJwtsEncrypted() {
return getBoolean(Key.APPLICATION_JWT_ENCRYPT, Default.APPLICATION_JWT_ENCRYPT.toBoolean());
}
/**
* @return application.jwt.encryptionkey
*/
public String getJwtsEncryptionKey() {
return getString(Key.APPLICATION_JWT_ENCRYPTION_KEY, getApplicationSecret());
}
>>>>>>>
/**
* @return connector.http.host or null if undefined
*/
public String getConnectorHttpHost() {
return getString(Key.CONNECTOR_HTTP_HOST, null);
}
/**
* @return connector.http.host or 0 if undefined
*/
public int getConnectorHttpPort() {
return getInt(Key.CONNECTOR_HTTP_PORT, 0);
}
/**
* @return connector.http.int or null if undefined
*/
public String getConnectorAjpHost() {
return getString(Key.CONNECTOR_AJP_HOST, null);
}
/**
* @return connector.http.int or 0 if undefined
*/
public int getConnectorAjpCPort() {
return getInt(Key.CONNECTOR_AJP_PORT, 0);
}
/**
* @return application.jwt.signkey
*/
public String getJwtsSignKey() {
return getString(Key.APPLICATION_JWT_SIGNKEY, null);
}
/**
* @return application.jwt.encrypt
*/
public boolean isJwtsEncrypted() {
return getBoolean(Key.APPLICATION_JWT_ENCRYPT, Default.APPLICATION_JWT_ENCRYPT.toBoolean());
}
/**
* @return application.jwt.encryptionkey
*/
public String getJwtsEncryptionKey() {
return getString(Key.APPLICATION_JWT_ENCRYPTION_KEY, getApplicationSecret());
} |
<<<<<<<
private boolean timer;
=======
private List<Annotation> classAnnotations;
private List<Annotation> methodAnnotations;
>>>>>>>
private boolean timer;
private List<Annotation> classAnnotations;
private List<Annotation> methodAnnotations;
<<<<<<<
public boolean isTimer() {
return this.timer;
}
=======
>>>>>>>
public boolean isTimer() {
return this.timer;
} |
<<<<<<<
@Before
public void setUp() throws Exception {
this.nodes = ImmutableList.of(new Node(1, "test1", 1, 1, ImmutableList.of(1, 2, 3)),
new Node(2, "test1", 2, 2, ImmutableList.of(3, 5, 6)),
new Node(3, "test1", 3, 3, ImmutableList.of(7, 8, 9)),
new Node(4, "test1", 4, 4, ImmutableList.of(10, 11, 12)));
=======
public void setUp() {
this.nodes = ImmutableList.of(new Node(1,
"test1",
1,
1,
1,
ImmutableList.of(1, 2, 3),
new NodeStatus(time)),
new Node(2,
"test1",
2,
2,
2,
ImmutableList.of(3, 5, 6),
new NodeStatus(time)),
new Node(3,
"test1",
3,
3,
3,
ImmutableList.of(7, 8, 9),
new NodeStatus(time)),
new Node(4,
"test1",
4,
4,
4,
ImmutableList.of(10, 11, 12),
new NodeStatus(time)));
>>>>>>>
@Before
public void setUp() throws Exception {
this.nodes = ImmutableList.of(new Node(1, "test1", 1, 1, 1, ImmutableList.of(1, 2, 3)),
new Node(2, "test1", 2, 2, 2, ImmutableList.of(3, 5, 6)),
new Node(3, "test1", 3, 3, 3, ImmutableList.of(7, 8, 9)),
new Node(4, "test1", 4, 4, 4, ImmutableList.of(10, 11, 12))); |
<<<<<<<
if (RouteType.REQUEST.equals(route.getRouteType())) {
DispatcherHandler dispatcherHandler = new DispatcherHandler(
route.getControllerClass(),
route.getControllerMethod(),
route.isBlockingAllowed(),
route.isInternalTemplateEngine(),
route.isTimerEnabled());
routingHandler.add(route.getRequestMethod(),route.getUrl(), dispatcherHandler);
} else if (RouteType.RESOURCE_FILE.equals(route.getRouteType())) {
=======
if (RouteType.REQUEST == route.getRouteType()) {
routingHandler.add(route.getRequestMethod(),route.getUrl(),
new DispatcherHandler(route.getControllerClass(), route.getControllerMethod(), route.isBlockingAllowed(), route.isInternalTemplateEngine()));
} else if (RouteType.RESOURCE_FILE == route.getRouteType()) {
>>>>>>>
if (RouteType.REQUEST.equals(route.getRouteType())) {
DispatcherHandler dispatcherHandler = new DispatcherHandler(
route.getControllerClass(),
route.getControllerMethod(),
route.isBlockingAllowed(),
route.isInternalTemplateEngine(),
route.isTimerEnabled());
routingHandler.add(route.getRequestMethod(),route.getUrl(), dispatcherHandler);
} else if (RouteType.RESOURCE_FILE.equals(route.getRouteType())) {
<<<<<<<
LOG.info(buffer.toString());
if (StringUtils.isNotBlank(this.httpHost) && this.httpPort > 0) {
LOG.info("HTTP connector listening @{}:{}", this.httpHost,this.httpPort);
}
if (StringUtils.isNotBlank(this.ajpHost) && this.ajpPort > 0) {
LOG.info("AJP connector listening @{}:{}", this.ajpHost,this.ajpPort);
}
LOG.info("mangoo I/O application started in {} ms in {} mode. Enjoy.", ChronoUnit.MILLIS.between(this.start, LocalDateTime.now()), this.mode.toString());
=======
LOG.info(buffer.toString()); //NOSONAR
LOG.info("mangoo I/O application started @{}:{} in {} ms in {} mode. Enjoy.", this.host, this.port, ChronoUnit.MILLIS.between(this.start, LocalDateTime.now()), this.mode.toString());
>>>>>>>
LOG.info(buffer.toString()); //NOSONAR
if (StringUtils.isNotBlank(this.httpHost) && this.httpPort > 0) {
LOG.info("HTTP connector listening @{}:{}", this.httpHost,this.httpPort);
}
if (StringUtils.isNotBlank(this.ajpHost) && this.ajpPort > 0) {
LOG.info("AJP connector listening @{}:{}", this.ajpHost,this.ajpPort);
}
LOG.info("mangoo I/O application started in {} ms in {} mode. Enjoy.", ChronoUnit.MILLIS.between(this.start, LocalDateTime.now()), this.mode.toString()); |
<<<<<<<
=======
/**
* Evaluate the supplied JSON document.
* @throws Exception if an exception occurs
*/
public void evaluateSuppliedJson() throws Exception {
Evaluator evaluator = GeoportalContext.getInstance().getBeanIfDeclared(
"metadata.Evaluator",Evaluator.class,new Evaluator());
evaluator.evaluateSuppliedJson(this);
}
>>>>>>>
/**
* Evaluate the supplied JSON document.
* @throws Exception if an exception occurs
*/
public void evaluateSuppliedJson() throws Exception {
Evaluator evaluator = GeoportalContext.getInstance().getBeanIfDeclared(
"metadata.Evaluator",Evaluator.class,new Evaluator());
evaluator.evaluateSuppliedJson(this);
} |
<<<<<<<
private ArrayList<BranchUniversalObject> branchObjects;
private CallbackContext callbackContext;
=======
private BranchUniversalObject branchObj;
>>>>>>>
private ArrayList<BranchUniversalObject> branchObjects;
private CallbackContext callbackContext;
<<<<<<<
this.callbackContext = null;
=======
this.branchObj = null;
>>>>>>>
this.callbackContext = null;
<<<<<<<
this.userCompletedAction (args.getString(0), args.getJSONObject(1));
} else if (args.length() == 1) {
this.userCompletedAction(args.getString(0));
=======
this.userCompletedAction(args.getString(0), args.getJSONObject(1), callbackContext);
} else {
this.userCompletedAction(args.getString(0), callbackContext);
>>>>>>>
this.userCompletedAction (args.getString(0), args.getJSONObject(1));
} else if (args.length() == 1) {
this.userCompletedAction(args.getString(0));
<<<<<<<
if (args.length() == 1) {
this.createBranchUniversalObject(args.getJSONObject(0));
return true;
} else {
callbackContext.error(String.format("Parameter mismatched. 1 is required but %d is given", args.length()));
return false;
}
=======
this.createBranchUniversalObject(args.getJSONObject(0), callbackContext);
return true;
>>>>>>>
if (args.length() == 1) {
this.createBranchUniversalObject(args.getJSONObject(0), callbackContext);
return true;
} else {
callbackContext.error(String.format("Parameter mismatched. 1 is required but %d is given", args.length()));
return false;
}
<<<<<<<
if (args.length() == 3) {
this.generateShortUrl(args.getInt(0), args.getJSONObject(1), args.getJSONObject(2));
return true;
} else {
callbackContext.error(String.format("Parameter mismatched. 3 is required but %d is given", args.length()));
return false;
}
=======
this.generateShortUrl(args.getJSONObject(0), args.getJSONObject(1), callbackContext);
return true;
>>>>>>>
if (args.length() == 3) {
this.generateShortUrl(args.getInt(0), args.getJSONObject(1), args.getJSONObject(2), callbackContext);
return true;
} else {
callbackContext.error(String.format("Parameter mismatched. 3 is required but %d is given", args.length()));
return false;
}
<<<<<<<
if (args.length() == 1) {
this.registerView(args.getInt(0), callbackContext);
}
=======
this.registerView(callbackContext);
>>>>>>>
if (args.length() == 1) {
this.registerView(args.getInt(0), callbackContext);
}
<<<<<<<
private void redeemRewards(int value, String bucket) {
=======
private void redeemRewards(int value, String bucket, CallbackContext callbackContext)
{
>>>>>>>
private void redeemRewards(int value, String bucket, CallbackContext callbackContext)
{
<<<<<<<
this.branchObjects.add(branchObj);
JSONObject response = new JSONObject();
response.put("message", "Success");
response.put("branchUniversalObjectId", this.branchObjects.size() - 1);
this.callbackContext.success(response);
=======
callbackContext.success("Success");
>>>>>>>
this.branchObjects.add(branchObj);
JSONObject response = new JSONObject();
response.put("message", "Success");
response.put("branchUniversalObjectId", this.branchObjects.size() - 1);
this.callbackContext.success(response);
<<<<<<<
private void registerView(int instanceIdx, CallbackContext callbackContext)
=======
private void registerView(CallbackContext callbackContext)
>>>>>>>
private void registerView(int instanceIdx, CallbackContext callbackContext)
<<<<<<<
BranchUniversalObject branchObj = (BranchUniversalObject)this.branchObjects.get(instanceIdx);
branchObj.registerView(new RegisterViewStatusListener(callbackContext));
=======
this.branchObj.registerView(new RegisterViewStatusListener(callbackContext));
>>>>>>>
BranchUniversalObject branchObj = (BranchUniversalObject)this.branchObjects.get(instanceIdx);
branchObj.registerView(new RegisterViewStatusListener(callbackContext));
<<<<<<<
private void generateShortUrl(int instanceIdx, JSONObject options, JSONObject controlParams) throws JSONException
=======
private void generateShortUrl(JSONObject options, JSONObject controlParams, CallbackContext callbackContext) throws JSONException
>>>>>>>
private void generateShortUrl(int instanceIdx, JSONObject options, JSONObject controlParams, CallbackContext callbackContext) throws JSONException
<<<<<<<
BranchUniversalObject branchObj = (BranchUniversalObject)this.branchObjects.get(instanceIdx);
branchObj.generateShortUrl(this.activity, linkProperties, new GenerateShortUrlListener());
=======
this.branchObj.generateShortUrl(this.activity, linkProperties, new GenerateShortUrlListener(callbackContext));
>>>>>>>
BranchUniversalObject branchObj = (BranchUniversalObject)this.branchObjects.get(instanceIdx);
branchObj.generateShortUrl(this.activity, linkProperties, new GenerateShortUrlListener(callbackContext)); |
<<<<<<<
* Creates a {@link Valid} that contains the result of the given {@code supplier}.
*
* @param <E> type of the error
* @param <T> type of the result of the given {@code supplier}
* @param supplier A supplier for the value
* @return {@code Valid(value)}
* @throws NullPointerException if supplier is null
*/
static <E, T> Validation<E, T> valid(Supplier<? extends T> supplier) {
Objects.requireNonNull(supplier, "supplier is null");
return new Valid<>(supplier.get());
}
/**
=======
>>>>>>>
<<<<<<<
* Creates an {@link Invalid} that contains the result of the given {@code supplier}.
*
* @param <E> type of the result of the given {@code supplier}
* @param <T> type of the value
* @param supplier A supplier for the error
* @return {@code Invalid(error)}
* @throws NullPointerException if supplier is null
*/
static <E, T> Validation<E, T> invalid(Supplier<? extends E> supplier) {
Objects.requireNonNull(supplier, "supplier is null");
return new Invalid<>(supplier.get());
}
/**
=======
>>>>>>> |
<<<<<<<
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils;
=======
>>>>>>>
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.util.EntityUtils; |
<<<<<<<
import com.devbrackets.android.exomedia.core.video.exo.ExoTextureVideoView;
import com.devbrackets.android.exomedia.core.video.mp.NativeTextureVideoView;
=======
import com.devbrackets.android.exomedia.core.listener.Id3MetadataListener;
>>>>>>>
import com.devbrackets.android.exomedia.core.video.exo.ExoTextureVideoView;
import com.devbrackets.android.exomedia.core.video.mp.NativeTextureVideoView;
import com.devbrackets.android.exomedia.core.listener.Id3MetadataListener; |
<<<<<<<
p.put(FEATURE_CONCEPT_KEY, settings.get(FEATURE_CONCEPT_KEY));
p.put(HIBERNATE_DATASOURCE_TIMEZONE, settings.get(TIMEZONE_KEY));
p.put(HIBERNATE_DATASOURCE_TIME_STRING_FORMAT, settings.get(TIME_STRING_FORMAT_KEY));
p.put(HIBERNATE_DATASOURCE_TIME_STRING_Z, settings.get(TIME_STRING_Z_KEY).toString());
=======
if (settings.containsKey(TIMEZONE_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIMEZONE, settings.get(TIMEZONE_KEY));
}
if (settings.containsKey(TIME_STRING_FORMAT_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIME_STRING_FORMAT, settings.get(TIME_STRING_FORMAT_KEY));
}
if (settings.containsKey(TIME_STRING_Z_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIME_STRING_Z, settings.get(TIME_STRING_Z_KEY).toString());
}
>>>>>>>
p.put(FEATURE_CONCEPT_KEY, settings.get(FEATURE_CONCEPT_KEY));
if (settings.containsKey(TIMEZONE_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIMEZONE, settings.get(TIMEZONE_KEY));
}
if (settings.containsKey(TIME_STRING_FORMAT_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIME_STRING_FORMAT, settings.get(TIME_STRING_FORMAT_KEY));
}
if (settings.containsKey(TIME_STRING_Z_KEY)) {
p.put(HIBERNATE_DATASOURCE_TIME_STRING_Z, settings.get(TIME_STRING_Z_KEY).toString());
} |
<<<<<<<
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue.getValue(), false), NUMERIC_MAX_LIMIT);
return FieldSpec.fromRestriction(numericRestrictions);
=======
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue, false), NUMERIC_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(numericRestrictions);
>>>>>>>
LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(new Limit<>(referenceValue.getValue(), false), NUMERIC_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(numericRestrictions); |
<<<<<<<
public VAdminProto.InitiateFetchAndUpdateResponse handleFetchAndUpdate(VAdminProto.InitiateFetchAndUpdateRequest request) {
=======
public VAdminProto.AsyncOperationStatusResponse
handleFetchAndUpdate(VAdminProto.InitiateFetchAndUpdateRequest request) {
>>>>>>>
public VAdminProto.AsyncOperationStatusResponse handleFetchAndUpdate(VAdminProto.InitiateFetchAndUpdateRequest request) {
<<<<<<<
// TODO bbansal : fix me this should be shared.
AdminClient adminClient = null;
Iterator<Pair<ByteArray, Versioned<byte[]>>> entriesIterator = adminClient.fetchPartitionEntries(nodeId,
storeName,
partitions,
filter);
setStatus("Initated fetchPartitionEntries");
=======
AdminClient adminClient = adminClientFactory.getAdminClient();
Iterator<Pair<ByteArray, Versioned<byte[]>>> entriesIterator =
adminClient.fetchPartitionEntries(nodeId, storeName, partitions, filter);
updateStatus("Initated fetchPartitionEntries");
>>>>>>>
Iterator<Pair<ByteArray, Versioned<byte[]>>> entriesIterator = adminClient.fetchPartitionEntries(nodeId,
storeName,
partitions,
filter);
updateStatus("Initated fetchPartitionEntries");
<<<<<<<
if((i % 1000) == 0) {
setStatus(i + " entries processed");
=======
if ((i % 1000) == 0) {
updateStatus(i + " entries processed");
>>>>>>>
if((i % 1000) == 0) {
updateStatus(i + " entries processed");
}
<<<<<<<
} catch(VoldemortException e) {
=======
response.setRequestId(requestId);
} catch (VoldemortException e) {
>>>>>>>
response.setRequestId(requestId);
} catch(VoldemortException e) { |
<<<<<<<
=======
import com.scottlogic.deg.generator.generation.DataGenerator;
import com.scottlogic.deg.generator.generation.GenerationConfig;
import com.scottlogic.deg.generator.generation.NoopDataGeneratorMonitor;
>>>>>>>
import com.scottlogic.deg.generator.generation.NoopDataGeneratorMonitor;
<<<<<<<
monitor))
=======
new NoopDataGeneratorMonitor()))
>>>>>>>
monitor)) |
<<<<<<<
OffsetDateTime temporalValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
=======
LocalDateTime datetimeValue = LocalDateTime.of(2001, 02, 03, 04, 05, 06);
>>>>>>>
OffsetDateTime datetimeValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
<<<<<<<
OffsetDateTime temporalValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
=======
LocalDateTime datetimeValue = LocalDateTime.of(2001, 02, 03, 04, 05, 06);
>>>>>>>
OffsetDateTime datetimeValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
<<<<<<<
OffsetDateTime temporalValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
OffsetDateTime oneHourLaterTemporalValue = temporalValue.plusHours(1);
=======
LocalDateTime datetimeValue = LocalDateTime.of(2001, 02, 03, 04, 05, 06);
LocalDateTime oneHourLaterDateTimeValue = datetimeValue.plusHours(1);
>>>>>>>
OffsetDateTime datetimeValue = OffsetDateTime.of(2001, 02, 03, 04, 05, 06, 0, ZoneOffset.UTC);
OffsetDateTime oneHourLaterDateTimeValue = datetimeValue.plusHours(1); |
<<<<<<<
LinearRestrictions<BigDecimal> restrictions = fieldSpec.getNumericRestrictions() == null
? LinearRestrictionsFactory.createNumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT)
: fieldSpec.getNumericRestrictions();
=======
LinearRestrictions<BigDecimal> restrictions = fieldSpec.getRestrictions() == null
? new NumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT)
: (LinearRestrictions<BigDecimal>) fieldSpec.getRestrictions();
>>>>>>>
LinearRestrictions<BigDecimal> restrictions = fieldSpec.getRestrictions() == null
? LinearRestrictionsFactory.createNumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT)
: (LinearRestrictions<BigDecimal>) fieldSpec.getRestrictions(); |
<<<<<<<
DateTimeRestrictions temporalRestrictions = new DateTimeRestrictions() {{
min = new DateTimeLimit(OffsetDateTime.MIN, false);
max = new DateTimeLimit(OffsetDateTime.MAX, false);
=======
DateTimeRestrictions datetimeRestrictions = new DateTimeRestrictions() {{
min = new DateTimeLimit(LocalDateTime.MIN, false);
max = new DateTimeLimit(LocalDateTime.MAX, false);
>>>>>>>
DateTimeRestrictions datetimeRestrictions = new DateTimeRestrictions() {{
min = new DateTimeLimit(OffsetDateTime.MIN, false);
max = new DateTimeLimit(OffsetDateTime.MAX, false); |
<<<<<<<
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue.getValue(), true), DATETIME_MAX_LIMIT);
return FieldSpec.fromRestriction(dateTimeRestrictions);
=======
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue, true), DATETIME_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(dateTimeRestrictions);
>>>>>>>
final LinearRestrictions<OffsetDateTime> dateTimeRestrictions = createDateTimeRestrictions(new Limit<>(referenceValue.getValue(), true), DATETIME_MAX_LIMIT);
return FieldSpecFactory.fromRestriction(dateTimeRestrictions); |
<<<<<<<
import static com.scottlogic.deg.generator.restrictions.linear.NumericRestrictions.NUMERIC_MAX_LIMIT;
import static com.scottlogic.deg.generator.restrictions.linear.NumericRestrictions.NUMERIC_MIN_LIMIT;
=======
import static com.scottlogic.deg.common.profile.Types.*;
>>>>>>>
import static com.scottlogic.deg.generator.restrictions.linear.NumericRestrictions.NUMERIC_MAX_LIMIT;
import static com.scottlogic.deg.generator.restrictions.linear.NumericRestrictions.NUMERIC_MIN_LIMIT;
import static com.scottlogic.deg.common.profile.Types.*;
<<<<<<<
left = FieldSpec.Empty.withNumericRestrictions(
new NumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT));
right = FieldSpec.Empty.withNumericRestrictions(
new NumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT));
=======
left = FieldSpec.fromType(NUMERIC).withNumericRestrictions(
new NumericRestrictions());
right = FieldSpec.fromType(NUMERIC).withNumericRestrictions(
new NumericRestrictions());
>>>>>>>
left = FieldSpec.fromType(NUMERIC).withNumericRestrictions(
new NumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT));
right = FieldSpec.fromType(NUMERIC).withNumericRestrictions(
new NumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT));
<<<<<<<
=======
@Disabled("same instance check not working due to being casted")
@Test
public void applyMergeOperation_withMergableNumericRestrictions_shouldApplyMergedNumericRestrictions(){
FieldSpec merging = FieldSpec.fromType(NUMERIC);
NumericRestrictions merged = new NumericRestrictions();
when(merger.merge(left.getNumericRestrictions(), right.getNumericRestrictions()))
.thenReturn(new MergeResult<>(merged));
FieldSpec result = operation.applyMergeOperation(left, right);
Assert.assertThat(result, not(sameInstance(merging)));
Assert.assertThat(result.getNumericRestrictions(), sameInstance(merged));
Assert.assertThat(result.getType(), sameInstance(merging.getType()));
}
>>>>>>> |
<<<<<<<
import com.scottlogic.deg.generator.restrictions.linear.*;
=======
import com.scottlogic.deg.generator.restrictions.linear.Limit;
import com.scottlogic.deg.generator.restrictions.linear.LinearRestrictions;
import com.scottlogic.deg.generator.restrictions.linear.LinearRestrictionsMerger;
import com.scottlogic.deg.generator.restrictions.linear.NumericRestrictions;
>>>>>>>
import com.scottlogic.deg.generator.restrictions.linear.*;
<<<<<<<
public void merge_withNoRestrictions_shouldReturnSuccessWithNoRestrictions(){
LinearRestrictionsMerger merger = new LinearRestrictionsMerger();
MergeResult<LinearRestrictions<BigDecimal>> result = merger.merge(null, null);
Assert.assertThat(result, not(nullValue()));
Assert.assertThat(result.successful, is(true));
Assert.assertThat(result.restrictions, is(nullValue()));
}
@Test
public void merge_withOnlyLeftNumericRestrictions_shouldReturnLeftRestrictions(){
LinearRestrictionsMerger merger = new LinearRestrictionsMerger();
LinearRestrictions<BigDecimal> left = LinearRestrictionsFactory.createNumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT);
MergeResult<LinearRestrictions<BigDecimal>> result = merger.merge(left, null);
Assert.assertThat(result, not(nullValue()));
Assert.assertThat(result.successful, is(true));
Assert.assertThat(result.restrictions, is(sameInstance(left)));
}
@Test
public void merge_withOnlyRightNumericRestrictions_shouldReturnLeftRestrictions(){
LinearRestrictionsMerger merger = new LinearRestrictionsMerger();
LinearRestrictions<BigDecimal> right = LinearRestrictionsFactory.createNumericRestrictions(NUMERIC_MIN_LIMIT, NUMERIC_MAX_LIMIT);
MergeResult<LinearRestrictions<BigDecimal>> result = merger.merge(null, right);
Assert.assertThat(result, not(nullValue()));
Assert.assertThat(result.successful, is(true));
Assert.assertThat(result.restrictions, is(sameInstance(right)));
}
@Test
=======
>>>>>>> |
<<<<<<<
import com.scottlogic.deg.generator.GenerationEngine;
import com.scottlogic.deg.common.profile.Profile;
=======
import com.scottlogic.deg.generator.Profile;
>>>>>>>
import com.scottlogic.deg.common.profile.Profile; |
<<<<<<<
import com.scottlogic.deg.generator.inputs.validation.ProfileVisitor;
import com.scottlogic.deg.generator.inputs.validation.VisitableProfileElement;
=======
import com.scottlogic.deg.generator.inputs.RuleInformation;
>>>>>>>
import com.scottlogic.deg.generator.inputs.validation.ProfileVisitor;
import com.scottlogic.deg.generator.inputs.validation.VisitableProfileElement;
import com.scottlogic.deg.generator.inputs.RuleInformation;
<<<<<<<
@Override
public void accept(ProfileVisitor visitor) {
visitor.visit(this);
}
=======
@Override
public Set<RuleInformation> getRules() {
return rules;
}
@Override
public AtomicConstraint withRules(Set<RuleInformation> rules) {
return new IsAfterOrEqualToConstantDateTimeConstraint(this.field, this.referenceValue, rules);
}
>>>>>>>
@Override
public void accept(ProfileVisitor visitor) {
visitor.visit(this);
}
@Override
public Set<RuleInformation> getRules() {
return rules;
}
@Override
public AtomicConstraint withRules(Set<RuleInformation> rules) {
return new IsAfterOrEqualToConstantDateTimeConstraint(this.field, this.referenceValue, rules);
} |
<<<<<<<
@CommandLine.Option(names = {"-w", "--w"},
description = "Determines the tree walker that should be used.",
defaultValue = "Exhaustive",
hidden = true)
private GenerationConfig.TreeWalkerType walkerType = GenerationConfig.TreeWalkerType.Exhaustive;
=======
@CommandLine.Option(
names = {"--no-optimise"},
description = "Prevents tree optimisation",
hidden = true)
private boolean dontOptimise;
@CommandLine.Option(
names = {"--no-partition"},
description = "Prevents tree partitioning",
hidden = true)
private boolean dontPartitionTrees;
>>>>>>>
@CommandLine.Option(
names = {"--no-optimise"},
description = "Prevents tree optimisation",
hidden = true)
private boolean dontOptimise;
@CommandLine.Option(
names = {"--no-partition"},
description = "Prevents tree partitioning",
hidden = true)
private boolean dontPartitionTrees;
@CommandLine.Option(names = {"-w", "--w"},
description = "Determines the tree walker that should be used.",
defaultValue = "Exhaustive",
hidden = true)
private GenerationConfig.TreeWalkerType walkerType = GenerationConfig.TreeWalkerType.Exhaustive;
<<<<<<<
new FileOutputTarget(outputPath, new CsvDataSetWriter()),
new DataGenerator(treeWalker))
=======
new FileOutputTarget(outputPath, new CsvDataSetWriter()),
!dontOptimise,
!dontPartitionTrees)
>>>>>>>
new FileOutputTarget(outputPath, new CsvDataSetWriter()),
new DataGenerator(
treeWalker,
dontPartitionTrees
? new NoopTreePartitioner()
: new DefaultTreePartitioner(),
dontOptimise
? new NoopDecisionTreeOptimiser()
: new DecisionTreeOptimiser())) |
<<<<<<<
final LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(NUMERIC_MIN_LIMIT, new Limit<>(referenceValue.getValue(), true));
return FieldSpec.fromRestriction(numericRestrictions);
=======
final LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(NUMERIC_MIN_LIMIT, new Limit<>(referenceValue, true));
return FieldSpecFactory.fromRestriction(numericRestrictions);
>>>>>>>
final LinearRestrictions<BigDecimal> numericRestrictions = createNumericRestrictions(NUMERIC_MIN_LIMIT, new Limit<>(referenceValue.getValue(), true));
return FieldSpecFactory.fromRestriction(numericRestrictions); |
<<<<<<<
import com.scottlogic.deg.generator.restrictions.set.SetRestrictions;
import com.scottlogic.deg.generator.walker.reductive.fieldselectionstrategy.FieldValue;
=======
import com.scottlogic.deg.generator.restrictions.SetRestrictions;
>>>>>>>
import com.scottlogic.deg.generator.restrictions.set.SetRestrictions; |
<<<<<<<
import com.scottlogic.deg.generator.inputs.IndividualConstraintRuleViolator;
import com.scottlogic.deg.generator.inputs.IndividualRuleProfileViolator;
import com.scottlogic.deg.generator.inputs.JsonProfileReader;
import com.scottlogic.deg.generator.generation.databags.RowSpecDataBagSourceFactory;
import com.scottlogic.deg.generator.reducer.ConstraintReducer;
=======
>>>>>>>
import com.scottlogic.deg.generator.inputs.IndividualConstraintRuleViolator;
import com.scottlogic.deg.generator.inputs.IndividualRuleProfileViolator;
import com.scottlogic.deg.generator.inputs.JsonProfileReader;
import com.scottlogic.deg.generator.reducer.ConstraintReducer; |
<<<<<<<
import com.scottlogic.deg.custom.CustomGeneratorList;
=======
import com.scottlogic.deg.common.util.FileUtils;
>>>>>>>
import com.scottlogic.deg.custom.CustomGeneratorList;
import com.scottlogic.deg.common.util.FileUtils;
<<<<<<<
import com.scottlogic.deg.profile.custom.CustomConstraint;
import com.scottlogic.deg.profile.custom.CustomConstraintFactory;
=======
import com.scottlogic.deg.profile.services.ConstraintService;
import com.scottlogic.deg.profile.services.FieldService;
import com.scottlogic.deg.profile.services.RuleService;
import com.scottlogic.deg.profile.validators.ConfigValidator;
import com.scottlogic.deg.profile.validators.CreateProfileValidator;
import com.scottlogic.deg.profile.validators.profile.ProfileValidator;
>>>>>>>
import com.scottlogic.deg.profile.custom.CustomConstraint;
import com.scottlogic.deg.profile.custom.CustomConstraintFactory;
import com.scottlogic.deg.profile.services.ConstraintService;
import com.scottlogic.deg.profile.services.FieldService;
import com.scottlogic.deg.profile.services.RuleService;
import com.scottlogic.deg.profile.validators.ConfigValidator;
import com.scottlogic.deg.profile.validators.CreateProfileValidator;
import com.scottlogic.deg.profile.validators.profile.ProfileValidator;
<<<<<<<
private JsonProfileReader jsonProfileReader = new JsonProfileReader(
null,
new ConstraintReader(new AtomicConstraintReader(new MockFromFileReader())),
new CustomConstraintFactory(new CustomGeneratorList()));
=======
private JsonProfileReader jsonProfileReader = new JsonProfileReader(
null,
new ConfigValidator(new FileUtils()),
new MockFromFileReader(),
new ProfileCommandBus(
new FieldService(),
new RuleService(new ConstraintService()), new CreateProfileValidator(new ProfileValidator(null))));
>>>>>>>
private JsonProfileReader jsonProfileReader = new JsonProfileReader(
null,
new ConfigValidator(new FileUtils()),
new MockFromFileReader(),
new ProfileCommandBus(
new FieldService(),
new RuleService(
new ConstraintService(),
new CustomConstraintFactory(new CustomGeneratorList())),
new CreateProfileValidator(new ProfileValidator(null)))); |
<<<<<<<
import com.scottlogic.deg.generator.decisiontree.tree_partitioning.DefaultTreePartitioner;
import com.scottlogic.deg.generator.decisiontree.tree_partitioning.TreePartitioner;
=======
import com.scottlogic.deg.generator.decisiontree.IDecisionTreeOptimiser;
import com.scottlogic.deg.generator.decisiontree.tree_partitioning.ITreePartitioner;
>>>>>>>
import com.scottlogic.deg.generator.decisiontree.IDecisionTreeOptimiser;
import com.scottlogic.deg.generator.decisiontree.tree_partitioning.TreePartitioner; |
<<<<<<<
private static LocalDateTime unwrapDate(ConstraintDTO dto) throws InvalidProfileException {
Object date = unwrapDateValueIfDateObject(throwIfValueInvalid(dto, Object.class));
if (date instanceof LocalDateTime) {
return (LocalDateTime) date;
}
=======
private static OffsetDateTime unwrapDate(Object value) throws InvalidProfileException {
Object date = potentialUnwrapDate(value);
if (date instanceof OffsetDateTime)
return (OffsetDateTime) date;
>>>>>>>
private static OffsetDateTime unwrapDate(ConstraintDTO dto) throws InvalidProfileException {
Object date = unwrapDateValueIfDateObject(throwIfValueInvalid(dto, Object.class));
if (date instanceof OffsetDateTime) {
return (OffsetDateTime) date;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.