Bug 44391 - AtomicInteger/Long methods incorrectly bound as properties
Summary: AtomicInteger/Long methods incorrectly bound as properties
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: unspecified
Hardware: All All
: Low normal
Target Milestone: 7.3 (C11)
Assignee: Atsushi Eno
Depends on:
Reported: 2016-09-15 22:02 UTC by David
Modified: 2017-01-05 09:13 UTC (History)
3 users (show)

Tags: XATriaged
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description David 2016-09-15 22:02:53 UTC
Java's AtomicInteger has methods for returning the current value and mutating it in a single command. The methods are `getAndIncrement` and `getAndDecrement`. Those should not be bound in C# as properties `AndIncrement`/`AndDecrement`. Among other things, it's deceptive to have read-only properties that mutate the value. It's also inconsistent with the rest of the object. `get`, `set`, `getAndSet`, and `getAndAdd` all remained methods.
Comment 1 Atsushi Eno 2016-09-16 05:30:28 UTC
OK, they look weird and should be brought back to methods. Basically we don't review tens of thousands of methods in Android API but automatically translate the entire API, so things like this happen. Thanks for the feedback, they will be taken care.
Comment 2 Atsushi Eno 2016-09-28 15:52:54 UTC
Fix PR: https://github.com/xamarin/xamarin-android/pull/240
Comment 3 Atsushi Eno 2017-01-05 09:13:42 UTC
I'm sorry that I forgot to close this bug and notify you. The PR was merged months ago.