Skip to content

Identical expressions should not be used on both sides of a binary operator - #625

Closed
kirill-vlasov wants to merge 1 commit into
graphhopper:masterfrom
DevFactory:staging/Identical-expressions-should-not-be-used-on-both-sides-of-a-binary-operator-fix-1
Closed

kirill-vlasov wants to merge 1 commit into
graphhopper:masterfrom
DevFactory:staging/Identical-expressions-should-not-be-used-on-both-sides-of-a-binary-operator-fix-1

Conversation

@kirill-vlasov

Copy link
Copy Markdown

This pull request is focused on resolving occurrences of Sonar rule squid:S1764 - Identical expressions should not be used on both sides of a binary operator
You can find more information about the issue here:
https://dev.eclipse.org/sonar/coding_rules#q=squid:S1764
Please let me know if you have any questions.
Kirill Vlasov

@kirill-vlasov

Copy link
Copy Markdown
Author

It looks like racing error in Travis build:

npm ERR! Error: Attempt to unlock leaflet@^0.7.7, which hasn't been locked
npm ERR!     at unlock (/home/travis/.nvm/v0.10.36/lib/node_modules/npm/lib/utils/locker.js:44:11)
npm ERR!     at cb (/home/travis/.nvm/v0.10.36/lib/node_modules/npm/lib/cache/add-named.js:32:5)
npm ERR!     at /home/travis/.nvm/v0.10.36/lib/node_modules/npm/lib/cache/add-named.js:41:20
npm ERR!     at /home/travis/.nvm/v0.10.36/lib/node_modules/npm/lib/utils/locker.js:30:7
npm ERR!     at cb (/home/travis/.nvm/v0.10.36/lib/node_modules/npm/node_modules/lockfile/lockfile.js:149:38)
npm ERR!     at /home/travis/.nvm/v0.10.36/lib/node_modules/npm/node_modules/lockfile/lockfile.js:177:38
npm ERR!     at Object.oncomplete (fs.js:108:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

@ratrun

ratrun commented Dec 31, 2015

Copy link
Copy Markdown
Contributor

I had this problem yesterday as well. It seems that you created your branch before the modularized JS PR #590 got merged. You need to pull the latest master to fix it.

@karussell karussell added the bug label Dec 31, 2015
@karussell

Copy link
Copy Markdown
Member

Ouch, that is a good catch! Thanks!

We would need a unit test to ensure that this won't happen in the future again. And would you mind to electronically 'sign' the CLA: https://www.clahub.com/agreements/graphhopper/graphhopper

The travis failure is indeed strange. I've restarted them and they still fail. It looks like we need to mess with access rights: npm/npm#4815 (comment) very strange

@kirill-vlasov

Copy link
Copy Markdown
Author

@ratrun The parent for the commit [791932f]
is 6507530f8e2bbc5d5575af05aff3af623d81af23. It is on latest master branch.

@kirill-vlasov

Copy link
Copy Markdown
Author

@karussell Trying to sign CLA, but the result page shows the message: "We're sorry, but something went wrong."

@karussell

Copy link
Copy Markdown
Member

@kirill-vlasov thanks, that is ugly. The project hosting is probably something that is problematic as the maintainer needs some help there. Will investigate next week.

@karussell

Copy link
Copy Markdown
Member

BTW: not a bug as the test is done again in the size check in the next line. So the entire line should be removed instead.

@karussell karussell closed this in fe9b138 Jan 19, 2016
karussell pushed a commit that referenced this pull request Jan 19, 2016
@karussell karussell added the bug label Jan 19, 2016
@karussell karussell added this to the 0.6 milestone Jan 19, 2016
@karussell

Copy link
Copy Markdown
Member

Thanks again - this was indeed bug. In case of PointList.EMPTY we need this explicit check to avoid calling methods making no sense for an empty PointList like is3D (could be true or yes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants