Skip to content
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

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

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

kirill-vlasov
Copy link

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
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
Copy link
Contributor

ratrun commented Dec 31, 2015

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
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
Author

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

@kirill-vlasov
Copy link
Author

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

@karussell
Copy link
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
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
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)

boldtrn pushed a commit to boldtrn/graphhopper that referenced this pull request Feb 16, 2016
boldtrn pushed a commit to boldtrn/graphhopper that referenced this pull request Feb 16, 2016
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.

None yet

3 participants