Skip to content

Conversation

@danielcaceresm
Copy link
Contributor

These changes are based on the AndroidClientHandler class before the modifications of #44
I think that my changes are simplier, and the commented race condition, doesn't exists.

Other change I've made is to move the connection reference to the response class, this approach is better than holding the last connection in the handler. On the other hand, is pending to implement, dispose the connection if it fails while connecting.

@dnfclas
Copy link

dnfclas commented Jun 29, 2016

Hi @danielcaceresm, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla2.dotnetfoundation.org.

TTYL, DNFBOT;

@dnfclas
Copy link

dnfclas commented Jun 29, 2016

@danielcaceresm, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, DNFBOT;

HttpURLConnection httpConnection = await SetupRequestInternal (request, java_connection).ConfigureAwait (false);
return await ProcessRequest (request, httpConnection, cancellationToken);
var java_url = new URL (request.RequestUri.ToString ());
var java_connection = java_url.OpenConnection ();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the full type instead of var here - it helps when viewing the code from outside an IDE

@grendello
Copy link
Contributor

@danielcaceresm please squash all the commits into one, thanks!

@grendello grendello merged commit f1d449c into dotnet:master Jul 6, 2016
grendello added a commit to grendello/xamarin-android that referenced this pull request Jul 8, 2016
One public method in AndroidClientHandler was modified and one
public constructor removed from AndroidHttpResponseMessage.

Putting them back requires restoring some of the previous async
internal calls.
jonpryor pushed a commit that referenced this pull request Jul 8, 2016
One public method in AndroidClientHandler was modified and one
public constructor removed from AndroidHttpResponseMessage.

Putting them back requires restoring some of the previous async
internal calls.
radical pushed a commit that referenced this pull request May 8, 2018
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=44530

Basically this is part of the problems reported at
https://bugzilla.xamarin.com/show_bug.cgi?id=44263

In good old jar2xml era, we marked "obfuscated" types at jar2xml so
that those types are not generated in the API XML.

class-parse is not that clever and generates everything as is.

We could make changes to api-xml-adjuster to bring back sanity, but
instead of doing it in jar2xml, we had better bring in flexibility
to obfuscation marking. That is -

- If there is obfuscated='false' attribute specification by API
  metadata fixup, then do not mark as obfuscated in any case.
- If not, process any lowercase-named types and nested types as
  obfuscated, such as 'a', 'SomeType$a', or 'SomeType$b$a'.

Due to code structures, we cannot take the same code path as jar2xml
(we don't hold list of sibling classes when processing an XML element).
https://github.com/xamarin/jar2xml/blob/3a7c404/JavaPackage.java#L78

Also, we had seen some obfuscated types like b$a as NOT marked as
obfuscated in the past, because we were checking only a,aa,aaa,aaaa and
aaaaa as the parent type for nested types. That should be fixed.

To fix this issue, we process marking as part of StripNonBindables().
Also, it was too early to register those types to SymbolTable before
stripping those types out, so changed relevant processing order.

Fixing bug #44263 then exposed another problem; StripNonBindables()
was not complete and it was not processing nested C# types at all.
Thus we had generated non-bindable code before. This change fixes this
issue at the same time, for fixing the bug.

Thus, this will result in "API breakage" looking changes in the end,
but the bindings were invalid and should be removed without
compatibility concern.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants