New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#102 FIX #772

Merged
merged 4 commits into from Nov 25, 2017

Conversation

Projects
None yet
4 participants
@TikhomirovSergey
Member

TikhomirovSergey commented Nov 23, 2017

Change list

  • MissingParameterException was removed
  • some code improvements in MultiTouchAction. Now it will throw IllegalArgumentException when no action is defined.

#102

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
@mykola-mokhnach

This comment has been minimized.

Show comment
Hide comment
@mykola-mokhnach

mykola-mokhnach Nov 23, 2017

Contributor
  • 💯 for picking up issues that have been waiting for three years in the backlog 👍
Contributor

mykola-mokhnach commented Nov 23, 2017

  • 💯 for picking up issues that have been waiting for three years in the backlog 👍
List<TouchAction> touchActions = actions.build();
checkArgument(touchActions.size() > 0,
"MultiTouch action must have at least one TouchAction added before it can be performed");
if (touchActions.size() > 1) {
performsTouchActions.performMultiTouchAction(this);

This comment has been minimized.

@mykola-mokhnach

mykola-mokhnach Nov 23, 2017

Contributor

you can returns this immediately here, so then else block is not needed

@mykola-mokhnach

mykola-mokhnach Nov 23, 2017

Contributor

you can returns this immediately here, so then else block is not needed

This comment has been minimized.

@TikhomirovSergey

TikhomirovSergey Nov 24, 2017

Member

@mykola-mokhnach
I can't understand how to do it

performsTouchActions.performMultiTouchAction(this);

is void

performsTouchActions.performTouchAction(touchActions.get(0));

returns TouchAction

@TikhomirovSergey

TikhomirovSergey Nov 24, 2017

Member

@mykola-mokhnach
I can't understand how to do it

performsTouchActions.performMultiTouchAction(this);

is void

performsTouchActions.performTouchAction(touchActions.get(0));

returns TouchAction

This comment has been minimized.

@mykola-mokhnach

mykola-mokhnach Nov 25, 2017

Contributor
        if (touchActions.size() > 1) {
            performsTouchActions.performMultiTouchAction(this);
            return this;
        }
        //android doesn't like having multi-touch actions with only a single TouchAction...
        performsTouchActions.performTouchAction(touchActions.get(0));
        return this;
@mykola-mokhnach

mykola-mokhnach Nov 25, 2017

Contributor
        if (touchActions.size() > 1) {
            performsTouchActions.performMultiTouchAction(this);
            return this;
        }
        //android doesn't like having multi-touch actions with only a single TouchAction...
        performsTouchActions.performTouchAction(touchActions.get(0));
        return this;
@TikhomirovSergey

This comment has been minimized.

Show comment
Hide comment
@TikhomirovSergey

TikhomirovSergey Nov 24, 2017

Member

@mykola-mokhnach There is one more change.
Yes. There is some legacy (from Java 7 times) code which still can be here. Sometimes it is difficult to see it because of force of habit :)
@SrinivasanTarget your rewiev is is also valuable.

Member

TikhomirovSergey commented Nov 24, 2017

@mykola-mokhnach There is one more change.
Yes. There is some legacy (from Java 7 times) code which still can be here. Sometimes it is difficult to see it because of force of habit :)
@SrinivasanTarget your rewiev is is also valuable.

@codacy-bot

This comment has been minimized.

Show comment
Hide comment
@codacy-bot

codacy-bot Nov 25, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ src/main/java/io/appium/java_client/TouchAction.java  -32
+ src/main/java/io/appium/java_client/MultiTouchAction.java  -5
         

See the complete overview on Codacy

codacy-bot commented Nov 25, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ src/main/java/io/appium/java_client/TouchAction.java  -32
+ src/main/java/io/appium/java_client/MultiTouchAction.java  -5
         

See the complete overview on Codacy

@appium appium deleted a comment from codacy-bot Nov 25, 2017

@TikhomirovSergey TikhomirovSergey merged commit 8798102 into appium:master Nov 25, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment