conflict_resolution
stringlengths
27
16k
<<<<<<< import com.owncloud.android.Log_OC; import com.owncloud.android.R; import com.owncloud.android.oc_framework.network.CertificateCombinedException; import com.owncloud.android.oc_framework.network.NetworkUtils; import com.owncloud.android.oc_framework.operations.RemoteOperationResult; ======= >>>>>>> import com.owncloud.android.oc_framework.network.CertificateCombinedException; import com.owncloud.android.oc_framework.network.NetworkUtils; import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
<<<<<<< public static boolean validateSecurityCode(final String securityCode) { return (!TextUtils.isEmpty(securityCode) && securityCode.length() >= 3 && securityCode.length() <= 4); ======= public static boolean validateSecurityCode(final CharSequence securityCode) { return securityCode == null || (!TextUtils.isEmpty(securityCode) && securityCode.length() >= 3 && securityCode.length() <= 4); >>>>>>> public static boolean validateSecurityCode(final String securityCode) { return securityCode == null || (!TextUtils.isEmpty(securityCode) && securityCode.length() >= 3 && securityCode.length() <= 4);
<<<<<<< ======= import org.n52.sos.ogc.om.values.visitor.ValueVisitor; import org.n52.sos.ogc.ows.OwsExceptionReport; >>>>>>> import org.n52.sos.ogc.om.values.visitor.ValueVisitor;
<<<<<<< PaymentMethodRow selectedPaymentMethodRow = JsonUtil.getInstance().fromJson(data.getStringExtra("paymentMethodRow"), PaymentMethodRow.class); ======= Card card = JsonUtil.getInstance().fromJson(data.getStringExtra("card"), Card.class); >>>>>>> Card card = JsonUtil.getInstance().fromJson(data.getStringExtra("card"), Card.class); <<<<<<< mToken = JsonUtil.getInstance().fromJson(data.getStringExtra("token"), Token.class); mSelectedPaymentMethodRow = null; ======= mToken = (Token) data.getSerializableExtra("token"); mSelectedCard = null; >>>>>>> mToken = JsonUtil.getInstance().fromJson(data.getStringExtra("token"), Token.class); mSelectedCard = null;
<<<<<<< import com.mercadopago.model.Campaign; ======= import com.mercadopago.internal.di.AmountModule; import com.mercadopago.internal.repository.AmountRepository; import com.mercadopago.internal.repository.UserSelectionRepository; >>>>>>> import com.mercadopago.model.Campaign; import com.mercadopago.internal.di.AmountModule; import com.mercadopago.internal.repository.AmountRepository; import com.mercadopago.internal.repository.UserSelectionRepository;
<<<<<<< mIssuers = issuers; ======= MPTracker.getInstance().trackEvent("CARD_ISSUERS", "GET_ISSUERS_RESPONSE", "SUCCESS", mPublicKey, "MLA", "1.0", mActivity); >>>>>>> mIssuers = issuers; MPTracker.getInstance().trackEvent("CARD_ISSUERS", "GET_ISSUERS_RESPONSE", "SUCCESS", mPublicKey, "MLA", "1.0", mActivity);
<<<<<<< import com.mercadopago.lite.util.FakeAPI; ======= >>>>>>> import com.mercadopago.lite.util.FakeAPI; <<<<<<< import com.mercadopago.util.JsonUtil; import java.math.BigDecimal; ======= >>>>>>>
<<<<<<< import com.mercadopago.uicontrollers.ViewControllerFactory; import com.mercadopago.uicontrollers.payercosts.PayerCostViewController; import com.mercadopago.uicontrollers.paymentmethods.PaymentMethodViewController; ======= import com.mercadopago.model.TransactionManager; >>>>>>> import com.mercadopago.uicontrollers.ViewControllerFactory; import com.mercadopago.uicontrollers.payercosts.PayerCostViewController; import com.mercadopago.uicontrollers.paymentmethods.PaymentMethodViewController; <<<<<<< import java.math.BigDecimal; import java.util.Calendar; import java.util.List; ======= >>>>>>> import java.math.BigDecimal; import java.util.Calendar; <<<<<<< protected PaymentMethodViewController mPaymentMethodRow; protected PayerCostViewController mPayerCostRow; protected FailureRecovery failureRecovery; ======= protected FailureRecovery failureRecovery; >>>>>>> protected PaymentMethodViewController mPaymentMethodRow; protected PayerCostViewController mPayerCostRow; protected FailureRecovery failureRecovery; <<<<<<< showError(); ======= ErrorUtil.startErrorActivity(this, mErrorMessage, false); >>>>>>> showError(); <<<<<<< try { validatePreference(); initializeCheckout(); } catch (CheckoutPreferenceException e) { String errorMessage = ExceptionHandler.getErrorMessage(mActivity, e); ErrorUtil.startErrorActivity(mActivity, errorMessage, false); } ======= try { validatePreference(); initializeCheckout(); } catch (CheckoutPreferenceException e) { mErrorMessage = ExceptionHandler.getErrorMessage(mActivity, e); finishWithErrorMessage(); } >>>>>>> try { validatePreference(); initializeCheckout(); } catch (CheckoutPreferenceException e) { String errorMessage = ExceptionHandler.getErrorMessage(mActivity, e); ErrorUtil.startErrorActivity(mActivity, errorMessage, false); } <<<<<<< failureRecovery = new FailureRecovery() { @Override public void recover() { getPaymentMethodSearch(); } }; ApiUtil.showApiExceptionError(mActivity, error); ======= ApiUtil.showApiExceptionError(mActivity, error); failureRecovery = new FailureRecovery() { @Override public void recover() { getPaymentMethodSearch(); } }; >>>>>>> failureRecovery = new FailureRecovery() { @Override public void recover() { getPaymentMethodSearch(); } }; ApiUtil.showApiExceptionError(mActivity, error); <<<<<<< ======= private Spanned getAmountLabel() { String currencyId = mCheckoutPreference.getItems().get(0).getCurrencyId(); return CurrenciesUtil.formatNumber(mCheckoutPreference.getAmount(), currencyId, true, true); } >>>>>>> <<<<<<< } private void setPaymentMethodRowController() { if(MercadoPagoUtil.isCardPaymentType(mSelectedPaymentMethod.getPaymentTypeId())) { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOnEditionViewController(this, mSelectedPaymentMethod, mCreatedToken); } else { PaymentMethodSearchItem item = mPaymentMethodSearch.getSearchItemByPaymentMethod(mSelectedPaymentMethod); if(item != null) { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOffEditionViewController(this, item); } else { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOffEditionViewController(this, mSelectedPaymentMethod); } } } private void drawPayerCostRow() { mPayerCostLayout.removeAllViews(); if(mSelectedPayerCost != null) { mPaymentMethodRow.showSeparator(); mPayerCostRow = ViewControllerFactory.getPayerCostEditionViewController(this, mCheckoutPreference.getItems().get(0).getCurrencyId()); mPayerCostRow.inflateInParent(mPayerCostLayout, true); mPayerCostRow.initializeControls(); mPayerCostRow.drawPayerCost(mSelectedPayerCost); mPayerCostRow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startInstallmentsActivity(); } }); } } public void startInstallmentsActivity() { new MercadoPago.StartActivityBuilder() .setActivity(mActivity) .setPublicKey(mMerchantPublicKey) .setPaymentMethod(mSelectedPaymentMethod) .setAmount(mCheckoutPreference.getAmount()) .setToken(mCreatedToken) .setIssuer(mSelectedIssuer) .startCardInstallmentsActivity(); overridePendingTransition(R.anim.slide_right_to_left_in, R.anim.slide_right_to_left_out); } private void setAmountLabel() { mTotalAmountTextView.setText(getAmountLabel()); } private Spanned getAmountLabel() { BigDecimal totalAmount = getTotalAmount(); String currencyId = mCheckoutPreference.getItems().get(0).getCurrencyId(); return CurrenciesUtil.formatNumber(totalAmount, currencyId, true, true); } private BigDecimal getTotalAmount() { BigDecimal amount = new BigDecimal(0); if(mSelectedPayerCost != null) { amount = amount.add(mSelectedPayerCost.getTotalAmount()); } else { amount = mCheckoutPreference.getAmount(); } return amount; } private void drawTermsAndConditionsText() { StringBuilder termsAndConditionsText = new StringBuilder(); termsAndConditionsText.append(getString(R.string.mpsdk_text_terms_and_conditions_start) + " "); termsAndConditionsText.append("<font color='#0066CC'>" + getString(R.string.mpsdk_text_terms_and_conditions_linked) + "</font>"); termsAndConditionsText.append(" " + getString(R.string.mpsdk_text_terms_and_conditions_end)); mTermsAndConditionsTextView.setText(Html.fromHtml(termsAndConditionsText.toString())); } private void animateBackFromPaymentEdition() { overridePendingTransition(R.anim.slide_right_to_left_in, R.anim.slide_right_to_left_out); ======= >>>>>>> } private void setPaymentMethodRowController() { if(MercadoPagoUtil.isCardPaymentType(mSelectedPaymentMethod.getPaymentTypeId())) { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOnEditionViewController(this, mSelectedPaymentMethod, mCreatedToken); } else { PaymentMethodSearchItem item = mPaymentMethodSearch.getSearchItemByPaymentMethod(mSelectedPaymentMethod); if(item != null) { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOffEditionViewController(this, item); } else { mPaymentMethodRow = ViewControllerFactory.getPaymentMethodOffEditionViewController(this, mSelectedPaymentMethod); } } } private void drawPayerCostRow() { mPayerCostLayout.removeAllViews(); if(mSelectedPayerCost != null) { mPaymentMethodRow.showSeparator(); mPayerCostRow = ViewControllerFactory.getPayerCostEditionViewController(this, mCheckoutPreference.getItems().get(0).getCurrencyId()); mPayerCostRow.inflateInParent(mPayerCostLayout, true); mPayerCostRow.initializeControls(); mPayerCostRow.drawPayerCost(mSelectedPayerCost); mPayerCostRow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startInstallmentsActivity(); } }); } } public void startInstallmentsActivity() { new MercadoPago.StartActivityBuilder() .setActivity(mActivity) .setPublicKey(mMerchantPublicKey) .setPaymentMethod(mSelectedPaymentMethod) .setAmount(mCheckoutPreference.getAmount()) .setToken(mCreatedToken) .setIssuer(mSelectedIssuer) .startCardInstallmentsActivity(); overridePendingTransition(R.anim.slide_right_to_left_in, R.anim.slide_right_to_left_out); } private void setAmountLabel() { mTotalAmountTextView.setText(getAmountLabel()); } private Spanned getAmountLabel() { BigDecimal totalAmount = getTotalAmount(); String currencyId = mCheckoutPreference.getItems().get(0).getCurrencyId(); return CurrenciesUtil.formatNumber(totalAmount, currencyId, true, true); } private BigDecimal getTotalAmount() { BigDecimal amount = new BigDecimal(0); if(mSelectedPayerCost != null) { amount = amount.add(mSelectedPayerCost.getTotalAmount()); } else { amount = mCheckoutPreference.getAmount(); } return amount; } private void drawTermsAndConditionsText() { StringBuilder termsAndConditionsText = new StringBuilder(); termsAndConditionsText.append(getString(R.string.mpsdk_text_terms_and_conditions_start) + " "); termsAndConditionsText.append("<font color='#0066CC'>" + getString(R.string.mpsdk_text_terms_and_conditions_linked) + "</font>"); termsAndConditionsText.append(" " + getString(R.string.mpsdk_text_terms_and_conditions_end)); mTermsAndConditionsTextView.setText(Html.fromHtml(termsAndConditionsText.toString())); } private void animateBackFromPaymentEdition() { overridePendingTransition(R.anim.slide_right_to_left_in, R.anim.slide_right_to_left_out); <<<<<<< PaymentIntent paymentIntent = createPaymentIntent(); mMercadoPago.createPayment(paymentIntent, new Callback<Payment>() { ======= PaymentIntent paymentIntent = new PaymentIntent(); paymentIntent.setPrefId(mCheckoutPreference.getId()); paymentIntent.setPublicKey(mMerchantPublicKey); paymentIntent.setPaymentMethodId(mSelectedPaymentMethod.getId()); paymentIntent.setEmail(mCheckoutPreference.getPayer().getEmail()); paymentIntent.setTransactionId(TransactionManager.getInstance().getTransactionId()); mMercadoPago.createPayment(paymentIntent, new Callback<Payment>() { >>>>>>> PaymentIntent paymentIntent = createPaymentIntent(); mMercadoPago.createPayment(paymentIntent, new Callback<Payment>() {
<<<<<<< import com.owncloud.android.files.services.FileUploadService.FileUploaderBinder; ======= import com.owncloud.android.files.services.FileUploader.FileUploaderBinder; import com.owncloud.android.services.OperationsService.OperationsServiceBinder; >>>>>>> import com.owncloud.android.files.services.FileUploadService.FileUploaderBinder; import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
<<<<<<< @NonNull final InitRepository initRepository, @NonNull final IESCManager IESCManager, ======= @NonNull final GroupsRepository groupsRepository, @NonNull final ESCManagerBehaviour escManagerBehaviour, >>>>>>> @NonNull final InitRepository initRepository, @NonNull final ESCManagerBehaviour escManagerBehaviour, <<<<<<< new SelectMethodView(initResponse, IESCManager.getESCCardIds(), ======= new SelectMethodView(paymentMethodSearch, escManagerBehaviour.getESCCardIds(), >>>>>>> new SelectMethodView(initResponse, escManagerBehaviour.getESCCardIds(),
<<<<<<< import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.NonNull; import com.mercadopago.lite.util.ParcelableUtil; import java.io.Serializable; ======= import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.NonNull; import com.mercadopago.lite.util.ParcelableUtil; import java.io.Serializable; >>>>>>> import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.NonNull; import com.mercadopago.lite.util.ParcelableUtil; import java.io.Serializable; <<<<<<< import java.util.Locale; ======= >>>>>>> import java.util.Locale; <<<<<<< private Campaign(Builder builder) { this.id = builder.id; this.maxCouponAmount = builder.maxCouponAmount; this.codeType = builder.codeType; } @SuppressWarnings("unused") public String getId() { return id; ======= private Campaign(Builder builder) { this.id = builder.id; this.maxCouponAmount = builder.maxCouponAmount; this.codeType = builder.codeType; } @SuppressWarnings("unused") public String getId() { return id; >>>>>>> private Campaign(final Builder builder) { id = builder.id; maxCouponAmount = builder.maxCouponAmount; codeType = builder.codeType; } @SuppressWarnings("unused") public String getId() { return id; <<<<<<< private Campaign(Parcel in) { id = in.readString(); maxCouponAmount = ParcelableUtil.getBigDecimalReadByte(in); codeType = in.readString(); ======= private Campaign(Parcel in) { id = in.readString(); maxCouponAmount = ParcelableUtil.getOptionalBigDecimal(in); codeType = in.readString(); >>>>>>> private Campaign(Parcel in) { id = in.readString(); maxCouponAmount = ParcelableUtil.getOptionalBigDecimal(in); codeType = in.readString();
<<<<<<< //TODO remove try catch after session is persisted try { presenter = new CheckoutPresenter(CheckoutStateModel.fromBundle(savedInstanceState), configurationModule.getPaymentSettings(), configurationModule.getUserSelectionRepository(), session.getInitRepository(), session.getPluginRepository(), session.getPaymentRepository(), session.getPaymentRewardRepository(), session.getInternalConfiguration()); privateKey = savedInstanceState.getString(EXTRA_PRIVATE_KEY); merchantPublicKey = savedInstanceState.getString(EXTRA_PUBLIC_KEY); presenter.attachView(this); if (presenter.getState().isExpressCheckout) { presenter.initialize(); } } catch (final Exception e) { FrictionEventTracker.with(FinishCheckoutEventTracker.PATH, FrictionEventTracker.Id.SILENT, FrictionEventTracker.Style.NON_SCREEN, ErrorUtil.getStacktraceMessage(e)) .track(); exitCheckout(RESULT_CANCELED); ======= presenter = new CheckoutPresenter(CheckoutStateModel.fromBundle(savedInstanceState), configurationModule.getPaymentSettings(), configurationModule.getUserSelectionRepository(), session.getGroupsRepository(), session.getPluginRepository(), session.getPaymentRepository(), session.getCheckoutPreferenceRepository(), session.getPaymentRewardRepository(), session.getInternalConfiguration()); privateKey = savedInstanceState.getString(EXTRA_PRIVATE_KEY); merchantPublicKey = savedInstanceState.getString(EXTRA_PUBLIC_KEY); presenter.attachView(this); if (presenter.getState().isExpressCheckout) { presenter.retrievePaymentMethodSearch(); >>>>>>> presenter = new CheckoutPresenter(CheckoutStateModel.fromBundle(savedInstanceState), configurationModule.getPaymentSettings(), configurationModule.getUserSelectionRepository(), session.getInitRepository(), session.getPluginRepository(), session.getPaymentRepository(), session.getPaymentRewardRepository(), session.getInternalConfiguration()); privateKey = savedInstanceState.getString(EXTRA_PRIVATE_KEY); merchantPublicKey = savedInstanceState.getString(EXTRA_PUBLIC_KEY); presenter.attachView(this); if (presenter.getState().isExpressCheckout) { presenter.initialize();
<<<<<<< ======= >>>>>>> <<<<<<< import org.bigbluebutton.presentation.PresentationUrlDownloadService; import org.bigbluebutton.api.messaging.messages.StunTurnInfoRequested; ======= import org.bigbluebutton.presentation.PresentationUrlDownloadService; >>>>>>> import org.bigbluebutton.presentation.PresentationUrlDownloadService; import org.bigbluebutton.api.messaging.messages.StunTurnInfoRequested; <<<<<<< m.getCreateTime(), formatPrettyDate(m.getCreateTime()), m.isBreakout()); ======= m.getCreateTime(), formatPrettyDate(m.getCreateTime()), m.isBreakout()); >>>>>>> m.getCreateTime(), formatPrettyDate(m.getCreateTime()), m.isBreakout()); <<<<<<< ======= Meeting m = getMeeting(message.meetingId); if (m != null) { long now = System.currentTimeMillis(); m.setEndTime(now); Map<String, Object> logData = new HashMap<String, Object>(); logData.put("meetingId", m.getInternalId()); logData.put("externalMeetingId", m.getExternalId()); logData.put("name", m.getName()); logData.put("duration", m.getDuration()); logData.put("record", m.isRecord()); logData.put("event", "meeting_destroyed"); logData.put("description", "Meeting has been destroyed."); Gson gson = new Gson(); String logStr = gson.toJson(logData); log.info("Meeting destroyed: data={}", logStr); return; } } private void meetingEnded(MeetingEnded message) { >>>>>>> Meeting m = getMeeting(message.meetingId); if (m != null) { long now = System.currentTimeMillis(); m.setEndTime(now); Map<String, Object> logData = new HashMap<String, Object>(); logData.put("meetingId", m.getInternalId()); logData.put("externalMeetingId", m.getExternalId()); logData.put("name", m.getName()); logData.put("duration", m.getDuration()); logData.put("record", m.isRecord()); logData.put("event", "meeting_destroyed"); logData.put("description", "Meeting has been destroyed."); Gson gson = new Gson(); String logStr = gson.toJson(logData); log.info("Meeting destroyed: data={}", logStr); return; } } private void meetingEnded(MeetingEnded message) { <<<<<<< } else if (message instanceof CreateBreakoutRoom) { processCreateBreakoutRoom((CreateBreakoutRoom) message); } else if (message instanceof EndBreakoutRoom) { processEndBreakoutRoom((EndBreakoutRoom) message); } else if (message instanceof StunTurnInfoRequested) { processStunTurnInfoRequested((StunTurnInfoRequested) message); ======= } else if (message instanceof CreateBreakoutRoom) { processCreateBreakoutRoom((CreateBreakoutRoom) message); } else if (message instanceof EndBreakoutRoom) { processEndBreakoutRoom((EndBreakoutRoom) message); >>>>>>> } else if (message instanceof CreateBreakoutRoom) { processCreateBreakoutRoom((CreateBreakoutRoom) message); } else if (message instanceof EndBreakoutRoom) { processEndBreakoutRoom((EndBreakoutRoom) message); } else if (message instanceof StunTurnInfoRequested) { processStunTurnInfoRequested((StunTurnInfoRequested) message); } else if (message instanceof CreateBreakoutRoom) { processCreateBreakoutRoom((CreateBreakoutRoom) message); } else if (message instanceof EndBreakoutRoom) { processEndBreakoutRoom((EndBreakoutRoom) message); <<<<<<< public void setRegisteredUserCleanupTimerTask(RegisteredUserCleanupTimerTask c) { registeredUserCleaner = c; registeredUserCleaner.setMeetingService(this); registeredUserCleaner.start(); } public void setStunTurnService(StunTurnService s) { stunTurnService = s; } ======= public void setParamsProcessorUtil(ParamsProcessorUtil util) { this.paramsProcessorUtil = util; } public void setPresDownloadService( PresentationUrlDownloadService presDownloadService) { this.presDownloadService = presDownloadService; } >>>>>>> public void setRegisteredUserCleanupTimerTask(RegisteredUserCleanupTimerTask c) { registeredUserCleaner = c; registeredUserCleaner.setMeetingService(this); registeredUserCleaner.start(); } public void setStunTurnService(StunTurnService s) { stunTurnService = s; }
<<<<<<< import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder; import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener; import com.owncloud.android.ui.fragment.FileFragment; ======= >>>>>>> import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
<<<<<<< public static final String USER_STATUS_CHANGE_EVENT = "UserStatusChangeEvent"; public static final String SEND_POLLS_EVENT = "SendPollsEvent"; public static final String RECORD_STATUS_EVENT = "RecordStatusEvent"; ======= public static final String USER_STATUS_CHANGE_EVENT = "UserStatusChangeEvent"; public static final String GUEST_ASK_TO_ENTER_EVENT = "guestAskToEnter"; public static final String MODERATOR_RESPONSE_EVENT = "responseToGuest"; public static final String GUESTS_WAITING_EVENT = "guestsWaitingEvent"; public static final String NEW_GUEST_POLICY = "newGuestPolicy"; >>>>>>> public static final String USER_STATUS_CHANGE_EVENT = "UserStatusChangeEvent"; public static final String SEND_POLLS_EVENT = "SendPollsEvent"; public static final String RECORD_STATUS_EVENT = "RecordStatusEvent"; public static final String GUEST_ASK_TO_ENTER_EVENT = "guestAskToEnter"; public static final String MODERATOR_RESPONSE_EVENT = "responseToGuest"; public static final String GUESTS_WAITING_EVENT = "guestsWaitingEvent"; public static final String NEW_GUEST_POLICY = "newGuestPolicy";
<<<<<<< Boolean allowStartStopRecording, String moderatorPass, String viewerPass, Long createTime, String createDate, Map<String, String> metadata) { ======= Boolean allowStartStopRecording,Boolean webcamsOnlyForModerator, String moderatorPass, String viewerPass, Long createTime, String createDate) { >>>>>>> Boolean allowStartStopRecording,Boolean webcamsOnlyForModerator, String moderatorPass, String viewerPass, Long createTime, String createDate, Map<String, String> metadata) {
<<<<<<< import com.owncloud.android.MainApp; ======= import com.owncloud.android.R; >>>>>>> import com.owncloud.android.MainApp; import com.owncloud.android.R;
<<<<<<< ======= public boolean addConnection(String id, IConnection conn) { if (connections == null) { System.out.println("Connections is null!!!!"); return false; } if (id == null) { System.out.println("CONN ID IS NULL!!!"); } if (conn == null) { System.out.println("CONN IS NULL"); } return connections.putIfAbsent(id, conn) == null; } >>>>>>> public boolean addConnection(String id, IConnection conn) { if (connections == null) { System.out.println("Connections is null!!!!"); return false; } if (id == null) { System.out.println("CONN ID IS NULL!!!"); } if (conn == null) { System.out.println("CONN IS NULL"); } return connections.putIfAbsent(id, conn) == null; }
<<<<<<< public static final String STATE_PROCESSING = "processing"; public static final String STATE_PROCESSED = "processed"; public static final String STATE_PUBLISING = "publishing"; public static final String STATE_PUBLISHED = "published"; public static final String STATE_UNPUBLISING = "unpublishing"; public static final String STATE_UNPUBLISHED = "unpublished"; public static final String STATE_DELETING = "deleting"; public static final String STATE_DELETED = "deleted"; ======= private String downloadLink; private String downloadFormat; private String downloadMd5; private String downloadKey; private String downloadSize; >>>>>>> private String downloadLink; private String downloadFormat; private String downloadMd5; private String downloadKey; private String downloadSize; public static final String STATE_PROCESSING = "processing"; public static final String STATE_PROCESSED = "processed"; public static final String STATE_PUBLISING = "publishing"; public static final String STATE_PUBLISHED = "published"; public static final String STATE_UNPUBLISING = "unpublishing"; public static final String STATE_UNPUBLISHED = "unpublished"; public static final String STATE_DELETING = "deleting"; public static final String STATE_DELETED = "deleted";
<<<<<<< private List<Extension> extensions; ======= private String size; private String processingTime; private GPathResult extensions; >>>>>>> private String size; private String processingTime; private List<Extension> extensions; <<<<<<< public Playback(String format, String url, int length, List<Extension> extensions) { ======= public Playback(String format, String url, int length, String size, String processingTime, GPathResult extensions) { >>>>>>> public Playback(String format, String url, int length, String size, String processingTime, List<Extension> extensions) { <<<<<<< public List<Extension> getExtensions() { ======= public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getProcessingTime() { return processingTime; } public void setProcessingTime(String processingTime) { this.processingTime = processingTime; } public GPathResult getExtensions() { >>>>>>> public String getSize() { return size; } public void setSize(String size) { this.size = size; } public String getProcessingTime() { return processingTime; } public void setProcessingTime(String processingTime) { this.processingTime = processingTime; } public List<Extension> getExtensions() {
<<<<<<< import java.util.Map; import org.bigbluebutton.core.api.IBigBlueButtonInGW; ======= import org.red5.server.api.Red5; import java.util.ArrayList; import java.util.Map; import org.bigbluebutton.conference.ConnectionInvokerService; import org.bigbluebutton.conference.RoomsManager; import org.bigbluebutton.conference.Room; import org.bigbluebutton.conference.User; import org.bigbluebutton.conference.IRoomListener; import org.bigbluebutton.conference.service.lock.LockSettings; >>>>>>> import org.red5.server.api.Red5; import java.util.ArrayList; import java.util.Map; import org.bigbluebutton.conference.ConnectionInvokerService; import org.bigbluebutton.conference.RoomsManager; import org.bigbluebutton.conference.Room; import org.bigbluebutton.conference.User; import org.bigbluebutton.conference.IRoomListener; import org.bigbluebutton.conference.service.lock.LockSettings; <<<<<<< ======= public Map<String, User> getParticipants(String roomName) { log.debug("getParticipants - " + roomName); if (! roomsManager.hasRoom(roomName)) { log.warn("Could not find room " + roomName + ". Total rooms " + roomsManager.numberOfRooms()); return null; } return roomsManager.getParticipants(roomName); } >>>>>>> public Map<String, User> getParticipants(String roomName) { log.debug("getParticipants - " + roomName); if (! roomsManager.hasRoom(roomName)) { log.warn("Could not find room " + roomName + ". Total rooms " + roomsManager.numberOfRooms()); return null; } return roomsManager.getParticipants(roomName); } <<<<<<< bbbInGW.userJoin(roomName, userid, username, role, externUserID); ======= log.debug("participant joining room " + roomName); if (roomsManager.hasRoom(roomName)) { Room room = roomsManager.getRoom(roomName); Boolean userLocked = false; LockSettings ls = room.getLockSettings(); if(room.isLocked()) { //If room is locked and it's not a moderator, user join as locked if(!"MODERATOR".equals(role)) userLocked = true; else { //If it's a moderator, check for lockSettings if(ls.getAllowModeratorLocking()) { userLocked = true; } } } User p = new User(userid, username, role, externUserID, status, userLocked); room.addParticipant(p); log.debug("participant joined room " + roomName); >>>>>>> bbbInGW.userJoin(roomName, userid, username, role, externUserID); log.debug("participant joining room " + roomName); if (roomsManager.hasRoom(roomName)) { Room room = roomsManager.getRoom(roomName); Boolean userLocked = false; LockSettings ls = room.getLockSettings(); if(room.isLocked()) { //If room is locked and it's not a moderator, user join as locked if(!"MODERATOR".equals(role)) userLocked = true; else { //If it's a moderator, check for lockSettings if(ls.getAllowModeratorLocking()) { userLocked = true; } } } User p = new User(userid, username, role, externUserID, status, userLocked); room.addParticipant(p); log.debug("participant joined room " + roomName);
<<<<<<< public static final String START_INDEX = "start_index"; public static final String END_INDEX = "end_index"; public static final String LOCALE = "locale"; public static final String TEXT = "text"; public static final String OWNER_ID = "owner_id"; public static final String CAPTION_HISTORY = "caption_history"; ======= public static final String AVATAR_URL = "avatarURL"; public static final String STUNS = "stuns"; public static final String TURNS = "turns"; public static final String USERNAME = "username"; public static final String URL = "url"; public static final String TTL = "ttl"; public static final String PASSWORD = "password"; >>>>>>> public static final String START_INDEX = "start_index"; public static final String END_INDEX = "end_index"; public static final String LOCALE = "locale"; public static final String TEXT = "text"; public static final String OWNER_ID = "owner_id"; public static final String CAPTION_HISTORY = "caption_history"; public static final String AVATAR_URL = "avatarURL"; public static final String STUNS = "stuns"; public static final String TURNS = "turns"; public static final String USERNAME = "username"; public static final String URL = "url"; public static final String TTL = "ttl"; public static final String PASSWORD = "password";
<<<<<<< private BigBlueButtonSession getBbbSession() { return (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION); } ======= public void setRecordingStatus(String userid, Boolean recording) { String roomName = Red5.getConnectionLocal().getScope().getName(); log.debug("Setting recording status " + roomName + " " + userid + " " + recording); application.setRecordingStatus(roomName, userid, recording); } public Boolean getRecordingStatus() { String roomName = Red5.getConnectionLocal().getScope().getName(); log.info("Client is requesting the recording status in [" + roomName + "]."); return application.getRecordingStatus(roomName); } >>>>>>> private BigBlueButtonSession getBbbSession() { return (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION); } public void setRecordingStatus(String userid, Boolean recording) { String roomName = Red5.getConnectionLocal().getScope().getName(); log.debug("Setting recording status " + roomName + " " + userid + " " + recording); application.setRecordingStatus(roomName, userid, recording); } public Boolean getRecordingStatus() { String roomName = Red5.getConnectionLocal().getScope().getName(); log.info("Client is requesting the recording status in [" + roomName + "]."); return application.getRecordingStatus(roomName); }
<<<<<<< private final MessagingService messagingService; public OfficeToPdfConversionSuccessFilter(MessagingService m) { messagingService = m; } ======= private MessagingService messagingService; >>>>>>> private final MessagingService messagingService; public OfficeToPdfConversionSuccessFilter(MessagingService m) { messagingService = m; } <<<<<<< messagingService.send("foo", updateMsg); ======= messagingService.send(MessagingConstants.PRESENTATION_CHANNEL, updateMsg); >>>>>>> messagingService.send(MessagingConstants.PRESENTATION_CHANNEL, updateMsg); <<<<<<< ======= public void setMessagingService(MessagingService messagingService){ this.messagingService = messagingService; } >>>>>>>
<<<<<<< import org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask; ======= import org.bigbluebutton.web.services.turn.StunServer; import org.bigbluebutton.web.services.turn.StunTurnService; import org.bigbluebutton.web.services.turn.TurnEntry; >>>>>>> import org.bigbluebutton.web.services.RegisteredUserCleanupTimerTask; import org.bigbluebutton.web.services.turn.StunServer; import org.bigbluebutton.web.services.turn.StunTurnService; import org.bigbluebutton.web.services.turn.TurnEntry; <<<<<<< private RegisteredUserCleanupTimerTask registeredUserCleaner; ======= private StunTurnService stunTurnService; >>>>>>> private RegisteredUserCleanupTimerTask registeredUserCleaner; private StunTurnService stunTurnService; <<<<<<< public void setRegisteredUserCleanupTimerTask(RegisteredUserCleanupTimerTask c) { registeredUserCleaner = c; registeredUserCleaner.setMeetingService(this); registeredUserCleaner.start(); } ======= public void setStunTurnService(StunTurnService s) { stunTurnService = s; } >>>>>>> public void setRegisteredUserCleanupTimerTask(RegisteredUserCleanupTimerTask c) { registeredUserCleaner = c; registeredUserCleaner.setMeetingService(this); registeredUserCleaner.start(); } public void setStunTurnService(StunTurnService s) { stunTurnService = s; }
<<<<<<< public void setMessagingService(MessagingService messagingService) { this.messagingService = messagingService; this.messagingService.start(); } public void createRoom(String name,boolean record, String meetingid) { ======= public int getVoiceUserIDFromRoom(String room, String userID) { RoomImp rm = rooms.get(room); if (rm != null) { return rm.getUserWithID(userID); } return -1; } public void createRoom(String name, boolean record, String meetingid) { >>>>>>> public void setMessagingService(MessagingService messagingService) { this.messagingService = messagingService; this.messagingService.start(); } public int getVoiceUserIDFromRoom(String room, String userID) { RoomImp rm = rooms.get(room); if (rm != null) { return rm.getUserWithID(userID); } return -1; } public void createRoom(String name, boolean record, String meetingid) { <<<<<<< RoomImp r = new RoomImp(name,record,meetingid); r.addRoomListener(new ParticipantUpdatingRoomListener(r, messagingService)); ======= RoomImp r = new RoomImp(name, record, meetingid); >>>>>>> RoomImp r = new RoomImp(name, record, meetingid); r.addRoomListener(new ParticipantUpdatingRoomListener(r, messagingService)); <<<<<<< if ((rm.numParticipants() == 1) && rm.record() && !rm.isRecording()) { /** * Start recording when the first user joins the voice conference. * WARNING: Works only with FreeSWITCH for now. We need to come up with a generic way to * trigger recording for both Asterisk and FreeSWITCH. */ rm.recording(true); log.debug("Starting recording of voice conference"); log.warn(" ** WARNING: Prototyping only. Works only with FreeSWITCH for now. We need to come up with a generic way to trigger recording for both Asterisk and FreeSWITCH."); confService.recordSession(event.getRoom(), rm.getMeetingId()); ======= if (rm.numParticipants() == 1) { if (rm.record() && !rm.isRecording()) { /** * Start recording when the first user joins the voice conference. * WARNING: Works only with FreeSWITCH for now. We need to come up with a generic way to * trigger recording for both Asterisk and FreeSWITCH. */ rm.recording(true); log.debug("Starting recording of voice conference"); log.warn(" ** WARNING: Prototyping only. Works only with FreeSWITCH for now. We need to come up with a generic way to trigger recording for both Asterisk and FreeSWITCH."); confService.recordSession(event.getRoom(), rm.getMeeting()); } // Broadcast the audio confService.broadcastSession(event.getRoom(), rm.getMeeting()); >>>>>>> if (rm.numParticipants() == 1) { if (rm.record() && !rm.isRecording()) { /** * Start recording when the first user joins the voice conference. * WARNING: Works only with FreeSWITCH for now. We need to come up with a generic way to * trigger recording for both Asterisk and FreeSWITCH. */ rm.recording(true); log.debug("Starting recording of voice conference"); log.warn(" ** WARNING: Prototyping only. Works only with FreeSWITCH for now. We need to come up with a generic way to trigger recording for both Asterisk and FreeSWITCH."); confService.recordSession(event.getRoom(), rm.getMeetingId()); } // Broadcast the audio confService.broadcastSession(event.getRoom(), rm.getMeetingId());
<<<<<<< String storeSubscription(String meetingId, String externalMeetingID, String callbackURL); boolean removeSubscription(String meetingId, String subscriptionId); List<Map<String,String>> listSubscriptions(String meetingId); void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken); void sendKeepAlive(String system, Long timestamp); ======= void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken, String guest); void sendKeepAlive(String keepAliveId); >>>>>>> String storeSubscription(String meetingId, String externalMeetingID, String callbackURL); boolean removeSubscription(String meetingId, String subscriptionId); List<Map<String,String>> listSubscriptions(String meetingId); void registerUser(String meetingID, String internalUserId, String fullname, String role, String externUserID, String authToken, String guest); void sendKeepAlive(String system, Long timestamp);
<<<<<<< this.avatarURL = avatarURL; ======= this.guest = guest; >>>>>>> this.avatarURL = avatarURL; this.guest = guest;
<<<<<<< public void addAnnotation(Map<String, Object> annotation, Presentation presentation); public void undoShape(Presentation presentation); ======= public void addShape(ShapeGraphic shape, Presentation presentation); public void addText(TextGraphic shape, Presentation presentation); public void modifyText(TextGraphic shape, Presentation presentation); public void undoWBGraphic(Presentation presentation); public void toggleGrid(boolean value, Presentation presentation); >>>>>>> public void addAnnotation(Map<String, Object> annotation, Presentation presentation); public void undoShape(Presentation presentation); public void addShape(ShapeGraphic shape, Presentation presentation); public void addText(TextGraphic shape, Presentation presentation); public void modifyText(TextGraphic shape, Presentation presentation); public void undoWBGraphic(Presentation presentation); public void toggleGrid(boolean value, Presentation presentation);
<<<<<<< import java.util.Map; ======= >>>>>>> import java.util.Map; <<<<<<< String moderatorPass, String viewerPass, Long createTime, String createDate, Map<String, String> metadata) { ======= Boolean webcamsOnlyForModerator, String moderatorPass, String viewerPass, Long createTime, String createDate) { >>>>>>> Boolean webcamsOnlyForModerator, String moderatorPass, String viewerPass, Long createTime, String createDate, Map<String, String> metadata) {
<<<<<<< @Test public void testCreateMeetingRequest() { String meetingId = "abc123"; String externalId = "extabc123"; String parentId = ""; Boolean record = false; Integer durationInMinutes = 20; String name = "Breakout room 1"; String voiceConfId = "851153"; Boolean autoStartRecording = false; Boolean allowStartStopRecording = false; Boolean isBreakout = true; Integer sequence = 4; String viewerPassword = "vp"; String moderatorPassword = "mp"; long createTime = System.currentTimeMillis(); String createDate = new Date(createTime).toString(); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("meta_test", "test"); ======= @Test public void testCreateMeetingRequest() { String meetingId = "abc123"; String externalId = "extabc123"; String parentId = ""; Boolean record = false; Integer durationInMinutes = 20; String name = "Breakout room 1"; String voiceConfId = "851153"; Boolean autoStartRecording = false; Boolean allowStartStopRecording = false; Boolean webcamsOnlyForModerator = false; Boolean isBreakout = true; Integer sequence = 4; String viewerPassword = "vp"; String moderatorPassword = "mp"; long createTime = System.currentTimeMillis(); String createDate = new Date(createTime).toString(); >>>>>>> @Test public void testCreateMeetingRequest() { String meetingId = "abc123"; String externalId = "extabc123"; String parentId = ""; Boolean record = false; Integer durationInMinutes = 20; String name = "Breakout room 1"; String voiceConfId = "851153"; Boolean autoStartRecording = false; Boolean allowStartStopRecording = false; Boolean webcamsOnlyForModerator = false; Boolean isBreakout = true; Integer sequence = 4; String viewerPassword = "vp"; String moderatorPassword = "mp"; long createTime = System.currentTimeMillis(); String createDate = new Date(createTime).toString(); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("meta_test", "test"); <<<<<<< moderatorPassword, viewerPassword, createTime, createDate, isBreakout, sequence, metadata); CreateMeetingRequest msg = new CreateMeetingRequest(payload); Gson gson = new Gson(); String json = gson.toJson(msg); System.out.println(json); CreateMeetingRequest rxMsg = gson.fromJson(json, CreateMeetingRequest.class); Assert.assertEquals(rxMsg.header.name, CreateMeetingRequest.NAME); Assert.assertEquals(rxMsg.payload.id, meetingId); Assert.assertEquals(rxMsg.payload.externalId, externalId); Assert.assertEquals(rxMsg.payload.parentId, parentId); Assert.assertEquals(rxMsg.payload.name, name); Assert.assertEquals(rxMsg.payload.voiceConfId, voiceConfId); Assert.assertEquals(rxMsg.payload.viewerPassword, viewerPassword); Assert.assertEquals(rxMsg.payload.moderatorPassword, moderatorPassword); Assert.assertEquals(rxMsg.payload.durationInMinutes, durationInMinutes); Assert.assertEquals(rxMsg.payload.isBreakout, isBreakout); Assert.assertEquals(rxMsg.payload.sequence, sequence); } ======= webcamsOnlyForModerator, moderatorPassword, viewerPassword, createTime, createDate, isBreakout, sequence); CreateMeetingRequest msg = new CreateMeetingRequest(payload); Gson gson = new Gson(); String json = gson.toJson(msg); System.out.println(json); CreateMeetingRequest rxMsg = gson.fromJson(json, CreateMeetingRequest.class); Assert.assertEquals(rxMsg.header.name, CreateMeetingRequest.NAME); Assert.assertEquals(rxMsg.payload.id, meetingId); Assert.assertEquals(rxMsg.payload.externalId, externalId); Assert.assertEquals(rxMsg.payload.parentId, parentId); Assert.assertEquals(rxMsg.payload.name, name); Assert.assertEquals(rxMsg.payload.voiceConfId, voiceConfId); Assert.assertEquals(rxMsg.payload.viewerPassword, viewerPassword); Assert.assertEquals(rxMsg.payload.moderatorPassword, moderatorPassword); Assert.assertEquals(rxMsg.payload.durationInMinutes, durationInMinutes); Assert.assertEquals(rxMsg.payload.isBreakout, isBreakout); Assert.assertEquals(rxMsg.payload.sequence, sequence); } >>>>>>> webcamsOnlyForModerator, moderatorPassword, viewerPassword, createTime, createDate, isBreakout, sequence, metadata); CreateMeetingRequest msg = new CreateMeetingRequest(payload); Gson gson = new Gson(); String json = gson.toJson(msg); System.out.println(json); CreateMeetingRequest rxMsg = gson.fromJson(json, CreateMeetingRequest.class); Assert.assertEquals(rxMsg.header.name, CreateMeetingRequest.NAME); Assert.assertEquals(rxMsg.payload.id, meetingId); Assert.assertEquals(rxMsg.payload.externalId, externalId); Assert.assertEquals(rxMsg.payload.parentId, parentId); Assert.assertEquals(rxMsg.payload.name, name); Assert.assertEquals(rxMsg.payload.voiceConfId, voiceConfId); Assert.assertEquals(rxMsg.payload.viewerPassword, viewerPassword); Assert.assertEquals(rxMsg.payload.moderatorPassword, moderatorPassword); Assert.assertEquals(rxMsg.payload.durationInMinutes, durationInMinutes); Assert.assertEquals(rxMsg.payload.isBreakout, isBreakout); Assert.assertEquals(rxMsg.payload.sequence, sequence); }
<<<<<<< private Boolean recording = false; ======= private Boolean locked; private LockSettings lockSettings = null; >>>>>>> private Boolean locked; private LockSettings lockSettings = null; private Boolean recording = false; <<<<<<< public void changeRecordingStatus(String userid, Boolean recording) { boolean present = false; User p = null; synchronized (this) { present = participants.containsKey(userid); if (present) { p = participants.get(userid); } } if (present && recording != this.recording) { changeRecordingStatus(p, recording); } } private void changeRecordingStatus(User p, Boolean recording) { log.debug("Changed recording status to " + recording); this.recording = recording; for (Iterator it = listeners.values().iterator(); it.hasNext();) { IRoomListener listener = (IRoomListener) it.next(); log.debug("calling recordingStatusChange on listener " + listener.getName()); listener.recordingStatusChange(p, recording); } } public Boolean getRecordingStatus() { return recording; } ======= public void setLocked(Boolean locked) { this.locked = locked; } public boolean isLocked() { return locked; } public LockSettings getLockSettings() { return lockSettings; } public void setLockSettings(LockSettings lockSettings) { this.lockSettings = lockSettings; for (Iterator it = listeners.values().iterator(); it.hasNext();) { IRoomListener listener = (IRoomListener) it.next(); log.debug("calling setLockSettings on listener " + listener.getName()); listener.lockSettingsChange(lockSettings.toMap()); } } >>>>>>> public void setLocked(Boolean locked) { this.locked = locked; } public boolean isLocked() { return locked; } public LockSettings getLockSettings() { return lockSettings; } public void setLockSettings(LockSettings lockSettings) { this.lockSettings = lockSettings; for (Iterator it = listeners.values().iterator(); it.hasNext();) { IRoomListener listener = (IRoomListener) it.next(); log.debug("calling setLockSettings on listener " + listener.getName()); listener.lockSettingsChange(lockSettings.toMap()); } } public void changeRecordingStatus(String userid, Boolean recording) { boolean present = false; User p = null; synchronized (this) { present = participants.containsKey(userid); if (present) { p = participants.get(userid); } } if (present && recording != this.recording) { changeRecordingStatus(p, recording); } } private void changeRecordingStatus(User p, Boolean recording) { log.debug("Changed recording status to " + recording); this.recording = recording; for (Iterator it = listeners.values().iterator(); it.hasNext();) { IRoomListener listener = (IRoomListener) it.next(); log.debug("calling recordingStatusChange on listener " + listener.getName()); listener.recordingStatusChange(p, recording); } } public Boolean getRecordingStatus() { return recording; }
<<<<<<< import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; ======= import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; >>>>>>> import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; <<<<<<< ======= import java.util.*; import org.bigbluebutton.api.domain.Download; >>>>>>> <<<<<<< import org.bigbluebutton.api.messaging.messages.UserLeftVoice; import org.bigbluebutton.api.messaging.messages.UserListeningOnly; import org.bigbluebutton.api.messaging.messages.UserSharedWebcam; ======= import org.bigbluebutton.api.messaging.messages.UserLeftVoice; import org.bigbluebutton.api.messaging.messages.UserListeningOnly; import org.bigbluebutton.api.messaging.messages.UserRoleChanged; import org.bigbluebutton.api.messaging.messages.UserSharedWebcam; >>>>>>> import org.bigbluebutton.api.messaging.messages.UserLeftVoice; import org.bigbluebutton.api.messaging.messages.UserListeningOnly; import org.bigbluebutton.api.messaging.messages.UserSharedWebcam; <<<<<<< messagingService.registerUser(message.meetingID, message.internalUserId, message.fullname, message.role, message.externUserID, message.authToken); } public String addSubscription(String meetingId, String event, String callbackURL){ String sid = messagingService.storeSubscription(meetingId, event, callbackURL); return sid; } public boolean removeSubscription(String meetingId, String subscriptionId){ return messagingService.removeSubscription(meetingId, subscriptionId); } public List<Map<String,String>> listSubscriptions(String meetingId){ return messagingService.listSubscriptions(meetingId); ======= messagingService.registerUser(message.meetingID, message.internalUserId, message.fullname, message.role, message.externUserID, message.authToken, message.guest); >>>>>>> messagingService.registerUser(message.meetingID, message.internalUserId, message.fullname, message.role, message.externUserID, message.authToken, message.guest); } public String addSubscription(String meetingId, String event, String callbackURL){ String sid = messagingService.storeSubscription(meetingId, event, callbackURL); return sid; } public boolean removeSubscription(String meetingId, String subscriptionId){ return messagingService.removeSubscription(meetingId, subscriptionId); } public List<Map<String,String>> listSubscriptions(String meetingId){ return messagingService.listSubscriptions(meetingId); <<<<<<< handle(new EndMeeting(meetingId)); ======= log.info("Received request to end meeting=[{}]", meetingId); handle(new EndMeeting(meetingId)); >>>>>>> handle(new EndMeeting(meetingId)); <<<<<<< } else if (message instanceof UserJoinedVoice) { userJoinedVoice((UserJoinedVoice)message); } else if (message instanceof UserLeftVoice) { userLeftVoice((UserLeftVoice)message); } else if (message instanceof UserListeningOnly) { userListeningOnly((UserListeningOnly)message); } else if (message instanceof UserSharedWebcam) { userSharedWebcam((UserSharedWebcam)message); } else if (message instanceof UserUnsharedWebcam) { userUnsharedWebcam((UserUnsharedWebcam)message); ======= } else if (message instanceof UserRoleChanged) { userRoleChanged((UserRoleChanged)message); } else if (message instanceof UserJoinedVoice) { log.info("Processing voice user joined message."); userJoinedVoice((UserJoinedVoice)message); } else if (message instanceof UserLeftVoice) { log.info("Processing voice user left message."); userLeftVoice((UserLeftVoice)message); } else if (message instanceof UserListeningOnly) { log.info("Processing user listening only message."); userListeningOnly((UserListeningOnly)message); } else if (message instanceof UserSharedWebcam) { log.info("Processing user shared webcam message."); userSharedWebcam((UserSharedWebcam)message); } else if (message instanceof UserUnsharedWebcam) { log.info("Processing user unshared webcam message."); userUnsharedWebcam((UserUnsharedWebcam)message); >>>>>>> } else if (message instanceof UserRoleChanged) { userRoleChanged((UserRoleChanged)message); } else if (message instanceof UserJoinedVoice) { userJoinedVoice((UserJoinedVoice)message); } else if (message instanceof UserLeftVoice) { userLeftVoice((UserLeftVoice)message); } else if (message instanceof UserListeningOnly) { userListeningOnly((UserListeningOnly)message); } else if (message instanceof UserSharedWebcam) { userSharedWebcam((UserSharedWebcam)message); } else if (message instanceof UserUnsharedWebcam) { userUnsharedWebcam((UserUnsharedWebcam)message);
<<<<<<< ======= import org.bigbluebutton.conference.service.whiteboard.ShapeGraphic; import org.bigbluebutton.conference.service.whiteboard.TextGraphic; >>>>>>> import org.bigbluebutton.conference.service.whiteboard.ShapeGraphic; import org.bigbluebutton.conference.service.whiteboard.TextGraphic; <<<<<<< public void addAnnotation(Map<String, Object> annotation, Presentation presentation) { ======= public void addShape(ShapeGraphic shape, Presentation presentation) { >>>>>>> public void addAnnotation(Map<String, Object> annotation, Presentation presentation) { <<<<<<< event.addAnnotation(annotation); ======= event.setDataPoints(shape.getShape()); event.setType(shape.getType()); event.setColor(shape.getColor()); event.setThickness(shape.getThickness()); event.setFill(shape.isFill()); event.setTransparent(shape.isTransparent()); recorder.record(session, event); } @Override public void addText(TextGraphic text, Presentation presentation) { AddTextWhiteboardRecordEvent event = new AddTextWhiteboardRecordEvent(); event.setMeetingId(session); event.setTimestamp(System.currentTimeMillis()); event.setPresentation(presentation.getName()); event.setPageNumber(presentation.getActivePage().getPageIndex()); event.setText(text.getText()); event.setTextColor(text.getTextColor()); event.setBGColor(text.getBgColor()); event.setBGColorVisible(text.getBgColorVisible()); event.setDataPoints(text.getLocation()); >>>>>>> event.addAnnotation(annotation); // event.setDataPoints(shape.getShape()); // event.setType(shape.getType()); // event.setColor(shape.getColor()); // event.setThickness(shape.getThickness()); // event.setFill(shape.isFill()); // event.setTransparent(shape.isTransparent()); recorder.record(session, event); } @Override public void addText(TextGraphic text, Presentation presentation) { AddTextWhiteboardRecordEvent event = new AddTextWhiteboardRecordEvent(); event.setMeetingId(session); event.setTimestamp(System.currentTimeMillis()); event.setPresentation(presentation.getName()); event.setPageNumber(presentation.getActivePage().getPageIndex()); event.setText(text.getText()); event.setTextColor(text.getTextColor()); event.setBGColor(text.getBgColor()); event.setBGColorVisible(text.getBgColorVisible()); event.setDataPoints(text.getLocation());
<<<<<<< import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsherlock.app.SherlockDialogFragment; ======= >>>>>>> import com.actionbarsherlock.app.SherlockActivity; <<<<<<< ======= >>>>>>>
<<<<<<< private String presentationBaseDir; private void copyPresentationFile(File presFile, File dlownloadableFile) { try { FileUtils.copyFile(presFile, dlownloadableFile); } catch (IOException ex) { log.error("Failed to copy file: " + ex); } } public void processMakePresentationDownloadableMsg(MakePresentationDownloadableMsg msg) { File presDir = Util.getPresentationDir(presentationBaseDir, msg.meetingId, msg.presId); File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presFilename); if (presDir != null) { if (msg.downloadable) { File presFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presId + ".pdf"); copyPresentationFile(presFile, downloadableFile); } else { if (downloadableFile.exists()) { if(downloadableFile.delete()) { log.info("File deleted. {}", downloadableFile.getAbsolutePath()); } else { log.warn("Failed to delete. {}", downloadableFile.getAbsolutePath()); } } } } } public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) { File presDir = Util.getPresentationDir(presentationBaseDir, meetingId, presId); File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + presFilename); return downloadableFile; } public void kickOffRecordingChapterBreak(String meetingId, Long timestamp) { String done = recordStatusDir + "/" + meetingId + "-" + timestamp + ".done"; File doneFile = new File(done); if (!doneFile.exists()) { try { doneFile.createNewFile(); if (!doneFile.exists()) log.error("Failed to create " + done + " file."); } catch (IOException e) { log.error("Failed to create " + done + " file."); } } else { log.error(done + " file already exists."); } } ======= private String captionsDir; >>>>>>> private String captionsDir; private String presentationBaseDir; private void copyPresentationFile(File presFile, File dlownloadableFile) { try { FileUtils.copyFile(presFile, dlownloadableFile); } catch (IOException ex) { log.error("Failed to copy file: " + ex); } } public void processMakePresentationDownloadableMsg(MakePresentationDownloadableMsg msg) { File presDir = Util.getPresentationDir(presentationBaseDir, msg.meetingId, msg.presId); File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presFilename); if (presDir != null) { if (msg.downloadable) { File presFile = new File(presDir.getAbsolutePath() + File.separatorChar + msg.presId + ".pdf"); copyPresentationFile(presFile, downloadableFile); } else { if (downloadableFile.exists()) { if(downloadableFile.delete()) { log.info("File deleted. {}", downloadableFile.getAbsolutePath()); } else { log.warn("Failed to delete. {}", downloadableFile.getAbsolutePath()); } } } } } public File getDownloadablePresentationFile(String meetingId, String presId, String presFilename) { File presDir = Util.getPresentationDir(presentationBaseDir, meetingId, presId); File downloadableFile = new File(presDir.getAbsolutePath() + File.separatorChar + presFilename); return downloadableFile; } public void kickOffRecordingChapterBreak(String meetingId, Long timestamp) { String done = recordStatusDir + "/" + meetingId + "-" + timestamp + ".done"; File doneFile = new File(done); if (!doneFile.exists()) { try { doneFile.createNewFile(); if (!doneFile.exists()) log.error("Failed to create " + done + " file."); } catch (IOException e) { log.error("Failed to create " + done + " file."); } } else { log.error(done + " file already exists."); } }
<<<<<<< public static final String USER_ROLE_CHANGE_EVENT = "user_role_changed_message"; ======= public static final String USER_JOINED_VOICE_EVENT = "user_joined_voice_message"; public static final String USER_LEFT_VOICE_EVENT = "user_left_voice_message"; public static final String USER_LISTEN_ONLY_EVENT = "user_listening_only"; public static final String USER_SHARE_WEBCAM_EVENT = "user_shared_webcam_message"; public static final String USER_UNSHARE_WEBCAM_EVENT = "user_unshared_webcam_message"; >>>>>>> public static final String USER_JOINED_VOICE_EVENT = "user_joined_voice_message"; public static final String USER_LEFT_VOICE_EVENT = "user_left_voice_message"; public static final String USER_LISTEN_ONLY_EVENT = "user_listening_only"; public static final String USER_SHARE_WEBCAM_EVENT = "user_shared_webcam_message"; public static final String USER_UNSHARE_WEBCAM_EVENT = "user_unshared_webcam_message"; public static final String USER_ROLE_CHANGE_EVENT = "user_role_changed_message";
<<<<<<< ======= import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; >>>>>>> import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; <<<<<<< import com.google.gson.Gson; public class SvgImageCreatorImp implements SvgImageCreator { private static Logger log = LoggerFactory.getLogger(SvgImageCreatorImp.class); ======= import com.google.gson.Gson; import com.zaxxer.nuprocess.NuProcess; import com.zaxxer.nuprocess.NuProcessBuilder; >>>>>>> import com.google.gson.Gson; import com.zaxxer.nuprocess.NuProcess; import com.zaxxer.nuprocess.NuProcessBuilder; <<<<<<< return success; } private boolean generateSvgImages(File imagePresentationDir, UploadedPresentation pres) throws InterruptedException { String source = pres.getUploadedFile().getAbsolutePath(); String dest; String COMMAND = ""; boolean done = true; if (SupportedFileTypes.isImageFile(pres.getFileType())) { dest = imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide1.pdf"; COMMAND = IMAGEMAGICK_DIR + File.separatorChar + "convert " + source + " " + dest; done = new ExternalProcessExecutor().exec(COMMAND, 60000); source = imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide1.pdf"; dest = imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide1.svg"; COMMAND = "pdftocairo -rx 300 -ry 300 -svg -q -f 1 -l 1 " + source + " " + dest; done = new ExternalProcessExecutor().exec(COMMAND, 60000); } else { for (int i = 1; i <= pres.getNumberOfPages(); i++) { File destsvg = new File(imagePresentationDir.getAbsolutePath() + File.separatorChar + "slide" + i + ".svg"); COMMAND = "pdftocairo -rx 300 -ry 300 -svg -q -f " + i + " -l " + i + " " + File.separatorChar + source + " " + destsvg.getAbsolutePath(); done = new ExternalProcessExecutor().exec(COMMAND, 60000); if (!done) { break; ======= >>>>>>> <<<<<<< private void cleanDirectory(File directory) { File[] files = directory.listFiles(); for (File file : files) { file.delete(); ======= private File determineSvgImagesDirectory(File presentationFile) { return new File(presentationFile.getParent() + File.separatorChar + "svgs"); >>>>>>> private File determineSvgImagesDirectory(File presentationFile) { return new File(presentationFile.getParent() + File.separatorChar + "svgs");
<<<<<<< private String defaultGuestWaitURL; ======= private String html5ClientUrl; private Boolean moderatorsJoinViaHTML5Client; private Boolean attendeesJoinViaHTML5Client; >>>>>>> private String defaultGuestWaitURL; private String html5ClientUrl; private Boolean moderatorsJoinViaHTML5Client; private Boolean attendeesJoinViaHTML5Client; <<<<<<< public String getDefaultGuestWaitURL() { return defaultGuestWaitURL; //return defaultServerUrl + "/guestWait"; } ======= public String getHTML5ClientUrl() { return html5ClientUrl; } public Boolean getAttendeesJoinViaHTML5Client() { return attendeesJoinViaHTML5Client; } public Boolean getModeratorsJoinViaHTML5Client() { return moderatorsJoinViaHTML5Client; } >>>>>>> public String getDefaultGuestWaitURL() { return defaultGuestWaitURL; } public String getHTML5ClientUrl() { return html5ClientUrl; } public Boolean getAttendeesJoinViaHTML5Client() { return attendeesJoinViaHTML5Client; } public Boolean getModeratorsJoinViaHTML5Client() { return moderatorsJoinViaHTML5Client; } <<<<<<< public void setDefaultGuestWaitURL(String url) { this.defaultGuestWaitURL = url; } ======= public void setHtml5ClientUrl(String html5ClientUrl) { this.html5ClientUrl = html5ClientUrl; } public void setModeratorsJoinViaHTML5Client(Boolean moderatorsJoinViaHTML5Client) { this.moderatorsJoinViaHTML5Client = moderatorsJoinViaHTML5Client; } public void setAttendeesJoinViaHTML5Client(Boolean attendeesJoinViaHTML5Client) { this.attendeesJoinViaHTML5Client = attendeesJoinViaHTML5Client; } >>>>>>> public void setDefaultGuestWaitURL(String url) { this.defaultGuestWaitURL = url; } public void setHtml5ClientUrl(String html5ClientUrl) { this.html5ClientUrl = html5ClientUrl; } public void setModeratorsJoinViaHTML5Client(Boolean moderatorsJoinViaHTML5Client) { this.moderatorsJoinViaHTML5Client = moderatorsJoinViaHTML5Client; } public void setAttendeesJoinViaHTML5Client(Boolean attendeesJoinViaHTML5Client) { this.attendeesJoinViaHTML5Client = attendeesJoinViaHTML5Client; }
<<<<<<< ======= void createMeeting2(String meetingID, String externalMeetingID, String meetingName, boolean recorded, String voiceBridge, long duration, boolean autoStartRecording, boolean allowStartStopRecording, String moderatorPass, String viewerPass, long createTime, String createDate, Map<String, String> metadata); >>>>>>> <<<<<<< ======= void activityResponse(String meetingID); >>>>>>> void activityResponse(String meetingID); <<<<<<< void registerUser(String roomName, String userid, String username, String role, String externUserID, String authToken, String avatarURL); ======= void registerUser(String roomName, String userid, String username, String role, String externUserID, String authToken, Boolean guest); >>>>>>> void registerUser(String roomName, String userid, String username, String role, String externUserID, String authToken, String avatarURL, Boolean guest); <<<<<<< ======= void getGuestPolicy(String meetingID, String userID); void setGuestPolicy(String meetingID, String guestPolicy, String setBy); void responseToGuest(String meetingID, String userID, Boolean response, String requesterID); void logoutEndMeeting(String meetingID, String userID); >>>>>>> void getGuestPolicy(String meetingID, String userID); void setGuestPolicy(String meetingID, String guestPolicy, String setBy); void responseToGuest(String meetingID, String userID, Boolean response, String requesterID); void logoutEndMeeting(String meetingID, String userID); <<<<<<< String code, String presId, int numPages, String presName, String presBaseUrl); ======= String code, String presId, int numPages, String presName, String presBaseUrl, boolean downloadable); >>>>>>> String code, String presId, int numPages, String presName, String presBaseUrl, boolean downloadable); <<<<<<< // Caption void sendCaptionHistory(String meetingID, String requesterID); void updateCaptionOwner(String meetingID, String locale, String localeCode, String ownerID); void editCaptionHistory(String meetingID, String userID, Integer startIndex, Integer endIndex, String locale, String localeCode, String text); // DeskShare void deskShareStarted(String confId, String callerId, String callerIdName); void deskShareStopped(String conferenceName, String callerId, String callerIdName); void deskShareRTMPBroadcastStarted(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); void deskShareRTMPBroadcastStopped(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); void deskShareGetInfoRequest(String meetingId, String requesterId, String replyTo); ======= // Shared notes void patchDocument(String meetingID, String requesterID, String noteID, String patch, String operation); void getCurrentDocument(String meetingID, String requesterID); void createAdditionalNotes(String meetingID, String requesterID, String noteName); void destroyAdditionalNotes(String meetingID, String requesterID, String noteID); void requestAdditionalNotesSet(String meetingID, String requesterID, int additionalNotesSetSize); void sharedNotesSyncNoteRequest(String meetingID, String requesterID, String noteID); >>>>>>> // Caption void sendCaptionHistory(String meetingID, String requesterID); void updateCaptionOwner(String meetingID, String locale, String localeCode, String ownerID); void editCaptionHistory(String meetingID, String userID, Integer startIndex, Integer endIndex, String locale, String localeCode, String text); // DeskShare void deskShareStarted(String confId, String callerId, String callerIdName); void deskShareStopped(String conferenceName, String callerId, String callerIdName); void deskShareRTMPBroadcastStarted(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); void deskShareRTMPBroadcastStopped(String conferenceName, String streamname, int videoWidth, int videoHeight, String timestamp); void deskShareGetInfoRequest(String meetingId, String requesterId, String replyTo); // Shared notes void patchDocument(String meetingID, String requesterID, String noteID, String patch, String operation); void getCurrentDocument(String meetingID, String requesterID); void createAdditionalNotes(String meetingID, String requesterID, String noteName); void destroyAdditionalNotes(String meetingID, String requesterID, String noteID); void requestAdditionalNotesSet(String meetingID, String requesterID, int additionalNotesSetSize); void sharedNotesSyncNoteRequest(String meetingID, String requesterID, String noteID);
<<<<<<< int logoutTimer = processLogoutTimer(params.get("logoutTimer")); // Banner parameters String bannerText = params.get("bannerText"); String bannerColor = params.get("bannerColor"); ======= int logoutTimer = processMeetingDuration(params.get("logoutTimer")); // Hardcode to zero as we don't use this feature in 2.0.x (ralam dec 18, 2017) logoutTimer = 0; >>>>>>> int logoutTimer = processLogoutTimer(params.get("logoutTimer")); // Banner parameters String bannerText = params.get("bannerText"); String bannerColor = params.get("bannerColor"); <<<<<<< public void setMaxPresentationFileUpload(Long maxFileSize) { maxPresentationFileUpload = maxFileSize; } public Long getMaxPresentationFileUpload() { return maxPresentationFileUpload; } ======= public void setMuteOnStart(Boolean mute) { defaultMuteOnStart = mute; } public Boolean getMuteOnStart() { return defaultMuteOnStart; } >>>>>>> public void setMaxPresentationFileUpload(Long maxFileSize) { maxPresentationFileUpload = maxFileSize; } public Long getMaxPresentationFileUpload() { return maxPresentationFileUpload; } public void setMuteOnStart(Boolean mute) { defaultMuteOnStart = mute; } public Boolean getMuteOnStart() { return defaultMuteOnStart; }
<<<<<<< private final Boolean startAsMuted; ======= private final Boolean guest; >>>>>>> private final Boolean startAsMuted; private final Boolean guest; <<<<<<< String externalUserID, Boolean startAsMuted){ ======= String externalUserID, Boolean guest){ >>>>>>> String externalUserID, Boolean startAsMuted, Boolean guest){ <<<<<<< this.startAsMuted = startAsMuted; ======= this.guest = guest; >>>>>>> this.startAsMuted = startAsMuted; this.guest = guest; <<<<<<< public Boolean getStartAsMuted() { return startAsMuted; } ======= public Boolean isGuest() { return guest; } >>>>>>> public Boolean getStartAsMuted() { return startAsMuted; } public Boolean isGuest() { return guest; }
<<<<<<< public User(String internalUserId, String externalUserId, String fullname, String role, String avatarURL) { ======= public User(String internalUserId, String externalUserId, String fullname, String role, Boolean guest, Boolean waitingForAcceptance) { >>>>>>> public User(String internalUserId, String externalUserId, String fullname, String role, String avatarURL, Boolean guest, Boolean waitingForAcceptance) { <<<<<<< this.avatarURL = avatarURL; ======= this.guest = guest; this.waitingForAcceptance = waitingForAcceptance; >>>>>>> this.avatarURL = avatarURL; this.guest = guest; this.waitingForAcceptance = waitingForAcceptance;
<<<<<<< import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage; import org.bigbluebutton.conference.meeting.messaging.red5.DisconnectAllClientsMessage; import org.bigbluebutton.conference.meeting.messaging.red5.DisconnectClientMessage; import org.bigbluebutton.red5.pubsub.messages.DisconnectAllUsersMessage; import org.bigbluebutton.red5.pubsub.messages.GetChatHistoryReplyMessage; import org.bigbluebutton.red5.pubsub.messages.GetChatHistoryRequestMessage; import org.bigbluebutton.red5.pubsub.messages.MeetingEndedMessage; import org.bigbluebutton.red5.pubsub.messages.MeetingHasEndedMessage; ======= import org.bigbluebutton.red5.client.MeetingClientMessageSender; import org.bigbluebutton.red5.client.UserClientMessageSender; >>>>>>> import org.bigbluebutton.red5.client.MeetingClientMessageSender; import org.bigbluebutton.red5.client.UserClientMessageSender; import org.bigbluebutton.red5.client.ChatClientMessageSender; <<<<<<< import org.bigbluebutton.red5.pubsub.messages.PresenterAssignedMessage; import org.bigbluebutton.red5.pubsub.messages.SendPrivateChatMessage; import org.bigbluebutton.red5.pubsub.messages.SendPublicChatMessage; import org.bigbluebutton.red5.pubsub.messages.UserJoinedMessage; import org.bigbluebutton.red5.pubsub.messages.UserLeftMessage; import org.bigbluebutton.red5.pubsub.messages.DisconnectUserMessage; import org.bigbluebutton.red5.pubsub.messages.UserLoweredHandMessage; import org.bigbluebutton.red5.pubsub.messages.UserRaisedHandMessage; import org.bigbluebutton.red5.pubsub.messages.UserSharedWebcamMessage; import org.bigbluebutton.red5.pubsub.messages.UserStatusChangedMessage; import org.bigbluebutton.red5.pubsub.messages.UserUnsharedWebcamMessage; import org.bigbluebutton.red5.pubsub.messages.ValidateAuthTokenReplyMessage; import org.bigbluebutton.red5.pubsub.messages.ValidateAuthTokenTimeoutMessage; import org.bigbluebutton.conference.service.chat.ChatKeyUtil; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParser; ======= >>>>>>>
<<<<<<< import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; import org.bigbluebutton.web.services.turn.StunServer; ======= >>>>>>> import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; import org.bigbluebutton.web.services.turn.StunServer; <<<<<<< String sessionToken = getTokenByUserId(user.getInternalUserId()); if (sessionToken != null) { UserSession userSession = getUserSessionWithAuthToken(sessionToken); userSession.role = message.role; sessions.replace(sessionToken, userSession); } log.debug("Setting new role in meeting " + message.meetingId + " for participant:" + user.getFullname()); ======= log.debug("Setting new role in meeting {} for participant: {}", message.meetingId, user.getFullname()); >>>>>>> String sessionToken = getTokenByUserId(user.getInternalUserId()); if (sessionToken != null) { UserSession userSession = getUserSessionWithAuthToken(sessionToken); userSession.role = message.role; sessions.replace(sessionToken, userSession); } log.debug("Setting new role in meeting {} for participant: {}", message.meetingId, user.getFullname());
<<<<<<< ======= >>>>>>> <<<<<<< equals(event) &&/// TODO refactor and make common synchResult != null && !synchResult.isSuccess() && (synchResult.getCode() == ResultCode.UNAUTHORIZED || synchResult.isIdPRedirection() || (synchResult.isException() && synchResult.getException() instanceof AuthenticatorException))) { ======= equals(event) && /// TODO refactor and make common synchResult != null && !synchResult.isSuccess() && (synchResult.getCode() == ResultCode.UNAUTHORIZED || synchResult.isIdPRedirection() || (synchResult.isException() && synchResult.getException() instanceof AuthenticatorException))) { >>>>>>> equals(event) &&/// TODO refactor and make common synchResult != null && !synchResult.isSuccess() && (synchResult.getCode() == ResultCode.UNAUTHORIZED || synchResult.isIdPRedirection() || (synchResult.isException() && synchResult.getException() instanceof AuthenticatorException))) { <<<<<<< ======= >>>>>>> <<<<<<< // Force the preview if the file is an image or text file if (uploadWasFine) { OCFile ocFile = getFile(); if (PreviewImageFragment.canBePreviewed(ocFile)) startImagePreview(getFile()); else if (PreviewTextFragment.canBePreviewed(ocFile)) startTextPreview(ocFile); // TODO what about other kind of previews? } ======= // Force the preview if the file is an image if (uploadWasFine && PreviewImageFragment.canBePreviewed(getFile())) { startImagePreview(getFile()); } // TODO what about other kind of previews? >>>>>>> // Force the preview if the file is an image or text file if (uploadWasFine) { OCFile ocFile = getFile(); if (PreviewImageFragment.canBePreviewed(ocFile)) startImagePreview(getFile()); else if (PreviewTextFragment.canBePreviewed(ocFile)) startTextPreview(ocFile); // TODO what about other kind of previews? } <<<<<<< ======= >>>>>>> <<<<<<< ======= } >>>>>>> } <<<<<<< ======= >>>>>>> <<<<<<< ======= >>>>>>>
<<<<<<< private Long startTime; ======= /** * Timestamp the stream was started. */ private long startTime; >>>>>>> /** * Timestamp the stream was started. */ private Long startTime; <<<<<<< creationTime = System.currentTimeMillis(); startTime = creationTime; ======= // technically this would be a 'start' time startTime = System.currentTimeMillis(); >>>>>>> creationTime = System.currentTimeMillis(); startTime = creationTime;
<<<<<<< import com.owncloud.android.Log_OC; import com.owncloud.android.R; ======= >>>>>>> import com.owncloud.android.Log_OC; import com.owncloud.android.R; <<<<<<< ======= private static int[] mMenuIdentifiersToPatch = {R.id.action_about_app}; private OCFile mWaitingToPreview; private Handler mHandler; >>>>>>> private static int[] mMenuIdentifiersToPatch = {R.id.action_about_app}; private OCFile mWaitingToPreview; private Handler mHandler; @Override public void onCreate(Bundle savedInstanceState) { Log_OC.d(getClass().toString(), "onCreate() start"); super.onCreate(savedInstanceState); /// Load of parameters from received intent Account account = getIntent().getParcelableExtra(FileDetailFragment.EXTRA_ACCOUNT); if (account != null && AccountUtils.setCurrentOwnCloudAccount(this, account.name)) { mCurrentDir = getIntent().getParcelableExtra(FileDetailFragment.EXTRA_FILE); } /// Load of saved instance state: keep this always before initDataFromCurrentAccount() if(savedInstanceState != null) { // TODO - test if savedInstanceState should take precedence over file in the intent ALWAYS (now), NEVER, or SOME TIMES mCurrentDir = savedInstanceState.getParcelable(FileDetailFragment.EXTRA_FILE); mWaitingToPreview = (OCFile) savedInstanceState.getParcelable(FileDetailActivity.KEY_WAITING_TO_PREVIEW); } else { mWaitingToPreview = null; } if (!AccountUtils.accountsAreSetup(this)) { /// no account available: FORCE ACCOUNT CREATION mStorageManager = null; createFirstAccount(); } else { /// at least an account is available initDataFromCurrentAccount(); // it checks mCurrentDir and mCurrentFile with the current account } mUploadConnection = new ListServiceConnection(); mDownloadConnection = new ListServiceConnection(); bindService(new Intent(this, FileUploader.class), mUploadConnection, Context.BIND_AUTO_CREATE); bindService(new Intent(this, FileDownloader.class), mDownloadConnection, Context.BIND_AUTO_CREATE); // PIN CODE request ; best location is to decide, let's try this first if (getIntent().getAction() != null && getIntent().getAction().equals(Intent.ACTION_MAIN) && savedInstanceState == null) { requestPinCode(); } // file observer Intent observer_intent = new Intent(this, FileObserverService.class); observer_intent.putExtra(FileObserverService.KEY_FILE_CMD, FileObserverService.CMD_INIT_OBSERVED_LIST); startService(observer_intent); /// USER INTERFACE requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); // Drop-down navigation mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item); OCFile currFile = mCurrentDir; while(mStorageManager != null && currFile != null && currFile.getFileName() != OCFile.PATH_SEPARATOR) { mDirectories.add(currFile.getFileName()); currFile = mStorageManager.getFileById(currFile.getParentId()); } mDirectories.add(OCFile.PATH_SEPARATOR); // Inflate and set the layout view setContentView(R.layout.files); mFileList = (OCFileListFragment) getSupportFragmentManager().findFragmentById(R.id.fileList); mDualPane = (findViewById(R.id.file_details_container) != null); if (mDualPane) { if (savedInstanceState == null) initFileDetailsInDualPane(); } else { // quick patchES to fix problem in turn from landscape to portrait, when a file is selected in the right pane // TODO serious refactorization in activities and fragments providing file browsing and handling if (mCurrentFile != null) { onFileClick(mCurrentFile); mCurrentFile = null; } Fragment rightPanel = getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG); if (rightPanel != null) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.remove(rightPanel); transaction.commit(); } } // Action bar setup ActionBar actionBar = getSupportActionBar(); actionBar.setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation actionBar.setDisplayHomeAsUpEnabled(mCurrentDir != null && mCurrentDir.getParentId() != 0); actionBar.setDisplayShowTitleEnabled(false); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); actionBar.setListNavigationCallbacks(mDirectories, this); setSupportProgressBarIndeterminateVisibility(false); // always AFTER setContentView(...) ; to workaround bug in its implementation // show changelog, if needed //showChangeLog(); mBackFromCreatingFirstAccount = false; Log_OC.d(getClass().toString(), "onCreate() end"); } /** * Shows a dialog with the change log of the current version after each app update * * TODO make it permanent; by now, only to advice the workaround app for 4.1.x */ private void showChangeLog() { if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.JELLY_BEAN) { final String KEY_VERSION = "version"; SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); int currentVersionNumber = 0; int savedVersionNumber = sharedPref.getInt(KEY_VERSION, 0); try { PackageInfo pi = getPackageManager().getPackageInfo(getPackageName(), 0); currentVersionNumber = pi.versionCode; } catch (Exception e) {} if (currentVersionNumber > savedVersionNumber) { ChangelogDialog.newInstance(true).show(getSupportFragmentManager(), DIALOG_CHANGELOG_TAG); Editor editor = sharedPref.edit(); editor.putInt(KEY_VERSION, currentVersionNumber); editor.commit(); } } } /** * Launches the account creation activity. To use when no ownCloud account is available */ private void createFirstAccount() { Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT); intent.putExtra(android.provider.Settings.EXTRA_AUTHORITIES, new String[] { AccountAuthenticator.AUTH_TOKEN_TYPE }); startActivity(intent); // the new activity won't be created until this.onStart() and this.onResume() are finished; } /** * Load of state dependent of the existence of an ownCloud account */ private void initDataFromCurrentAccount() { /// Storage manager initialization - access to local database mStorageManager = new FileDataStorageManager( AccountUtils.getCurrentOwnCloudAccount(this), getContentResolver()); /// Check if mCurrentDir is a directory if(mCurrentDir != null && !mCurrentDir.isDirectory()) { mCurrentFile = mCurrentDir; mCurrentDir = mStorageManager.getFileById(mCurrentDir.getParentId()); } /// Check if mCurrentDir and mCurrentFile are in the current account, and update them if (mCurrentDir != null) { mCurrentDir = mStorageManager.getFileByPath(mCurrentDir.getRemotePath()); // mCurrentDir == null if it is not in the current account } if (mCurrentFile != null) { if (mCurrentFile.fileExists()) { mCurrentFile = mStorageManager.getFileByPath(mCurrentFile.getRemotePath()); // mCurrentFile == null if it is not in the current account } // else : keep mCurrentFile with the received value; this is currently the case of an upload in progress, when the user presses the status notification in a landscape tablet } /// Default to root if mCurrentDir was not found if (mCurrentDir == null) { mCurrentDir = mStorageManager.getFileByPath("/"); // will be NULL if the database was never synchronized } } private void initFileDetailsInDualPane() { if (mDualPane && getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG) == null) { FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); if (mCurrentFile != null) { if (PreviewMediaFragment.canBePreviewed(mCurrentFile)) { if (mCurrentFile.isDown()) { transaction.replace(R.id.file_details_container, new PreviewMediaFragment(mCurrentFile, AccountUtils.getCurrentOwnCloudAccount(this)), FileDetailFragment.FTAG); } else { transaction.replace(R.id.file_details_container, new FileDetailFragment(mCurrentFile, AccountUtils.getCurrentOwnCloudAccount(this)), FileDetailFragment.FTAG); mWaitingToPreview = mCurrentFile; } } else { transaction.replace(R.id.file_details_container, new FileDetailFragment(mCurrentFile, AccountUtils.getCurrentOwnCloudAccount(this)), FileDetailFragment.FTAG); } mCurrentFile = null; } else { transaction.replace(R.id.file_details_container, new FileDetailFragment(null, null), FileDetailFragment.FTAG); // empty FileDetailFragment } transaction.commit(); } } <<<<<<< inflater.inflate(R.menu.menu, menu); ======= inflater.inflate(R.menu.main_menu, menu); patchHiddenAccents(menu); >>>>>>> inflater.inflate(R.menu.main_menu, menu); <<<<<<< case R.id.createDirectoryItem: { showDialog(DIALOG_CREATE_DIR); break; } case R.id.startSync: { startSynchronization(); break; } case R.id.action_upload: { showDialog(DIALOG_CHOOSE_UPLOAD_SOURCE); break; } case R.id.action_settings: { Intent settingsIntent = new Intent(this, Preferences.class); startActivity(settingsIntent); break; } case android.R.id.home: { if (mCurrentDir != null && mCurrentDir.getParentId() != 0) { onBackPressed(); ======= case R.id.action_create_dir: { EditNameDialog dialog = EditNameDialog.newInstance(getString(R.string.uploader_info_dirname), "", this); dialog.show(getSupportFragmentManager(), "createdirdialog"); break; >>>>>>> case R.id.action_create_dir: { EditNameDialog dialog = EditNameDialog.newInstance(getString(R.string.uploader_info_dirname), "", this); dialog.show(getSupportFragmentManager(), "createdirdialog"); break; <<<<<<< protected void onPause() { Log_OC.d(getClass().toString(), "onPause() start"); ======= public void onPause() { Log.d(getClass().toString(), "onPause() start"); >>>>>>> protected void onPause() { Log_OC.d(getClass().toString(), "onPause() start"); <<<<<<< Log_OC.e(TAG, "Error while trying to show fail message ", e); ======= Log.e(TAG, "Error while trying to show fail message " , e); >>>>>>> Log_OC.e(TAG, "Error while trying to show fail message ", e);
<<<<<<< import java.io.File; ======= import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; >>>>>>> import java.io.File; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; <<<<<<< import java.util.TreeMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import org.bigbluebutton.api.domain.GuestPolicy; import org.bigbluebutton.api.domain.Meeting; import org.bigbluebutton.api.domain.Recording; import org.bigbluebutton.api.domain.RegisteredUser; import org.bigbluebutton.api.domain.User; import org.bigbluebutton.api.domain.UserSession; ======= import java.util.Set; import java.util.TreeMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import org.apache.http.client.utils.URIBuilder; import org.bigbluebutton.api.domain.Meeting; import org.bigbluebutton.api.domain.Recording; import org.bigbluebutton.api.domain.User; import org.bigbluebutton.api.domain.UserSession; >>>>>>> import java.util.TreeMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import org.apache.http.client.utils.URIBuilder; import org.bigbluebutton.api.domain.GuestPolicy; import org.bigbluebutton.api.domain.Meeting; import org.bigbluebutton.api.domain.Recording; import org.bigbluebutton.api.domain.RegisteredUser; import org.bigbluebutton.api.domain.User; import org.bigbluebutton.api.domain.UserSession; <<<<<<< import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; ======= import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; import org.bigbluebutton.web.services.turn.StunServer; >>>>>>> import org.bigbluebutton.web.services.callback.CallbackUrlService; import org.bigbluebutton.web.services.callback.MeetingEndedEvent; <<<<<<< message.name, message.role, message.avatarURL, message.guest, message.guestStatus, message.clientType); ======= message.name, message.role, message.avatarURL, message.guest, message.waitingForAcceptance, message.clientType); >>>>>>> message.name, message.role, message.avatarURL, message.guest, message.guestStatus, message.clientType); <<<<<<< User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", "no-avatar-url", true, GuestPolicy.ALLOW, "DIAL-IN"); ======= User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", "no-avatar-url", true, false, "DIAL-IN"); >>>>>>> User vuser = new User(message.userId, message.userId, message.name, "DIAL-IN-USER", "no-avatar-url", true, GuestPolicy.ALLOW, "DIAL-IN"); <<<<<<< } else if (message instanceof PresentationUploadToken) { processPresentationUploadToken((PresentationUploadToken) message); } else if (message instanceof GuestStatusChangedEventMsg) { processGuestStatusChangedEventMsg((GuestStatusChangedEventMsg) message); } else if (message instanceof GuestPolicyChanged) { processGuestPolicyChanged((GuestPolicyChanged) message); } else if (message instanceof RecordChapterBreak) { processRecordingChapterBreak((RecordChapterBreak) message); } else if (message instanceof MakePresentationDownloadableMsg) { processMakePresentationDownloadableMsg((MakePresentationDownloadableMsg) message); ======= } else if (message instanceof UpdateRecordingStatus) { processUpdateRecordingStatus((UpdateRecordingStatus) message); >>>>>>> } else if (message instanceof PresentationUploadToken) { processPresentationUploadToken((PresentationUploadToken) message); } else if (message instanceof GuestStatusChangedEventMsg) { processGuestStatusChangedEventMsg((GuestStatusChangedEventMsg) message); } else if (message instanceof GuestPolicyChanged) { processGuestPolicyChanged((GuestPolicyChanged) message); } else if (message instanceof RecordChapterBreak) { processRecordingChapterBreak((RecordChapterBreak) message); } else if (message instanceof MakePresentationDownloadableMsg) { processMakePresentationDownloadableMsg((MakePresentationDownloadableMsg) message); } else if (message instanceof UpdateRecordingStatus) { processUpdateRecordingStatus((UpdateRecordingStatus) message);
<<<<<<< public void addMethods(String path, Collection<MethodAccess> methods) { methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && !methodAccess.isStatic() && !methodAccess.method().isSynthetic() && !methodAccess.method().getDeclaringClass().getName().contains("$$EnhancerByGuice$$") ).forEach(methodAccess -> addMethod(path, methodAccess)); ======= public void addMethods(final String path, final Collection<MethodAccess> methods) { /* Only add methods that could be REST endpoints. */ methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && //No private methods !methodAccess.isStatic() && //No static methods !methodAccess.method().isSynthetic() && //No synthetic methods !methodAccess.name().contains("$")) //No methods with $ as this could be Scala generated // method or byte code lib generated .forEach(methodAccess -> addMethod(path, methodAccess)); >>>>>>> public void addMethods(final String path, final Collection<MethodAccess> methods) { /* Only add methods that could be REST endpoints. */ methods.stream().filter(methodAccess -> !methodAccess.isPrivate() && //No private methods !methodAccess.isStatic() && //No static methods !methodAccess.method().isSynthetic() && //No synthetic methods !methodAccess.method().getDeclaringClass().getName().contains("$$EnhancerByGuice$$") && !methodAccess.name().contains("$")) //No methods with $ as this could be Scala generated // method or byte code lib generated .forEach(methodAccess -> addMethod(path, methodAccess));
<<<<<<< import io.advantageous.qbit.http.config.CorsSupport; ======= import io.advantageous.qbit.http.request.HttpResponseCreator; import io.advantageous.qbit.http.request.impl.HttpResponseCreatorDefault; import io.advantageous.qbit.http.request.decorator.HttpResponseDecorator; >>>>>>> import io.advantageous.qbit.http.request.HttpResponseCreator; import io.advantageous.qbit.http.request.impl.HttpResponseCreatorDefault; import io.advantageous.qbit.http.request.decorator.HttpResponseDecorator; import io.advantageous.qbit.http.config.CorsSupport; <<<<<<< private final CorsSupport corsSupport; ======= private final long checkInEveryMiliDuration; private final CopyOnWriteArrayList<HttpResponseDecorator> decorators; private final HttpResponseCreator httpResponseCreator; >>>>>>> private final long checkInEveryMiliDuration; private final CopyOnWriteArrayList<HttpResponseDecorator> decorators; private final CorsSupport corsSupport; private final HttpResponseCreator httpResponseCreator; <<<<<<< final int flushInterval, final int port, final ServiceDiscovery serviceDiscovery, final HealthServiceAsync healthServiceAsync, final CorsSupport corsSupport) { ======= final int flushInterval, final int port, final ServiceDiscovery serviceDiscovery, final HealthServiceAsync healthServiceAsync, final int serviceDiscoveryTtl, final TimeUnit serviceDiscoveryTtlTimeUnit, final CopyOnWriteArrayList<HttpResponseDecorator> decorators, final HttpResponseCreator httpResponseCreator) { this.decorators = decorators; this.httpResponseCreator = httpResponseCreator; >>>>>>> final int flushInterval, final int port, final ServiceDiscovery serviceDiscovery, final HealthServiceAsync healthServiceAsync, final int serviceDiscoveryTtl, final TimeUnit serviceDiscoveryTtlTimeUnit, final CopyOnWriteArrayList<HttpResponseDecorator> decorators, final HttpResponseCreator httpResponseCreator, final CorsSupport corsSupport) { this.decorators = decorators; this.httpResponseCreator = httpResponseCreator; <<<<<<< this.corsSupport = corsSupport; ======= this.endpointDefinition = createEndpointDefinition(serviceDiscoveryTtl, serviceDiscoveryTtlTimeUnit); this.checkInEveryMiliDuration = serviceDiscoveryTtlTimeUnit.toMillis(serviceDiscoveryTtl) / 3; } EndpointDefinition createEndpointDefinition(int serviceDiscoveryTtl, TimeUnit serviceDiscoveryTtlTimeUnit) { EndpointDefinition endpointDefinition; if (serviceDiscovery!=null) { endpointDefinition = serviceDiscovery.registerWithTTL(name, port, (int) serviceDiscoveryTtlTimeUnit.toSeconds(serviceDiscoveryTtl)); serviceDiscovery.checkInOk(endpointDefinition.getId()); } else { endpointDefinition = null; } return endpointDefinition; >>>>>>> this.corsSupport = corsSupport; this.endpointDefinition = createEndpointDefinition(serviceDiscoveryTtl, serviceDiscoveryTtlTimeUnit); this.checkInEveryMiliDuration = serviceDiscoveryTtlTimeUnit.toMillis(serviceDiscoveryTtl) / 3; } EndpointDefinition createEndpointDefinition(int serviceDiscoveryTtl, TimeUnit serviceDiscoveryTtlTimeUnit) { EndpointDefinition endpointDefinition; if (serviceDiscovery!=null) { endpointDefinition = serviceDiscovery.registerWithTTL(name, port, (int) serviceDiscoveryTtlTimeUnit.toSeconds(serviceDiscoveryTtl)); serviceDiscovery.checkInOk(endpointDefinition.getId()); } else { endpointDefinition = null; } return endpointDefinition; <<<<<<< this.corsSupport = null; ======= this.endpointDefinition = null; this.checkInEveryMiliDuration = 100_000; this.decorators = new CopyOnWriteArrayList<>(); this.httpResponseCreator = new HttpResponseCreatorDefault(); } @Override public void setOnStart(final Runnable runnable) { this.onStart = runnable; } @Override public void setOnError(final Consumer<Throwable> exceptionConsumer) { this.errorHandler = exceptionConsumer; >>>>>>> this.endpointDefinition = null; this.checkInEveryMiliDuration = 100_000; this.decorators = new CopyOnWriteArrayList<>(); this.httpResponseCreator = new HttpResponseCreatorDefault(); } @Override public void setOnStart(final Runnable runnable) { this.onStart = runnable; } @Override public void setOnError(final Consumer<Throwable> exceptionConsumer) { this.errorHandler = exceptionConsumer;
<<<<<<< return JSONObject.Builder.create(tmp); ======= if (ignoreHooks.size() > 0) { tmp.put(KEY_IGNORE_HOOKS, ignoreHooks); } return new JSONObject(tmp); >>>>>>> if (ignoreHooks.size() > 0) { tmp.put(KEY_IGNORE_HOOKS, ignoreHooks); } return JSONObject.Builder.create(tmp);
<<<<<<< import java.io.File; import java.io.Serializable; import com.owncloud.android.lib.common.utils.Log_OC; import third_parties.daveKoeller.AlphanumComparator; ======= >>>>>>> import java.io.File; import java.io.Serializable; <<<<<<< // OCFile needs to be Serializable because it is stored persistently inside UploadDbObject. // (Parcelable is not suitable for persistent storage.) public class OCFile implements Parcelable, Comparable<OCFile>, Serializable { /** * Should be changed whenever any property of OCFile changes. */ private static final long serialVersionUID = 5604080482686390078L; ======= import com.owncloud.android.lib.common.utils.Log_OC; import java.io.File; import third_parties.daveKoeller.AlphanumComparator; public class OCFile implements Parcelable, Comparable<OCFile> { >>>>>>> import com.owncloud.android.lib.common.utils.Log_OC; import third_parties.daveKoeller.AlphanumComparator; // OCFile needs to be Serializable because it is stored persistently inside UploadDbObject. // (Parcelable is not suitable for persistent storage.) public class OCFile implements Parcelable, Comparable<OCFile>, Serializable { /** * Should be changed whenever any property of OCFile changes. */ private static final long serialVersionUID = 5604080482686390078L; <<<<<<< * Can be used to set the path where the local file is stored * ======= * Can be used to set the path where the file is stored * >>>>>>> * Can be used to set the path where the local file is stored *
<<<<<<< protected AstRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h) { ======= protected AstRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis pa, AstHeapModel h) { >>>>>>> protected AstRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, AstHeapModel h) { <<<<<<< protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h) { return new AstRefVisitor(n, result, pa, h); ======= protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h) { return new AstRefVisitor(n, result, pa, (AstHeapModel)h); >>>>>>> protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h) { return new AstRefVisitor(n, result, pa, (AstHeapModel)h); <<<<<<< protected AstModVisitor(CGNode n, Collection<PointerKey> result, ExtendedHeapModel h, PointerAnalysis<InstanceKey> pa) { ======= protected AstModVisitor(CGNode n, Collection<PointerKey> result, AstHeapModel h, PointerAnalysis pa) { >>>>>>> protected AstModVisitor(CGNode n, Collection<PointerKey> result, AstHeapModel h, PointerAnalysis<InstanceKey> pa) { <<<<<<< protected ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs) { return new AstModVisitor(n, result, h, pa); ======= protected ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs) { return new AstModVisitor(n, result, (AstHeapModel)h, pa); >>>>>>> protected ModVisitor makeModVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h, boolean ignoreAllocHeapDefs) { return new AstModVisitor(n, result, (AstHeapModel)h, pa);
<<<<<<< public AstLexicalRead(int iindex, int lhs, String definer, String globalName) { this(iindex, new Access(globalName, definer, lhs)); ======= public AstLexicalRead(int lhs, String definer, String globalName, TypeReference type) { this(new Access(globalName, definer, type, lhs)); >>>>>>> public AstLexicalRead(int iindex, int lhs, String definer, String globalName, TypeReference type) { this(iindex, new Access(globalName, definer, type, lhs));
<<<<<<< public JavaScriptInvoke Invoke(int iindex, int function, int[] results, int[] params, int exception, CallSiteReference site, Access[] lexicalReads, Access[] lexicalWrites) { return new JavaScriptInvoke(iindex, function, results, params, exception, site, lexicalReads, lexicalWrites); } @Override public JavaScriptInvoke Invoke(int iindex, int function, int result, int[] params, int exception, CallSiteReference site) { return new JavaScriptInvoke(iindex, function, result, params, exception, site); ======= public JavaScriptInvoke Invoke(int function, int result, int[] params, int exception, CallSiteReference site) { return new JavaScriptInvoke(function, result, params, exception, site); >>>>>>> public JavaScriptInvoke Invoke(int iindex, int function, int result, int[] params, int exception, CallSiteReference site) { return new JavaScriptInvoke(iindex, function, result, params, exception, site); <<<<<<< public AstLexicalRead LexicalRead(int iindex, int lhs, String definer, String globalName) { return new AstLexicalRead(iindex, lhs, definer, globalName); ======= public AstLexicalRead LexicalRead(int lhs, String definer, String globalName, TypeReference type) { return new AstLexicalRead(lhs, definer, globalName, type); >>>>>>> public AstLexicalRead LexicalRead(int iindex, int lhs, String definer, String globalName, TypeReference type) { return new AstLexicalRead(iindex, lhs, definer, globalName, type); <<<<<<< public AstLexicalWrite LexicalWrite(int iindex, String definer, String globalName, int rhs) { return new AstLexicalWrite(iindex, definer, globalName, rhs); ======= public AstLexicalWrite LexicalWrite(String definer, String globalName, TypeReference type, int rhs) { return new AstLexicalWrite(definer, globalName, type, rhs); >>>>>>> public AstLexicalWrite LexicalWrite(int iindex, String definer, String globalName, TypeReference type, int rhs) { return new AstLexicalWrite(iindex, definer, globalName, type, rhs);
<<<<<<< private final PointerAnalysis<InstanceKey> pa; ======= protected final PointerAnalysis pa; >>>>>>> protected final PointerAnalysis<InstanceKey> pa; <<<<<<< protected ModVisitor(CGNode n, Collection<PointerKey> result, ExtendedHeapModel h, PointerAnalysis<InstanceKey> pa, boolean ignoreAllocHeapDefs) { ======= protected ModVisitor(CGNode n, Collection<PointerKey> result, H h, PointerAnalysis pa, boolean ignoreAllocHeapDefs) { >>>>>>> protected ModVisitor(CGNode n, Collection<PointerKey> result, H h, PointerAnalysis<InstanceKey> pa, boolean ignoreAllocHeapDefs) { <<<<<<< protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h) { return new RefVisitor(n, result, pa, h); ======= protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis pa, ExtendedHeapModel h) { return new RefVisitor<ExtendedHeapModel>(n, result, pa, h); >>>>>>> protected RefVisitor makeRefVisitor(CGNode n, Collection<PointerKey> result, PointerAnalysis<InstanceKey> pa, ExtendedHeapModel h) { return new RefVisitor<ExtendedHeapModel>(n, result, pa, h);
<<<<<<< return new SSABinaryOpInstruction(iindex, operator, result, val1, val2, mayBeInteger) { ======= return new SSABinaryOpInstruction(operator, result, val1, val2, mayBeInteger) { @Override >>>>>>> return new SSABinaryOpInstruction(iindex, operator, result, val1, val2, mayBeInteger) { @Override <<<<<<< public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference type, boolean isPEI) { ======= @Override public SSACheckCastInstruction CheckCastInstruction(int result, int val, TypeReference type, boolean isPEI) { >>>>>>> @Override public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference type, boolean isPEI) { <<<<<<< public SSAConversionInstruction ConversionInstruction(int iindex, int result, int val, TypeReference fromType, TypeReference toType, ======= @Override public SSAConversionInstruction ConversionInstruction(int result, int val, TypeReference fromType, TypeReference toType, >>>>>>> @Override public SSAConversionInstruction ConversionInstruction(int iindex, int result, int val, TypeReference fromType, TypeReference toType, <<<<<<< public SSAUnaryOpInstruction UnaryOpInstruction(int iindex, com.ibm.wala.shrikeBT.IUnaryOpInstruction.IOperator operator, int result, ======= @Override public SSAUnaryOpInstruction UnaryOpInstruction(com.ibm.wala.shrikeBT.IUnaryOpInstruction.IOperator operator, int result, >>>>>>> @Override public SSAUnaryOpInstruction UnaryOpInstruction(int iindex, com.ibm.wala.shrikeBT.IUnaryOpInstruction.IOperator operator, int result,
<<<<<<< public AstJavaInvokeInstruction JavaInvokeInstruction(int iindex, int result, int[] params, int exception, CallSiteReference site) { return new AstJavaInvokeInstruction(iindex, result, params, exception, site); } @Override public AstJavaInvokeInstruction JavaInvokeInstruction(int iindex, int[] params, int exception, CallSiteReference site) { return new AstJavaInvokeInstruction(iindex, params, exception, site); } @Override public AstJavaInvokeInstruction JavaInvokeInstruction(int iindex, int[] results, int[] params, int exception, CallSiteReference site, Access[] lexicalReads, Access[] lexicalWrites) { return new AstJavaInvokeInstruction(iindex, results, params, exception, site, lexicalReads, lexicalWrites); ======= public AstJavaInvokeInstruction JavaInvokeInstruction(int result[], int[] params, int exception, CallSiteReference site) { return result == null ? new AstJavaInvokeInstruction(params, exception, site) : new AstJavaInvokeInstruction(result[0], params, exception, site); >>>>>>> public AstJavaInvokeInstruction JavaInvokeInstruction(final int iindex, int result[], int[] params, int exception, CallSiteReference site) { return result == null ? new AstJavaInvokeInstruction(iindex, params, exception, site) : new AstJavaInvokeInstruction(iindex, result[0], params, exception, site); <<<<<<< public AstLexicalRead LexicalRead(int iindex, int lhs, String definer, String globalName) { return new AstLexicalRead(iindex, lhs, definer, globalName); ======= public AstLexicalRead LexicalRead(int lhs, String definer, String globalName, TypeReference type) { return new AstLexicalRead(lhs, definer, globalName, type); >>>>>>> public AstLexicalRead LexicalRead(int iindex, int lhs, String definer, String globalName, TypeReference type) { return new AstLexicalRead(iindex, lhs, definer, globalName, type); <<<<<<< public AstLexicalWrite LexicalWrite(int iindex, String definer, String globalName, int rhs) { return new AstLexicalWrite(iindex, definer, globalName, rhs); ======= public AstLexicalWrite LexicalWrite(String definer, String globalName, TypeReference type, int rhs) { return new AstLexicalWrite(definer, globalName, type, rhs); >>>>>>> public AstLexicalWrite LexicalWrite(int iindex, String definer, String globalName, TypeReference type, int rhs) { return new AstLexicalWrite(iindex, definer, globalName, type, rhs);
<<<<<<< public void unshareFileWithLink(OCFile file) { if (isSharedSupported()) { // Unshare the file UnshareLinkOperation unshare = new UnshareLinkOperation(file); unshare.execute(getStorageManager(), this, this, mHandler, this); showLoadingDialog(); } else { // Show a Message Toast t = Toast.makeText(this, getString(R.string.share_link_no_support_share_api), Toast.LENGTH_LONG); t.show(); } } ======= >>>>>>>
<<<<<<< import com.ibm.wala.ipa.callgraph.AnalysisScope; ======= import com.ibm.wala.ipa.callgraph.AnalysisCache; >>>>>>> <<<<<<< public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha, AnalysisScope scope, boolean keepPointsTo) { ======= public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, AnalysisCache cache, IClassHierarchy cha) { >>>>>>> public CallGraphBuilder<InstanceKey> make(JSAnalysisOptions options, IAnalysisCacheView cache, IClassHierarchy cha) {
<<<<<<< ======= import java.util.Map; >>>>>>> import java.util.Map; <<<<<<< context.cfg().addInstruction(((JSInstructionFactory) insts).SetPrototype(context.cfg().getCurrentInstruction(), receiver, rval)); return; } } /* ======= context.cfg().addInstruction(((JSInstructionFactory) insts).SetPrototype(receiver, rval)); return; } } /* >>>>>>> context.cfg().addInstruction(((JSInstructionFactory) insts).SetPrototype(context.cfg().getCurrentInstruction(), receiver, rval)); return; } } /* <<<<<<< */ context.cfg().addInstruction(((JSInstructionFactory) insts).PropertyWrite(context.cfg().getCurrentInstruction(), receiver, context.getValue(elt), rval)); // } ======= */ context.cfg().addInstruction(((JSInstructionFactory) insts).PropertyWrite(receiver, context.getValue(elt), rval)); // } >>>>>>> */ context.cfg().addInstruction(((JSInstructionFactory) insts).PropertyWrite(context.cfg().getCurrentInstruction(), receiver, context.getValue(elt), rval)); // }
<<<<<<< context.cfg().addInstruction(new AssignInstruction(context.cfg().currentInstruction, vn, rval)); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); ======= context.cfg().addInstruction(new AssignInstruction(vn, rval)); // we add write instructions at every access for now // eventually, we may restructure the method to do a single combined write // before exit context.cfg().addInstruction(new AstLexicalWrite(A)); >>>>>>> context.cfg().addInstruction(new AssignInstruction(context.cfg().currentInstruction, vn, rval)); // we add write instructions at every access for now // eventually, we may restructure the method to do a single combined write // before exit context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(n .getChild(0)), context.currentScope().getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)))); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(n .getChild(0)), context.currentScope().getConstantValue(new Integer(0)))); <<<<<<< insts.GetCaughtExceptionInstruction(context.cfg().currentInstruction, context.cfg().getCurrentBlock().getNumber(), context.currentScope() .lookup(nm).valueNumber())); ======= insts.GetCaughtExceptionInstruction(context.cfg().getCurrentBlock().getNumber(), context.currentScope().lookup(nm) .valueNumber())); >>>>>>> insts.GetCaughtExceptionInstruction(context.cfg().currentInstruction, context.cfg().getCurrentBlock().getNumber(), context.currentScope() .lookup(nm).valueNumber())); <<<<<<< context.cfg() .addInstruction(insts.UnaryOpInstruction(context.cfg().currentInstruction, translateUnaryOpcode(n.getChild(0)), result, getValue(v))); ======= context.cfg().addInstruction(insts.UnaryOpInstruction(translateUnaryOpcode(n.getChild(0)), result, getValue(v))); >>>>>>> context.cfg().addInstruction(insts.UnaryOpInstruction(context.cfg().currentInstruction, translateUnaryOpcode(n.getChild(0)), result, getValue(v))); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_NE), null, getValue(n .getChild(0)), context.currentScope().getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_NE), null, getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)))); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_NE), null, getValue(n .getChild(0)), context.currentScope().getConstantValue(new Integer(0)))); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(n.getChild(0)), null, getValue(n.getChild(1)), getValue(n.getChild(2)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(n.getChild(0)), null, getValue(n.getChild(1)), getValue(n.getChild(2)))); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(n.getChild(0)), null, getValue(n.getChild(1)), getValue(n.getChild(2)))); <<<<<<< context.cfg().addPreNode(n, context.getUnwindState()); context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); context.cfg().newBlock(false); if (context.getControlFlow().getTarget(n, null) == null) { assert context.getControlFlow().getTarget(n, null) != null : context.getControlFlow() + " does not map " + n + " (" + context.getSourceMap().getPosition(n) + ")"; ======= if (!context.cfg().isDeadBlock(context.cfg().getCurrentBlock())) { context.cfg().addPreNode(n, context.getUnwindState()); context.cfg().addInstruction(insts.GotoInstruction()); context.cfg().newBlock(false); if (context.getControlFlow().getTarget(n, null) == null) { assert context.getControlFlow().getTarget(n, null) != null : context.getControlFlow() + " does not map " + n + " (" + context.getSourceMap().getPosition(n) + ")"; } context.cfg().addPreEdge(n, context.getControlFlow().getTarget(n, null), false); >>>>>>> if (!context.cfg().isDeadBlock(context.cfg().getCurrentBlock())) { context.cfg().addPreNode(n, context.getUnwindState()); context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); context.cfg().newBlock(false); if (context.getControlFlow().getTarget(n, null) == null) { assert context.getControlFlow().getTarget(n, null) != null : context.getControlFlow() + " does not map " + n + " (" + context.getSourceMap().getPosition(n) + ")"; } context.cfg().addPreEdge(n, context.getControlFlow().getTarget(n, null), false); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(l), context .currentScope().getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(l), context.currentScope() .getConstantValue(new Integer(0)))); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, getValue(l), context.currentScope().getConstantValue(new Integer(0)))); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, v, getValue((CAstNode) x))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, v, getValue((CAstNode) x))); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, v, getValue((CAstNode) x))); <<<<<<< insts.GetCaughtExceptionInstruction(context.cfg().currentInstruction, context.cfg().getCurrentBlock().getNumber(), context.currentScope() .lookup(id).valueNumber())); ======= insts.GetCaughtExceptionInstruction(context.cfg().getCurrentBlock().getNumber(), context.currentScope().lookup(id) .valueNumber())); >>>>>>> insts.GetCaughtExceptionInstruction(context.cfg().currentInstruction, context.cfg().getCurrentBlock().getNumber(), context.currentScope() .lookup(id).valueNumber())); <<<<<<< ; context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction()); >>>>>>> ; context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction));
<<<<<<< ======= import android.accounts.Account; import eu.alefzero.webdav.FileRequestEntity; import eu.alefzero.webdav.OnDatatransferProgressListener; import eu.alefzero.webdav.WebdavClient; import eu.alefzero.webdav.WebdavUtils; >>>>>>> import android.accounts.Account;
<<<<<<< import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.Pair; ======= >>>>>>> import com.ibm.wala.util.collections.HashMapFactory; import com.ibm.wala.util.collections.Pair;
<<<<<<< public abstract Module getContainer(); ======= @Override >>>>>>> public abstract Module getContainer(); @Override
<<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 5, 4, "prototype")); ======= S.addStatement(insts.PutInstruction(5, 4, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 5, 4, "__proto__")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 6, 5, "prototype")); ======= S.addStatement(insts.PutInstruction(6, 5, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 6, 5, "__proto__")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 5, 4, "prototype")); ======= S.addStatement(insts.PutInstruction(5, 4, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 5, 4, "__proto__")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 6, 5, "prototype")); ======= S.addStatement(insts.PutInstruction(6, 5, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 6, 5, "__proto__")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), nargs + 5, nargs + 4, "prototype")); ======= S.addStatement(insts.PutInstruction(nargs + 5, nargs + 4, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), nargs + 5, nargs + 4, "__proto__")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 7, 4, "prototype")); ======= // TODO fix these writes to operate on __proto__, once we're sure we're doing the right thing here S.addStatement(insts.PutInstruction(7, 4, "prototype")); >>>>>>> // TODO fix these writes to operate on __proto__, once we're sure we're doing the right thing here S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), 7, 4, "prototype")); <<<<<<< S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), nargs + 5, nargs + 4, "prototype")); ======= S.addStatement(insts.PutInstruction(nargs + 5, nargs + 4, "__proto__")); >>>>>>> S.addStatement(insts.PutInstruction(S.getNumberOfStatements(), nargs + 5, nargs + 4, "__proto__"));
<<<<<<< import com.ibm.wala.shrikeCT.SourcePositionTableReader; import com.ibm.wala.shrikeCT.SourcePositionTableReader.Position; ======= import com.ibm.wala.types.ClassLoaderReference; >>>>>>> import com.ibm.wala.shrikeCT.SourcePositionTableReader; import com.ibm.wala.shrikeCT.SourcePositionTableReader.Position; import com.ibm.wala.types.ClassLoaderReference; <<<<<<< public Collection<Annotation> getAnnotations() { Collection<Annotation> result = HashSetFactory.make(); try { result.addAll(getAnnotations(true)); result.addAll(getAnnotations(false)); } catch (InvalidClassFileException e) { } return result; } ======= @Override public Collection<Annotation> getAnnotations() { Collection<Annotation> result = HashSetFactory.make(); try { result.addAll(getAnnotations(true)); result.addAll(getAnnotations(false)); } catch (InvalidClassFileException e) { } return result; } >>>>>>> @Override public Collection<Annotation> getAnnotations() { Collection<Annotation> result = HashSetFactory.make(); try { result.addAll(getAnnotations(true)); result.addAll(getAnnotations(false)); } catch (InvalidClassFileException e) { } return result; }
<<<<<<< this.annotations = annotations; } public Collection<Annotation> getAnnotations() { return annotations; ======= this.annotations = annotations; } @Override public Collection<Annotation> getAnnotations() { return annotations; >>>>>>> this.annotations = annotations; } @Override public Collection<Annotation> getAnnotations() { return annotations; <<<<<<< .methodEntityToSelector(methodEntity)), hasCatchBlock, catchTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); ======= .methodEntityToSelector(methodEntity)), hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); >>>>>>> .methodEntityToSelector(methodEntity)), hasCatchBlock, caughtTypes, hasMonitorOp, lexicalInfo, debugInfo, JavaSourceLoaderImpl.this.getAnnotations(methodEntity)); <<<<<<< /** BEGIN Custom change: Optional deletion of fTypeMap */ public static volatile boolean deleteTypeMapAfterInit = true; /** END Custom change: Optional deletion of fTypeMap */ ======= @Override >>>>>>> /** BEGIN Custom change: Optional deletion of fTypeMap */ public static volatile boolean deleteTypeMapAfterInit = true; /** END Custom change: Optional deletion of fTypeMap */ @Override
<<<<<<< import com.ibm.wala.ipa.callgraph.Entrypoint; import com.ibm.wala.ipa.callgraph.IAnalysisCacheView; ======= >>>>>>> import com.ibm.wala.ipa.callgraph.IAnalysisCacheView;
<<<<<<< public JavaScriptInvoke(int iindex, int function, int results[], int[] params, int exception, CallSiteReference site, Access[] lexicalReads, Access[] lexicalWrites) { super(iindex, results, exception, site, lexicalReads, lexicalWrites); this.function = function; this.params = params; } public JavaScriptInvoke(int iindex, int function, int result, int[] params, int exception, CallSiteReference site) { this(iindex, function, new int[] { result }, params, exception, site); ======= public JavaScriptInvoke(int function, int result, int[] params, int exception, CallSiteReference site) { this(function, new int[] { result }, params, exception, site); >>>>>>> public JavaScriptInvoke(int iindex, int function, int result, int[] params, int exception, CallSiteReference site) { this(iindex, function, new int[] { result }, params, exception, site); <<<<<<< return ((JSInstructionFactory)insts).Invoke(iindex, fn, newLvals, newParams, newExp, site, reads, writes); ======= return ((JSInstructionFactory)insts).Invoke(fn, newLvals, newParams, newExp, site); } @Override public int getNumberOfUses() { return getNumberOfParameters(); >>>>>>> return ((JSInstructionFactory)insts).Invoke(iindex, fn, newLvals, newParams, newExp, site); } @Override public int getNumberOfUses() { return getNumberOfParameters();
<<<<<<< import com.owncloud.android.Log_OC; import com.owncloud.android.R; import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.FileHandler; import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder; import com.owncloud.android.files.services.FileUploader.FileUploaderBinder; import com.owncloud.android.operations.OnRemoteOperationListener; import com.owncloud.android.operations.RemoteOperation; import com.owncloud.android.operations.RemoveFileOperation; import com.owncloud.android.operations.RenameFileOperation; import com.owncloud.android.operations.SynchronizeFileOperation; import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.activity.TransferServiceGetter; import com.owncloud.android.ui.adapter.FileListListAdapter; import com.owncloud.android.ui.dialog.EditNameDialog; import com.owncloud.android.ui.dialog.EditNameDialog.EditNameDialogListener; import com.owncloud.android.ui.fragment.ConfirmationDialogFragment.ConfirmationDialogFragmentListener; import com.owncloud.android.ui.preview.PreviewImageFragment; import com.owncloud.android.ui.preview.PreviewMediaFragment; import android.accounts.Account; ======= >>>>>>> import android.accounts.Account; <<<<<<< import android.media.MediaScannerConnection; ======= import android.content.Intent; >>>>>>> import android.content.Intent; import android.media.MediaScannerConnection; <<<<<<< /** * Interface to implement by any Activity that includes some instance of FileListFragment * * @author David A. Velasco */ public interface ContainerActivity extends TransferServiceGetter, OnRemoteOperationListener, FileHandler { /** * Callback method invoked when a the user browsed into a different folder through the list of files * * @param file */ public void onBrowsedDownTo(OCFile folder); public void startDownloadForPreview(OCFile file); public void startMediaPreview(OCFile file, int i, boolean b); public void startImagePreview(OCFile file); public void startSyncFolderOperation(OCFile folder); /** * Getter for the current DataStorageManager in the container activity */ public FileDataStorageManager getStorageManager(); /** * Callback method invoked when a the 'transfer state' of a file changes. * * This happens when a download or upload is started or ended for a file. * * This method is necessary by now to update the user interface of the double-pane layout in tablets * because methods {@link FileDownloaderBinder#isDownloading(Account, OCFile)} and {@link FileUploaderBinder#isUploading(Account, OCFile)} * won't provide the needed response before the method where this is called finishes. * * TODO Remove this when the transfer state of a file is kept in the database (other thing TODO) * * @param file OCFile which state changed. * @param downloading Flag signaling if the file is now downloading. * @param uploading Flag signaling if the file is now uploading. */ public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading); } @Override public void onDismiss(EditNameDialog dialog) { if (dialog.getResult()) { String newFilename = dialog.getNewFilename(); Log_OC.d(TAG, "name edit dialog dismissed with new name " + newFilename); RemoteOperation operation = new RenameFileOperation(mTargetFile, AccountUtils.getCurrentOwnCloudAccount(getActivity()), newFilename, mContainerActivity.getStorageManager()); operation.execute(AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity()), getSherlockActivity(), mContainerActivity, mHandler, getSherlockActivity()); ((FileDisplayActivity) getActivity()).showLoadingDialog(); } } @Override public void onConfirmation(String callerTag) { if (callerTag.equals(FileDetailFragment.FTAG_CONFIRMATION)) { if (mContainerActivity.getStorageManager().getFileById(mTargetFile.getFileId()) != null) { String path = new File(mTargetFile.getStoragePath()).getParent(); RemoteOperation operation = new RemoveFileOperation( mTargetFile, true, mContainerActivity.getStorageManager()); operation.execute(AccountUtils.getCurrentOwnCloudAccount(getSherlockActivity()), getSherlockActivity(), mContainerActivity, mHandler, getSherlockActivity()); ((FileDisplayActivity) getActivity()).showLoadingDialog(); triggerMediaScan(path); } } } @Override public void onNeutral(String callerTag) { String path = new File(mTargetFile.getStoragePath()).getParent(); mContainerActivity.getStorageManager().removeFile(mTargetFile, false, true); // TODO perform in background task / new thread triggerMediaScan(path); listDirectory(); mContainerActivity.onTransferStateChanged(mTargetFile, false, false); } @Override public void onCancel(String callerTag) { Log_OC.d(TAG, "REMOVAL CANCELED"); } private void triggerMediaScan(String path){ MediaScannerConnection.scanFile( getActivity().getApplicationContext(), new String[]{path}, null,null); } ======= >>>>>>> private void triggerMediaScan(String path){ MediaScannerConnection.scanFile( getActivity().getApplicationContext(), new String[]{path}, null,null); }
<<<<<<< addInstruction(insts.GotoInstruction(currentInstruction)); ======= addInstruction(insts.GotoInstruction(-1)); >>>>>>> addInstruction(insts.GotoInstruction(currentInstruction, -1)); <<<<<<< addInstruction(insts.GotoInstruction(currentInstruction)); ======= addInstruction(insts.GotoInstruction(-1)); >>>>>>> addInstruction(insts.GotoInstruction(currentInstruction, -1)); <<<<<<< assert inst.iindex == x; ======= >>>>>>> <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)), -1)); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)), -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1)); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_NE), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_NE), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)), -1)); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_NE), null, c.getValue(n.getChild(0)), context .currentScope().getConstantValue(new Integer(0)), -1)); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(n.getChild(0)), null, c.getValue(n.getChild(1)), c.getValue(n.getChild(2)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(n.getChild(0)), null, c.getValue(n.getChild(1)), c.getValue(n.getChild(2)), -1)); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(n.getChild(0)), null, c.getValue(n.getChild(1)), c.getValue(n.getChild(2)), -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1)); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(l), context.currentScope() .getConstantValue(new Integer(0)))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(l), context.currentScope() .getConstantValue(new Integer(0)), -1)); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, c.getValue(l), context.currentScope() .getConstantValue(new Integer(0)), -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1)); <<<<<<< insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, v, context.getValue((CAstNode) x))); ======= insts.ConditionalBranchInstruction(translateConditionOpcode(CAstOperator.OP_EQ), null, v, context.getValue((CAstNode) x), -1)); >>>>>>> insts.ConditionalBranchInstruction(context.cfg().currentInstruction, translateConditionOpcode(CAstOperator.OP_EQ), null, v, context.getValue((CAstNode) x), -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); ======= context.cfg().addInstruction(insts.GotoInstruction(-1)); >>>>>>> context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction, -1));
<<<<<<< public SSAArrayStoreInstruction ArrayStoreInstruction(int iindex, int arrayref, int index, int value, TypeReference declaredType) { return new SSAArrayStoreInstruction(iindex, arrayref, index, value, declaredType) { ======= @Override public SSAArrayStoreInstruction ArrayStoreInstruction(int arrayref, int index, int value, TypeReference declaredType) { return new SSAArrayStoreInstruction(arrayref, index, value, declaredType) { >>>>>>> @Override public SSAArrayStoreInstruction ArrayStoreInstruction(int iindex, int arrayref, int index, int value, TypeReference declaredType) { return new SSAArrayStoreInstruction(iindex, arrayref, index, value, declaredType) { <<<<<<< public SSABinaryOpInstruction BinaryOpInstruction(int iindex, IBinaryOpInstruction.IOperator operator, boolean overflow, boolean unsigned, ======= @Override public SSABinaryOpInstruction BinaryOpInstruction(IBinaryOpInstruction.IOperator operator, boolean overflow, boolean unsigned, >>>>>>> @Override public SSABinaryOpInstruction BinaryOpInstruction(int iindex, IBinaryOpInstruction.IOperator operator, boolean overflow, boolean unsigned, <<<<<<< public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, int[] typeValues, boolean isPEI) { ======= @Override public SSACheckCastInstruction CheckCastInstruction(int result, int val, int[] typeValues, boolean isPEI) { >>>>>>> @Override public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, int[] typeValues, boolean isPEI) { <<<<<<< public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference[] types, boolean isPEI) { ======= @Override public SSACheckCastInstruction CheckCastInstruction(int result, int val, TypeReference[] types, boolean isPEI) { >>>>>>> @Override public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference[] types, boolean isPEI) { <<<<<<< public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, int typeValue, boolean isPEI) { ======= @Override public SSACheckCastInstruction CheckCastInstruction(int result, int val, int typeValue, boolean isPEI) { >>>>>>> @Override public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, int typeValue, boolean isPEI) { <<<<<<< public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference type, boolean isPEI) { ======= @Override public SSACheckCastInstruction CheckCastInstruction(int result, int val, TypeReference type, boolean isPEI) { >>>>>>> @Override public SSACheckCastInstruction CheckCastInstruction(int iindex, int result, int val, TypeReference type, boolean isPEI) { <<<<<<< public SSAConversionInstruction ConversionInstruction(int iindex, int result, int val, TypeReference fromType, TypeReference toType, ======= @Override public SSAConversionInstruction ConversionInstruction(int result, int val, TypeReference fromType, TypeReference toType, >>>>>>> @Override public SSAConversionInstruction ConversionInstruction(int iindex, int result, int val, TypeReference fromType, TypeReference toType, <<<<<<< public SSANewInstruction NewInstruction(int iindex, int result, NewSiteReference site, int[] params) { return new SSANewInstruction(iindex, result, site, params) { ======= @Override public SSANewInstruction NewInstruction(int result, NewSiteReference site, int[] params) { return new SSANewInstruction(result, site, params) { >>>>>>> @Override public SSANewInstruction NewInstruction(int iindex, int result, NewSiteReference site, int[] params) { return new SSANewInstruction(iindex, result, site, params) {
<<<<<<< Access A = new Access(arg, context.getEntityName(entity), argVN); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); ======= CAstType type = (entity.getType() instanceof CAstType.Method)? (CAstType)((CAstType.Method)entity.getType()).getArgumentTypes().get(i): topType(); Access A = new Access(arg, context.getEntityName(entity), makeType(type), argVN); context.cfg().addInstruction(new AstLexicalWrite(A)); >>>>>>> CAstType type = (entity.getType() instanceof CAstType.Method)? (CAstType)((CAstType.Method)entity.getType()).getArgumentTypes().get(i): topType(); Access A = new Access(arg, context.getEntityName(entity), makeType(type), argVN); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); <<<<<<< Access A = new Access(name, entityName, result); context.cfg().addInstruction(new AstLexicalRead(context.cfg().currentInstruction, A)); markExposedInEnclosingEntities(context, name, definingScope, E, entityName, false); ======= Access A = new Access(name, entityName, type, result); context.cfg().addInstruction(new AstLexicalRead(A)); markExposedInEnclosingEntities(context, name, definingScope, type, E, entityName, false); >>>>>>> Access A = new Access(name, entityName, type, result); context.cfg().addInstruction(new AstLexicalRead(context.cfg().currentInstruction, A)); markExposedInEnclosingEntities(context, name, definingScope, type, E, entityName, false); <<<<<<< Access A = new Access(name, context.getEntityName(E), rval); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); markExposedInEnclosingEntities(context, name, definingScope, E, context.getEntityName(E), true); ======= Access A = new Access(name, context.getEntityName(E), type, rval); context.cfg().addInstruction(new AstLexicalWrite(A)); markExposedInEnclosingEntities(context, name, definingScope, type, E, context.getEntityName(E), true); >>>>>>> Access A = new Access(name, context.getEntityName(E), type, rval); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); markExposedInEnclosingEntities(context, name, definingScope, type, E, context.getEntityName(E), true); <<<<<<< Access A = new Access(name, null, result); context.cfg().addInstruction(new AstLexicalRead(context.cfg().currentInstruction, A)); ======= Access A = new Access(name, null, type, result); context.cfg().addInstruction(new AstLexicalRead(A)); >>>>>>> Access A = new Access(name, null, type, result); context.cfg().addInstruction(new AstLexicalRead(context.cfg().currentInstruction, A)); <<<<<<< Access A = new Access(name, null, rval); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); ======= Access A = new Access(name, null, type, rval); context.cfg().addInstruction(new AstLexicalWrite(A)); >>>>>>> Access A = new Access(name, null, type, rval); context.cfg().addInstruction(new AstLexicalWrite(context.cfg().currentInstruction, A)); <<<<<<< context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); context.cfg().newBlock(false); ======= context.cfg().addPreEdge(n, context.getControlFlow().getTarget(n, null), false); context.cfg().addInstruction(insts.GotoInstruction()); >>>>>>> context.cfg().addPreEdge(n, context.getControlFlow().getTarget(n, null), false); context.cfg().addInstruction(insts.GotoInstruction(context.cfg().currentInstruction)); <<<<<<< ((WalkContext) c).cfg().addInstruction(new EachElementGetInstruction(c.cfg().currentInstruction, result, c.getValue(n.getChild(0)))); ======= c.cfg().addInstruction(new EachElementGetInstruction(result, c.getValue(n.getChild(0)))); >>>>>>> c.cfg().addInstruction(new EachElementGetInstruction(c.cfg().currentInstruction, result, c.getValue(n.getChild(0)))); <<<<<<< ((WalkContext) c).cfg().addInstruction(new EachElementHasNextInstruction(c.cfg().currentInstruction, result, c.getValue(n.getChild(0)))); ======= c.cfg().addInstruction(new EachElementHasNextInstruction(result, c.getValue(n.getChild(0)))); >>>>>>> c.cfg().addInstruction(new EachElementHasNextInstruction(c.cfg().currentInstruction, result, c.getValue(n.getChild(0))));
<<<<<<< /******************************************************************************* * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.ssa; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.TypeReference; /** * An allocation instruction ("new") for SSA form. * * This includes allocations of both scalars and arrays. */ public abstract class SSANewInstruction extends SSAInstruction { private final int result; private final NewSiteReference site; /** * The value numbers of the arguments passed to the call. If params == null, this should be a static this statement allocates a * scalar. if params != null, then params[i] is the size of the ith dimension of the array. */ private final int[] params; /** * Create a new instruction to allocate a scalar. */ protected SSANewInstruction(int index, int result, NewSiteReference site) throws IllegalArgumentException { super(index); if (site == null) { throw new IllegalArgumentException("site cannot be null"); } assert !site.getDeclaredType().isArrayType() || site.getDeclaredType().getClassLoader().getLanguage() != ClassLoaderReference.Java; this.result = result; this.site = site; this.params = null; } /** * Create a new instruction to allocate an array. * * @throws IllegalArgumentException if site is null * @throws IllegalArgumentException if params is null */ protected SSANewInstruction(int index, int result, NewSiteReference site, int[] params) { super(index); if (params == null) { throw new IllegalArgumentException("params is null"); } if (site == null) { throw new IllegalArgumentException("site is null"); } assert site.getDeclaredType().isArrayType() || site.getDeclaredType().getClassLoader().getLanguage() != ClassLoaderReference.Java; this.result = result; this.site = site; this.params = new int[params.length]; System.arraycopy(params, 0, this.params, 0, params.length); } @Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) { if (params == null) { return insts.NewInstruction(iindex, defs == null ? result : defs[0], site); } else { return insts.NewInstruction(iindex, defs == null ? result : defs[0], site, uses == null ? params : uses); } } @Override public String toString(SymbolTable symbolTable) { return getValueString(symbolTable, result) + " = new " + site.getDeclaredType() + "@" + site.getProgramCounter() + (params == null ? "" : array2String(params, symbolTable)); } private String array2String(int[] params, SymbolTable symbolTable) { StringBuffer result = new StringBuffer(); for (int i = 0; i < params.length; i++) { result.append(getValueString(symbolTable, params[i])); result.append(" "); } return result.toString(); } /** * @see com.ibm.wala.ssa.SSAInstruction#visit(IVisitor) * @throws IllegalArgumentException if v is null */ @Override public void visit(IVisitor v) { if (v == null) { throw new IllegalArgumentException("v is null"); } v.visitNew(this); } /** * @see com.ibm.wala.ssa.SSAInstruction#getDef() */ @Override public boolean hasDef() { return true; } @Override public int getDef() { return result; } @Override public int getDef(int i) { assert i == 0; return result; } @Override public int getNumberOfDefs() { return 1; } /** * @return TypeReference */ public TypeReference getConcreteType() { return site.getDeclaredType(); } public NewSiteReference getNewSite() { return site; } @Override public int hashCode() { return result * 7529 + site.getDeclaredType().hashCode(); } @Override public int getNumberOfUses() { return params == null ? 0 : params.length; } @Override public int getUse(int j) { assert params != null : "expected params but got null"; assert params.length > j : "found too few parameters"; return params[j]; } /* * @see com.ibm.wala.ssa.Instruction#isPEI() */ @Override public boolean isPEI() { return true; } /* * @see com.ibm.wala.ssa.Instruction#isFallThrough() */ @Override public boolean isFallThrough() { return true; } } ======= /******************************************************************************* * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.ssa; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.TypeReference; /** * An allocation instruction ("new") for SSA form. * * This includes allocations of both scalars and arrays. */ public abstract class SSANewInstruction extends SSAInstruction { private final int result; private final NewSiteReference site; /** * The value numbers of the arguments passed to the call. If params == null, this should be a static this statement allocates a * scalar. if params != null, then params[i] is the size of the ith dimension of the array. */ private final int[] params; /** * Create a new instruction to allocate a scalar. */ protected SSANewInstruction(int result, NewSiteReference site) throws IllegalArgumentException { super(); if (site == null) { throw new IllegalArgumentException("site cannot be null"); } this.result = result; this.site = site; this.params = null; } /** * Create a new instruction to allocate an array. * * @throws IllegalArgumentException if site is null * @throws IllegalArgumentException if params is null */ protected SSANewInstruction(int result, NewSiteReference site, int[] params) { super(); if (params == null) { throw new IllegalArgumentException("params is null"); } if (site == null) { throw new IllegalArgumentException("site is null"); } assert site.getDeclaredType().isArrayType() || site.getDeclaredType().getClassLoader().getLanguage() != ClassLoaderReference.Java; this.result = result; this.site = site; this.params = new int[params.length]; System.arraycopy(params, 0, this.params, 0, params.length); } @Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) { if (params == null) { return insts.NewInstruction(defs == null ? result : defs[0], site); } else { return insts.NewInstruction(defs == null ? result : defs[0], site, uses == null ? params : uses); } } @Override public String toString(SymbolTable symbolTable) { return getValueString(symbolTable, result) + " = new " + site.getDeclaredType() + "@" + site.getProgramCounter() + (params == null ? "" : array2String(params, symbolTable)); } private String array2String(int[] params, SymbolTable symbolTable) { StringBuffer result = new StringBuffer(); for (int i = 0; i < params.length; i++) { result.append(getValueString(symbolTable, params[i])); result.append(" "); } return result.toString(); } /** * @see com.ibm.wala.ssa.SSAInstruction#visit(IVisitor) * @throws IllegalArgumentException if v is null */ @Override public void visit(IVisitor v) { if (v == null) { throw new IllegalArgumentException("v is null"); } v.visitNew(this); } /** * @see com.ibm.wala.ssa.SSAInstruction#getDef() */ @Override public boolean hasDef() { return true; } @Override public int getDef() { return result; } @Override public int getDef(int i) { assert i == 0; return result; } @Override public int getNumberOfDefs() { return 1; } /** * @return TypeReference */ public TypeReference getConcreteType() { return site.getDeclaredType(); } public NewSiteReference getNewSite() { return site; } @Override public int hashCode() { return result * 7529 + site.getDeclaredType().hashCode(); } @Override public int getNumberOfUses() { return params == null ? 0 : params.length; } @Override public int getUse(int j) { assert params != null : "expected params but got null"; assert params.length > j : "found too few parameters"; return params[j]; } /* * @see com.ibm.wala.ssa.Instruction#isPEI() */ @Override public boolean isPEI() { return true; } /* * @see com.ibm.wala.ssa.Instruction#isFallThrough() */ @Override public boolean isFallThrough() { return true; } } >>>>>>> /******************************************************************************* * Copyright (c) 2002 - 2006 IBM Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package com.ibm.wala.ssa; import com.ibm.wala.classLoader.NewSiteReference; import com.ibm.wala.types.ClassLoaderReference; import com.ibm.wala.types.TypeReference; /** * An allocation instruction ("new") for SSA form. * * This includes allocations of both scalars and arrays. */ public abstract class SSANewInstruction extends SSAInstruction { private final int result; private final NewSiteReference site; /** * The value numbers of the arguments passed to the call. If params == null, this should be a static this statement allocates a * scalar. if params != null, then params[i] is the size of the ith dimension of the array. */ private final int[] params; /** * Create a new instruction to allocate a scalar. */ protected SSANewInstruction(int index, int result, NewSiteReference site) throws IllegalArgumentException { super(index); if (site == null) { throw new IllegalArgumentException("site cannot be null"); } this.result = result; this.site = site; this.params = null; } /** * Create a new instruction to allocate an array. * * @throws IllegalArgumentException if site is null * @throws IllegalArgumentException if params is null */ protected SSANewInstruction(int index, int result, NewSiteReference site, int[] params) { super(index); if (params == null) { throw new IllegalArgumentException("params is null"); } if (site == null) { throw new IllegalArgumentException("site is null"); } assert site.getDeclaredType().isArrayType() || site.getDeclaredType().getClassLoader().getLanguage() != ClassLoaderReference.Java; this.result = result; this.site = site; this.params = new int[params.length]; System.arraycopy(params, 0, this.params, 0, params.length); } @Override public SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses) { if (params == null) { return insts.NewInstruction(iindex, defs == null ? result : defs[0], site); } else { return insts.NewInstruction(iindex, defs == null ? result : defs[0], site, uses == null ? params : uses); } } @Override public String toString(SymbolTable symbolTable) { return getValueString(symbolTable, result) + " = new " + site.getDeclaredType() + "@" + site.getProgramCounter() + (params == null ? "" : array2String(params, symbolTable)); } private String array2String(int[] params, SymbolTable symbolTable) { StringBuffer result = new StringBuffer(); for (int i = 0; i < params.length; i++) { result.append(getValueString(symbolTable, params[i])); result.append(" "); } return result.toString(); } /** * @see com.ibm.wala.ssa.SSAInstruction#visit(IVisitor) * @throws IllegalArgumentException if v is null */ @Override public void visit(IVisitor v) { if (v == null) { throw new IllegalArgumentException("v is null"); } v.visitNew(this); } /** * @see com.ibm.wala.ssa.SSAInstruction#getDef() */ @Override public boolean hasDef() { return true; } @Override public int getDef() { return result; } @Override public int getDef(int i) { assert i == 0; return result; } @Override public int getNumberOfDefs() { return 1; } /** * @return TypeReference */ public TypeReference getConcreteType() { return site.getDeclaredType(); } public NewSiteReference getNewSite() { return site; } @Override public int hashCode() { return result * 7529 + site.getDeclaredType().hashCode(); } @Override public int getNumberOfUses() { return params == null ? 0 : params.length; } @Override public int getUse(int j) { assert params != null : "expected params but got null"; assert params.length > j : "found too few parameters"; return params[j]; } /* * @see com.ibm.wala.ssa.Instruction#isPEI() */ @Override public boolean isPEI() { return true; } /* * @see com.ibm.wala.ssa.Instruction#isFallThrough() */ @Override public boolean isFallThrough() { return true; } }
<<<<<<< public WebSocketClient start() { final byte[] outboundMaskingKey = new byte[]{randomByte(), randomByte(), randomByte(), randomByte()}; bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); bootstrap.setPipelineFactory(new ChannelPipelineFactory() { public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); if (ssl) { if (sslFactory == null) { throw new WebbitException("You need to call setupSsl first"); } SSLContext sslContext = sslFactory.getClientContext(); SSLEngine sslEngine = sslContext.createSSLEngine(); sslEngine.setUseClientMode(true); pipeline.addLast("ssl", new SslHandler(sslEngine)); } pipeline.addLast("decoder", new HttpResponseDecoder()); pipeline.addLast("encoder", new HttpRequestEncoder()); pipeline.addLast("inflater", new HttpContentDecompressor()); pipeline.addLast("handshakeHandler", new HandshakeChannelHandler(outboundMaskingKey)); return pipeline; } ======= public Future<WebSocket> start() { final FutureTask<WebSocket> future = new FutureTask<WebSocket>(new Callable<WebSocket>() { @Override public WebSocket call() throws Exception { final byte[] outboundMaskingKey = new byte[]{randomByte(), randomByte(), randomByte(), randomByte()}; bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); bootstrap.setPipelineFactory(new ChannelPipelineFactory() { public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); pipeline.addLast("decoder", new HttpResponseDecoder()); pipeline.addLast("encoder", new HttpRequestEncoder()); pipeline.addLast("inflater", new HttpContentDecompressor()); pipeline.addLast("handshakeHandler", new HandshakeChannelHandler(outboundMaskingKey)); return pipeline; } }); ChannelFuture future = bootstrap.connect(remoteAddress); channel = future.awaitUninterruptibly().getChannel(); if (!future.isSuccess()) { close(); } else { ChannelFuture requestFuture = channel.write(request); requestFuture.awaitUninterruptibly(); } return WebSocketClient.this; }; >>>>>>> public Future<WebSocket> start() { final FutureTask<WebSocket> future = new FutureTask<WebSocket>(new Callable<WebSocket>() { @Override public WebSocket call() throws Exception { final byte[] outboundMaskingKey = new byte[]{randomByte(), randomByte(), randomByte(), randomByte()}; bootstrap = new ClientBootstrap(new NioClientSocketChannelFactory( Executors.newCachedThreadPool(), Executors.newCachedThreadPool())); bootstrap.setPipelineFactory(new ChannelPipelineFactory() { public ChannelPipeline getPipeline() throws Exception { ChannelPipeline pipeline = pipeline(); if (ssl) { if (sslFactory == null) { throw new WebbitException("You need to call setupSsl first"); } SSLContext sslContext = sslFactory.getClientContext(); SSLEngine sslEngine = sslContext.createSSLEngine(); sslEngine.setUseClientMode(true); pipeline.addLast("ssl", new SslHandler(sslEngine)); } pipeline.addLast("decoder", new HttpResponseDecoder()); pipeline.addLast("encoder", new HttpRequestEncoder()); pipeline.addLast("inflater", new HttpContentDecompressor()); pipeline.addLast("handshakeHandler", new HandshakeChannelHandler(outboundMaskingKey)); return pipeline; } }); ChannelFuture future = bootstrap.connect(remoteAddress); channel = future.awaitUninterruptibly().getChannel(); if (!future.isSuccess()) { close(); } else { ChannelFuture requestFuture = channel.write(request); requestFuture.awaitUninterruptibly(); } return WebSocketClient.this; };
<<<<<<< import org.webbitserver.WebSocket; ======= import org.jboss.netty.handler.ssl.SslHandler; >>>>>>> import org.jboss.netty.handler.ssl.SslHandler; import org.webbitserver.WebSocket; <<<<<<< @Override public WebSocket start() { ======= public WebSocketClient setupSsl(InputStream keyStore, String pass) { sslFactory = new SslFactory(keyStore, pass); return this; } public void start() { >>>>>>> public WebSocketClient setupSsl(InputStream keyStore, String pass) { sslFactory = new SslFactory(keyStore, pass); return this; } @Override public WebSocketClient start() {
<<<<<<< if (alert && !inGracePeriod(chat)) addEffects(builder, chat.getLastMessage().getMessageText().toString(), chat, context); ======= >>>>>>> if (alert && !inGracePeriod(chat)) addEffects(builder, chat.getLastMessage().getMessageText().toString(), chat, context); <<<<<<< if (lastMessage != null && alert && !inGracePeriod(lastChat)) ======= if (lastMessage != null) >>>>>>> if (lastMessage != null && alert && !inGracePeriod(lastChat))
<<<<<<< public ReadableMap headers; ======= public float progressDivider; >>>>>>> public ReadableMap headers; public float progressDivider;
<<<<<<< public static UpdateInstructionPointerNode create(final CompiledCodeObject code) { return new UpdateInstructionPointerNode(code); } ======= >>>>>>> <<<<<<< public void executeUpdate(final VirtualFrame frame, final int value) { FrameAccess.setInstructionPointer(frame, code, initialPC + value); ======= public static UpdateInstructionPointerNode create(final CompiledCodeObject code) { return UpdateInstructionPointerNodeGen.create(code); } public abstract void executeUpdate(VirtualFrame frame, int value); @Specialization(guards = {"isVirtualized(frame)"}) protected final void doUpdateVirtualized(final VirtualFrame frame, final int value) { frame.setInt(code.instructionPointerSlot, value); } @Fallback protected final void doUpdate(final VirtualFrame frame, final int value) { final ContextObject context = getContext(frame); context.setInstructionPointer(value + calculcatePCOffsetNode.execute(context.getClosureOrMethod())); >>>>>>> public static UpdateInstructionPointerNode create(final CompiledCodeObject code) { return new UpdateInstructionPointerNode(code); } public void executeUpdate(final VirtualFrame frame, final int value) { FrameAccess.setInstructionPointer(frame, code, initialPC + value);
<<<<<<< protected HandleLocalReturnNode(final CompiledCodeObject code) { super(code); terminateNode = TerminateContextNode.create(code); } @Specialization(guards = {"hasModifiedSender(frame)"}) ======= @Specialization(guards = {"!isVirtualized(frame)", "getContext(frame).hasModifiedSender()"}) >>>>>>> @Specialization(guards = {"hasModifiedSender(frame)"})
<<<<<<< public static LinkProcessToListNode create(final SqueakImageContext image) { return LinkProcessToListNodeGen.create(image); } protected LinkProcessToListNode(final SqueakImageContext image) { super(image); isEmptyListNode = IsEmptyListNode.create(image); ======= protected LinkProcessToListNode(final CompiledCodeObject code) { super(code); isEmptyListNode = IsEmptyListNode.create(code.image); >>>>>>> protected LinkProcessToListNode(final SqueakImageContext image) { super(image); isEmptyListNode = IsEmptyListNode.create(image);
<<<<<<< public static StackTopNode create(final CompiledCodeObject code) { return StackTopNodeGen.create(code); } ======= >>>>>>> <<<<<<< @Specialization ======= public static StackTopNode create(final CompiledCodeObject code) { return StackTopNodeGen.create(code); } @Specialization(guards = {"isVirtualized(frame)"}) protected final Object doTopVirtualized(final VirtualFrame frame) { return getReadNode().execute(frame, frameStackPointer(frame) - 1); } @Fallback >>>>>>> public static StackTopNode create(final CompiledCodeObject code) { return StackTopNodeGen.create(code); } @Specialization
<<<<<<< import com.oracle.truffle.api.nodes.LoopNode; import com.oracle.truffle.api.nodes.Node; ======= import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.profiles.BranchProfile; >>>>>>> import com.oracle.truffle.api.nodes.LoopNode; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.profiles.BranchProfile; <<<<<<< import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.CopyNodeGen; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.BlendNodeGen; ======= import de.hpi.swa.graal.squeak.nodes.accessing.SqueakObjectSizeNode; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.HandleReceiverAndBitmapHelperNodeGen; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.PixelValueAtHelperNodeGen; >>>>>>> import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.CopyNodeGen; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.BlendNodeGen; import de.hpi.swa.graal.squeak.nodes.accessing.SqueakObjectSizeNode; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.HandleReceiverAndBitmapHelperNodeGen; import de.hpi.swa.graal.squeak.nodes.plugins.BitBltPluginFactory.PixelValueAtHelperNodeGen; <<<<<<< @CompilationFinal private final ValueProfile halftoneFormStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile destinationBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile sourceBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal protected final ValueProfile sourceBitsByteStorageType = ValueProfile.createClassProfile(); ======= private final ValueProfile halftoneFormStorageType = ValueProfile.createClassProfile(); private final ValueProfile destinationBitsStorageType = ValueProfile.createClassProfile(); >>>>>>> @CompilationFinal private final ValueProfile halftoneFormStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile destinationBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile sourceBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal protected final ValueProfile sourceBitsByteStorageType = ValueProfile.createClassProfile(); <<<<<<< @GenerateNodeFactory @SqueakPrimitive(name = "primitiveDisplayString") protected abstract static class PrimDisplayStringNode extends AbstractPrimitiveNode { @CompilationFinal private final ValueProfile halftoneFormStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile destinationBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile sourceBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal protected final ValueProfile sourceStringStorageType = ValueProfile.createClassProfile(); @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child private SimulationPrimitiveNode simulateNode; @Child private CopyNode fillNode = CopyNode.create(); @Child private BlendNode blendNode = BlendNode.create(); ======= @ImportStatic(FORM.class) @GenerateNodeFactory @SqueakPrimitive(name = "primitivePixelValueAt") protected abstract static class PrimPixelValueAtNode extends AbstractPrimitiveNode { @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child protected SqueakObjectSizeNode sizeNode = SqueakObjectSizeNode.create(); @Child private HandleReceiverAndBitmapHelperNode handleNode = HandleReceiverAndBitmapHelperNode.create(); public PrimPixelValueAtNode(final CompiledMethodObject method, final int numArguments) { super(method, numArguments); } @SuppressWarnings("unused") @Specialization(guards = {"xValue < 0 || yValue < 0"}) protected static final long doQuickReturn(final PointersObject receiver, final long xValue, final long yValue) { return 0L; } @Specialization(guards = {"xValue >= 0", "yValue > 0", "sizeNode.execute(receiver) > OFFSET"}) protected final long doValueAt(final PointersObject receiver, final long xValue, final long yValue) { return handleNode.executeValueAt(receiver, xValue, yValue, at0Node.execute(receiver, FORM.BITS)); } } /* * Helper Nodes */ protected abstract static class HandleReceiverAndBitmapHelperNode extends Node { @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child private PixelValueAtHelperNode pixelValueNode = PixelValueAtHelperNode.create(); protected static HandleReceiverAndBitmapHelperNode create() { return HandleReceiverAndBitmapHelperNodeGen.create(); } protected abstract long executeValueAt(PointersObject receiver, long xValue, long yValue, Object bitmap); @Specialization(guards = "bitmap.isIntType()") protected final long doInts(final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap) { final Object width = at0Node.execute(receiver, FORM.WIDTH); final Object height = at0Node.execute(receiver, FORM.HEIGHT); final Object depth = at0Node.execute(receiver, FORM.DEPTH); return pixelValueNode.executeValueAt(receiver, xValue, yValue, bitmap, width, height, depth); } } protected abstract static class PixelValueAtHelperNode extends Node { private final ValueProfile intProfile = ValueProfile.createClassProfile(); private final BranchProfile errorProfile = BranchProfile.create(); protected static PixelValueAtHelperNode create() { return PixelValueAtHelperNodeGen.create(); } protected abstract long executeValueAt(PointersObject receiver, long xValue, long yValue, NativeObject bitmap, Object width, Object height, Object depth); @SuppressWarnings("unused") @Specialization(guards = "xValue >= width || yValue >= height") protected static final long doQuickReturn(final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap, final long width, final long height, final long depth) { return 0L; } @Specialization(guards = "bitmap.isIntType()") protected final long doInts(@SuppressWarnings("unused") final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap, final long width, final long height, final long depth) { final long ppW = 32 / depth; final long stride = (width + ppW - 1) / ppW; final int[] ints = bitmap.getIntStorage(intProfile); if (ints.length > stride * height) { errorProfile.enter(); throw new PrimitiveFailed(); } final int word = ints[(int) ((yValue * stride) + Math.floorDiv(xValue, ppW))]; final int mask = 0xFFFFFFFF >> (32 - depth); final long shift = 32 - (((xValue & (ppW - 1)) + 1) * depth); return ((word >> shift) & mask) & 0xffffffffL; } } /* * Primitive Helper Functions */ >>>>>>> @ImportStatic(FORM.class) @GenerateNodeFactory @SqueakPrimitive(name = "primitivePixelValueAt") protected abstract static class PrimPixelValueAtNode extends AbstractPrimitiveNode { @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child protected SqueakObjectSizeNode sizeNode = SqueakObjectSizeNode.create(); @Child private HandleReceiverAndBitmapHelperNode handleNode = HandleReceiverAndBitmapHelperNode.create(); public PrimPixelValueAtNode(final CompiledMethodObject method, final int numArguments) { super(method, numArguments); } @SuppressWarnings("unused") @Specialization(guards = {"xValue < 0 || yValue < 0"}) protected static final long doQuickReturn(final PointersObject receiver, final long xValue, final long yValue) { return 0L; } @Specialization(guards = {"xValue >= 0", "yValue > 0", "sizeNode.execute(receiver) > OFFSET"}) protected final long doValueAt(final PointersObject receiver, final long xValue, final long yValue) { return handleNode.executeValueAt(receiver, xValue, yValue, at0Node.execute(receiver, FORM.BITS)); } } /* * Helper Nodes */ protected abstract static class HandleReceiverAndBitmapHelperNode extends Node { @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child private PixelValueAtHelperNode pixelValueNode = PixelValueAtHelperNode.create(); protected static HandleReceiverAndBitmapHelperNode create() { return HandleReceiverAndBitmapHelperNodeGen.create(); } protected abstract long executeValueAt(PointersObject receiver, long xValue, long yValue, Object bitmap); @Specialization(guards = "bitmap.isIntType()") protected final long doInts(final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap) { final Object width = at0Node.execute(receiver, FORM.WIDTH); final Object height = at0Node.execute(receiver, FORM.HEIGHT); final Object depth = at0Node.execute(receiver, FORM.DEPTH); return pixelValueNode.executeValueAt(receiver, xValue, yValue, bitmap, width, height, depth); } } protected abstract static class PixelValueAtHelperNode extends Node { private final ValueProfile intProfile = ValueProfile.createClassProfile(); private final BranchProfile errorProfile = BranchProfile.create(); protected static PixelValueAtHelperNode create() { return PixelValueAtHelperNodeGen.create(); } protected abstract long executeValueAt(PointersObject receiver, long xValue, long yValue, NativeObject bitmap, Object width, Object height, Object depth); @SuppressWarnings("unused") @Specialization(guards = "xValue >= width || yValue >= height") protected static final long doQuickReturn(final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap, final long width, final long height, final long depth) { return 0L; } @Specialization(guards = "bitmap.isIntType()") protected final long doInts(@SuppressWarnings("unused") final PointersObject receiver, final long xValue, final long yValue, final NativeObject bitmap, final long width, final long height, final long depth) { final long ppW = 32 / depth; final long stride = (width + ppW - 1) / ppW; final int[] ints = bitmap.getIntStorage(intProfile); if (ints.length > stride * height) { errorProfile.enter(); throw new PrimitiveFailed(); } final int word = ints[(int) ((yValue * stride) + Math.floorDiv(xValue, ppW))]; final int mask = 0xFFFFFFFF >> (32 - depth); final long shift = 32 - (((xValue & (ppW - 1)) + 1) * depth); return ((word >> shift) & mask) & 0xffffffffL; } } @GenerateNodeFactory @SqueakPrimitive(name = "primitiveDisplayString") protected abstract static class PrimDisplayStringNode extends AbstractPrimitiveNode { @CompilationFinal private final ValueProfile halftoneFormStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile destinationBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal private final ValueProfile sourceBitsStorageType = ValueProfile.createClassProfile(); @CompilationFinal protected final ValueProfile sourceStringStorageType = ValueProfile.createClassProfile(); @Child private SqueakObjectAt0Node at0Node = SqueakObjectAt0Node.create(); @Child private SimulationPrimitiveNode simulateNode; @Child private CopyNode fillNode = CopyNode.create(); @Child private BlendNode blendNode = BlendNode.create();
<<<<<<< import de.hpi.swa.graal.squeak.exceptions.PrimitiveExceptions; import de.hpi.swa.graal.squeak.exceptions.SqueakException; import de.hpi.swa.graal.squeak.image.SqueakImageChunk; ======= import de.hpi.swa.graal.squeak.image.AbstractImageChunk; >>>>>>> import de.hpi.swa.graal.squeak.image.SqueakImageChunk;
<<<<<<< // final StopWatch fillinWatch = StopWatch.start("compiledCodeFillin"); super.fillinHashAndClass(chunk); ======= CompilerDirectives.transferToInterpreterAndInvalidate(); super.fillin(chunk); >>>>>>> CompilerDirectives.transferToInterpreterAndInvalidate(); super.fillinHashAndClass(chunk);
<<<<<<< public final class TerminateContextNode extends AbstractNodeWithCode { public static TerminateContextNode create(final CompiledCodeObject code) { return new TerminateContextNode(code); } ======= @ImportStatic(FrameAccess.class) public abstract class TerminateContextNode extends AbstractNodeWithCode { >>>>>>> public final class TerminateContextNode extends AbstractNodeWithCode { <<<<<<< public void executeTerminate(final VirtualFrame frame) { FrameAccess.setInstructionPointer(frame, code, -1); FrameAccess.setSender(frame, code.image.nil); ======= public static TerminateContextNode create(final CompiledCodeObject code) { return TerminateContextNodeGen.create(code); } protected abstract void executeTerminate(VirtualFrame frame); @Specialization(guards = {"isVirtualized(frame)"}) protected final void doTerminateVirtualized(final VirtualFrame frame) { // TODO: check the below is actually needed (see also GetOrCreateContextNode.materialize()) frame.setInt(code.instructionPointerSlot, -1); // cannot set nil, -1 instead. // cannot remove sender } @Fallback protected final void doTerminate(final VirtualFrame frame) { getContext(frame).terminate(); >>>>>>> public static TerminateContextNode create(final CompiledCodeObject code) { return new TerminateContextNode(code); } public void executeTerminate(final VirtualFrame frame) { FrameAccess.setInstructionPointer(frame, code, -1); FrameAccess.setSender(frame, code.image.nil);
<<<<<<< private CompiledBlockObject getBlock(final VirtualFrame frame) { ======= public static PushClosureNode create(final CompiledCodeObject code, final int index, final int numBytecodes, final int i, final int j, final int k) { return new PushClosureNode(code, index, numBytecodes, i, j, k); } private CompiledBlockObject getBlock() { >>>>>>> public static PushClosureNode create(final CompiledCodeObject code, final int index, final int numBytecodes, final int i, final int j, final int k) { return new PushClosureNode(code, index, numBytecodes, i, j, k); } private CompiledBlockObject getBlock(final VirtualFrame frame) { <<<<<<< @Specialization ======= public static PushReceiverNode create(final CompiledCodeObject code, final int index) { return PushReceiverNodeGen.create(code, index); } @Specialization(guards = {"isVirtualized(frame)"}) >>>>>>> public static PushReceiverNode create(final CompiledCodeObject code, final int index) { return PushReceiverNodeGen.create(code, index); } @Specialization <<<<<<< @Specialization ======= public static PushReceiverVariableNode create(final CompiledCodeObject code, final int index, final int numBytecodes, final int varIndex) { return PushReceiverVariableNodeGen.create(code, index, numBytecodes, varIndex); } @Specialization(guards = {"isVirtualized(frame)"}) >>>>>>> public static PushReceiverVariableNode create(final CompiledCodeObject code, final int index, final int numBytecodes, final int varIndex) { return PushReceiverVariableNodeGen.create(code, index, numBytecodes, varIndex); } @Specialization
<<<<<<< public static ContextObject create(final FrameInstance frameInstance) { return ContextObject.create(frameInstance.getFrame(FrameInstance.FrameAccess.MATERIALIZE)); } public static ContextObject create(final Frame frame) { return create(frame, FrameAccess.getBlockOrMethod(frame)); } public static ContextObject create(final Frame frame, final CompiledCodeObject blockOrMethod) { return new ContextObject(frame, blockOrMethod); } private ContextObject(final Frame frame, final CompiledCodeObject blockOrMethod) { super(blockOrMethod.image, blockOrMethod.image.methodContextClass); assert FrameAccess.getSender(frame) != null; assert FrameAccess.getContext(frame, blockOrMethod) == null; truffleFrame = frame.materialize(); FrameAccess.setContext(truffleFrame, blockOrMethod, this); this.size = blockOrMethod.getSqueakContextSize(); ======= private ContextObject(final SqueakImageContext image, final int size, final MaterializedFrame frame, final FrameMarker frameMarker) { this(image, size); isDirty = false; truffleFrame = frame; this.frameMarker = frameMarker; >>>>>>> private ContextObject(final Frame frame, final CompiledCodeObject blockOrMethod) { super(blockOrMethod.image, blockOrMethod.image.methodContextClass); assert FrameAccess.getSender(frame) != null; assert FrameAccess.getContext(frame, blockOrMethod) == null; truffleFrame = frame.materialize(); FrameAccess.setContext(truffleFrame, blockOrMethod, this); this.size = blockOrMethod.getSqueakContextSize(); <<<<<<< public void fillIn(final Object[] pointers) { size = pointers.length; assert size > CONTEXT.TEMP_FRAME_START; final CompiledMethodObject method = (CompiledMethodObject) pointers[CONTEXT.METHOD]; final AbstractSqueakObject sender = (AbstractSqueakObject) pointers[CONTEXT.SENDER_OR_NIL]; assert sender != null : "sender should not be null"; final Object closureOrNil = pointers[CONTEXT.CLOSURE_OR_NIL]; final BlockClosureObject closure; final CompiledCodeObject code; if (closureOrNil == image.nil) { closure = null; code = method; } else { closure = (BlockClosureObject) closureOrNil; code = closure.getCompiledBlock(method); } final int endArguments = CONTEXT.RECEIVER + 1 + method.getNumArgsAndCopied(); final Object[] arguments = Arrays.copyOfRange(pointers, CONTEXT.RECEIVER, endArguments); final Object[] frameArguments = FrameAccess.newWith(method, sender, closure, arguments); CompilerDirectives.transferToInterpreterAndInvalidate(); truffleFrame = Truffle.getRuntime().createMaterializedFrame(frameArguments, code.getFrameDescriptor()); FrameAccess.initializeMarker(truffleFrame, code); FrameAccess.setContext(truffleFrame, code, this); atput0(CONTEXT.INSTRUCTION_POINTER, pointers[CONTEXT.INSTRUCTION_POINTER]); atput0(CONTEXT.STACKPOINTER, pointers[CONTEXT.STACKPOINTER]); for (int i = CONTEXT.TEMP_FRAME_START; i < pointers.length; i++) { atput0(i, pointers[i]); } ======= public static ContextObject createWithHash(final SqueakImageContext image, final long hash) { return new ContextObject(image, hash); } public static ContextObject create(final SqueakImageContext image, final int size) { return new ContextObject(image, size); } public static ContextObject create(final SqueakImageContext image, final int size, final MaterializedFrame frame, final FrameMarker frameMarker) { return new ContextObject(image, size, frame, frameMarker); } public void terminate() { // remove pc and sender without flagging as dirty setPointer(CONTEXT.INSTRUCTION_POINTER, image.nil); setPointer(CONTEXT.SENDER_OR_NIL, image.nil); >>>>>>> public static ContextObject create(final SqueakImageContext image, final int size) { return new ContextObject(image, size); } public static ContextObject createWithHash(final SqueakImageContext image, final long hash) { return new ContextObject(image, hash); } public static ContextObject create(final FrameInstance frameInstance) { return ContextObject.create(frameInstance.getFrame(FrameInstance.FrameAccess.MATERIALIZE)); } public static ContextObject create(final Frame frame) { return create(frame, FrameAccess.getBlockOrMethod(frame)); } public static ContextObject create(final Frame frame, final CompiledCodeObject blockOrMethod) { return new ContextObject(frame, blockOrMethod); } public void fillIn(final Object[] pointers) { size = pointers.length; assert size > CONTEXT.TEMP_FRAME_START; final CompiledMethodObject method = (CompiledMethodObject) pointers[CONTEXT.METHOD]; final AbstractSqueakObject sender = (AbstractSqueakObject) pointers[CONTEXT.SENDER_OR_NIL]; assert sender != null : "sender should not be null"; final Object closureOrNil = pointers[CONTEXT.CLOSURE_OR_NIL]; final BlockClosureObject closure; final CompiledCodeObject code; if (closureOrNil == image.nil) { closure = null; code = method; } else { closure = (BlockClosureObject) closureOrNil; code = closure.getCompiledBlock(method); } final int endArguments = CONTEXT.RECEIVER + 1 + method.getNumArgsAndCopied(); final Object[] arguments = Arrays.copyOfRange(pointers, CONTEXT.RECEIVER, endArguments); final Object[] frameArguments = FrameAccess.newWith(method, sender, closure, arguments); CompilerDirectives.transferToInterpreterAndInvalidate(); truffleFrame = Truffle.getRuntime().createMaterializedFrame(frameArguments, code.getFrameDescriptor()); FrameAccess.initializeMarker(truffleFrame, code); FrameAccess.setContext(truffleFrame, code, this); atput0(CONTEXT.INSTRUCTION_POINTER, pointers[CONTEXT.INSTRUCTION_POINTER]); atput0(CONTEXT.STACKPOINTER, pointers[CONTEXT.STACKPOINTER]); for (int i = CONTEXT.TEMP_FRAME_START; i < pointers.length; i++) { atput0(i, pointers[i]); }
<<<<<<< extends org.apache.isis.applib.events.ui.CssClassUiEvent<S> { private static final long serialVersionUID = 1L; } ======= extends org.apache.isis.applib.services.eventbus.CssClassUiEvent<S> { } public abstract static class LayoutUiEvent<S> extends org.apache.isis.applib.services.eventbus.LayoutUiEvent<S> { } //endregion >>>>>>> extends org.apache.isis.applib.events.ui.CssClassUiEvent<S> { private static final long serialVersionUID = 1L; } public abstract static class LayoutUiEvent<S> extends org.apache.isis.applib.services.eventbus.LayoutUiEvent<S> { private static final long serialVersionUID = 1L; }
<<<<<<< import java.util.List; ======= import java.util.Map; >>>>>>> import java.util.List; import java.util.Map;
<<<<<<< ======= import com.google.common.collect.Lists; import org.apache.isis.applib.annotation.Programmatic; >>>>>>> import org.apache.isis.applib.annotation.Programmatic;
<<<<<<< import com.owncloud.android.lib.common.OwnCloudAccount; import com.owncloud.android.lib.common.OwnCloudClientManagerFactory; ======= >>>>>>> import com.owncloud.android.lib.common.OwnCloudAccount; import com.owncloud.android.lib.common.OwnCloudClientManagerFactory; <<<<<<< // delete the account if the token has changed if (mAction == ACTION_UPDATE_TOKEN || mAction == ACTION_UPDATE_EXPIRED_TOKEN) { // Remove the cookies in AccountManager mAccountMgr.setUserData(mAccount, Constants.KEY_COOKIES, null); } mAsyncTask = new AuthenticatorAsyncTask(this); String[] params = { mServerInfo.mBaseUrl, username, password, mAuthToken, mAuthTokenType}; mAsyncTask.execute(params); ======= Intent existenceCheckIntent = new Intent(); existenceCheckIntent.setAction(OperationsService.ACTION_EXISTENCE_CHECK); existenceCheckIntent.putExtra(OperationsService.EXTRA_SERVER_URL, mServerInfo.mBaseUrl); existenceCheckIntent.putExtra(OperationsService.EXTRA_REMOTE_PATH, "/"); existenceCheckIntent.putExtra(OperationsService.EXTRA_USERNAME, username); existenceCheckIntent.putExtra(OperationsService.EXTRA_PASSWORD, password); existenceCheckIntent.putExtra(OperationsService.EXTRA_AUTH_TOKEN, mAuthToken); if (mOperationsServiceBinder != null) { //Log_OC.wtf(TAG, "starting existenceCheckRemoteOperation..." ); mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(existenceCheckIntent); } >>>>>>> // delete the account if the token has changed if (mAction == ACTION_UPDATE_TOKEN || mAction == ACTION_UPDATE_EXPIRED_TOKEN) { // Remove the cookies in AccountManager mAccountMgr.setUserData(mAccount, Constants.KEY_COOKIES, null); } mAsyncTask = new AuthenticatorAsyncTask(this); String[] params = { mServerInfo.mBaseUrl, username, password, mAuthToken, mAuthTokenType}; mAsyncTask.execute(params);
<<<<<<< public static CommandFacet create(final FacetHolder holder) { return new CommandFacetFromConfiguration(CommandPersistence.PERSISTED, CommandExecuteIn.FOREGROUND, holder); ======= public static CommandFacet create( final FacetHolder holder, final ServicesInjector servicesInjector) { return new CommandFacetFromConfiguration(Persistence.PERSISTED, ExecuteIn.FOREGROUND, holder, servicesInjector); >>>>>>> public static CommandFacet create( final FacetHolder holder, final ServicesInjector servicesInjector) { return new CommandFacetFromConfiguration(CommandPersistence.PERSISTED, CommandExecuteIn.FOREGROUND, holder, servicesInjector); <<<<<<< final CommandPersistence persistence, final CommandExecuteIn executeIn, final FacetHolder holder) { super(persistence, executeIn, Enablement.ENABLED, holder); ======= final Persistence persistence, final ExecuteIn executeIn, final FacetHolder holder, final ServicesInjector servicesInjector) { super(persistence, executeIn, Enablement.ENABLED, null, holder, servicesInjector); >>>>>>> final CommandPersistence persistence, final CommandExecuteIn executeIn, final FacetHolder holder, final ServicesInjector servicesInjector) { super(persistence, executeIn, Enablement.ENABLED, null, holder, servicesInjector);
<<<<<<< // -- create associations and actions private List<ObjectAssociation> createAssociations() { final List<FacetedMethod> associationFacetedMethods = facetedMethodsBuilder.getAssociationFacetedMethods(); final List<ObjectAssociation> associations = _Lists.newArrayList(); for (FacetedMethod facetedMethod : associationFacetedMethods) { final ObjectAssociation association = createAssociation(facetedMethod); if(association != null) { associations.add(association); ======= //region > create associations and actions private List<ObjectAssociation> createAssociations(Properties properties) { final List<ObjectAssociation> associations = Lists.newArrayList(); if(skipAssociationsAndActions()) { // add no associations } else { final List<FacetedMethod> associationFacetedMethods = facetedMethodsBuilder.getAssociationFacetedMethods(properties); for (FacetedMethod facetedMethod : associationFacetedMethods) { final ObjectAssociation association = createAssociation(facetedMethod); if(association != null) { associations.add(association); } >>>>>>> // -- create associations and actions private List<ObjectAssociation> createAssociations() { final List<ObjectAssociation> associations = _Lists.newArrayList(); if(skipAssociationsAndActions()) { // add no associations } else { final List<FacetedMethod> associationFacetedMethods = facetedMethodsBuilder.getAssociationFacetedMethods(); for (FacetedMethod facetedMethod : associationFacetedMethods) { final ObjectAssociation association = createAssociation(facetedMethod); if(association != null) { associations.add(association); } <<<<<<< ======= >>>>>>> <<<<<<< private List<ObjectAction> createActions() { final List<FacetedMethod> actionFacetedMethods = facetedMethodsBuilder.getActionFacetedMethods(); final List<ObjectAction> actions = _Lists.newArrayList(); for (FacetedMethod facetedMethod : actionFacetedMethods) { final ObjectAction action = createAction(facetedMethod); if(action != null) { actions.add(action); ======= private List<ObjectAction> createActions(Properties metadataProperties) { final List<ObjectAction> actions = Lists.newArrayList(); if(skipAssociationsAndActions()) { // create no actions } else { final List<FacetedMethod> actionFacetedMethods = facetedMethodsBuilder.getActionFacetedMethods(metadataProperties); for (FacetedMethod facetedMethod : actionFacetedMethods) { final ObjectAction action = createAction(facetedMethod); if(action != null) { actions.add(action); } >>>>>>> private List<ObjectAction> createActions() { final List<ObjectAction> actions = _Lists.newArrayList(); if(skipAssociationsAndActions()) { // create no actions } else { final List<FacetedMethod> actionFacetedMethods = facetedMethodsBuilder.getActionFacetedMethods(); for (FacetedMethod facetedMethod : actionFacetedMethods) { final ObjectAction action = createAction(facetedMethod); if(action != null) { actions.add(action); } <<<<<<< ======= private boolean skipAssociationsAndActions() { return isFixtureScript() || isDomainServiceWithDomainNatureOfServiceNotHomePage(); } // TODO: this is a bit horrible; maybe instead introduce a new NatureOfService for home page services (also for seed services?) private boolean isDomainServiceWithDomainNatureOfServiceNotHomePage() { final DomainServiceFacet domainServiceFacet = this.getFacet(DomainServiceFacet.class); if (domainServiceFacet == null) { return false; } if (domainServiceFacet.getNatureOfService() != NatureOfService.DOMAIN) { return false; } // domain services that have a single method annotated with @HomePage ARE introspected. final Method[] methods = getCorrespondingClass().getDeclaredMethods(); if (methods.length != 1) { return true; } return methods[0].getAnnotation(HomePage.class) == null; } private boolean isFixtureScript() { return FixtureScript.class.isAssignableFrom(getCorrespondingClass()); } //endregion >>>>>>> private boolean skipAssociationsAndActions() { return isFixtureScript() || isDomainServiceWithDomainNatureOfServiceNotHomePage(); } // TODO: this is a bit horrible; maybe instead introduce a new NatureOfService for home page services (also for seed services?) private boolean isDomainServiceWithDomainNatureOfServiceNotHomePage() { final DomainServiceFacet domainServiceFacet = this.getFacet(DomainServiceFacet.class); if (domainServiceFacet == null) { return false; } if (domainServiceFacet.getNatureOfService() != NatureOfService.DOMAIN) { return false; } // domain services that have a single method annotated with @HomePage ARE introspected. final Method[] methods = getCorrespondingClass().getDeclaredMethods(); if (methods.length != 1) { return true; } return methods[0].getAnnotation(HomePage.class) == null; } private boolean isFixtureScript() { return FixtureScript.class.isAssignableFrom(getCorrespondingClass()); } //endregion
<<<<<<< import org.apache.isis.applib.services.bookmark.BookmarkService; import org.apache.isis.applib.services.xactn.Transaction; ======= import org.apache.isis.applib.services.bookmark.BookmarkService2; import org.apache.isis.applib.services.command.Command; import org.apache.isis.applib.services.xactn.Transaction2; >>>>>>> import org.apache.isis.applib.services.bookmark.BookmarkService; import org.apache.isis.applib.services.xactn.Transaction; import org.apache.isis.applib.services.command.Command;
<<<<<<< ======= import javax.jdo.annotations.PersistenceCapable; import javax.xml.bind.annotation.XmlElement; import com.google.common.base.Function; import com.google.common.base.Joiner; import com.google.common.base.Predicate; import com.google.common.collect.FluentIterable; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import org.reflections.Reflections; import org.reflections.vfs.Vfs; >>>>>>> import javax.xml.bind.annotation.XmlElement; <<<<<<< ======= registry.setDomainObjectTypes(within(packagesWithDotSuffix, domainObjectTypes)); registry.setViewModelTypes(within(packagesWithDotSuffix, viewModelTypes)); registry.setXmlElementTypes(within(packagesWithDotSuffix, xmlElementTypes)); >>>>>>> registry.setDomainObjectTypes(within(packagesWithDotSuffix, domainObjectTypes)); registry.setViewModelTypes(within(packagesWithDotSuffix, viewModelTypes)); registry.setXmlElementTypes(within(packagesWithDotSuffix, xmlElementTypes));
<<<<<<< ======= import java.util.List; import org.apache.isis.core.metamodel.layoutmetadata.LayoutMetadataReader; import org.apache.isis.core.metamodel.services.configinternal.ConfigurationServiceInternal; >>>>>>> import org.apache.isis.core.metamodel.services.configinternal.ConfigurationServiceInternal; <<<<<<< ======= public final List<LayoutMetadataReader> layoutMetadataReaders; public final ConfigurationServiceInternal configService; >>>>>>> public final ConfigurationServiceInternal configService; <<<<<<< final FacetProcessor facetProcessor) { ======= final FacetProcessor facetProcessor, final List<LayoutMetadataReader> layoutMetadataReaders, final ConfigurationServiceInternal configService) { >>>>>>> final FacetProcessor facetProcessor, final ConfigurationServiceInternal configService) { <<<<<<< ======= this.layoutMetadataReaders = layoutMetadataReaders; this.configService = configService; >>>>>>> this.configService = configService;
<<<<<<< public abstract <T> T getService(Class<T> serviceClass); ======= DomainObjectContainer getContainer(); <T> T getService(Class<T> serviceClass); >>>>>>> <T> T getService(Class<T> serviceClass);