Skip to content

[api-xml-adjuster] fix bug #46344 generic nested typename parsing. #109

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

Merged

Conversation

atsushieno
Copy link
Contributor

Something.This not expected by the typename parser...

Something<Like>.This<Was> not expected by the typename parser...
@jonpryor jonpryor merged commit 769f944 into dotnet:master Dec 13, 2016
jonpryor pushed a commit that referenced this pull request Dec 14, 2016
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=46344

`Xamarin.Android.Tools.ApiXmlAdjuster.JavaTypeName.Parse()` would
throw an `ArgumentOutOfRangeException` when encountering generic
nested types on generic types.

Given the following valid Java code:

	// Java
	class GenericOuter<TOuter> {
	  public class GenericInner<TInner> {
	  }
	}
	
	class Gapp {  
	  public static void main (String[] args) {
	    GenericOuter<Integer>.GenericInner<String> v = null;
	  }
	}

Then the following would fail:

	JavaTypeName.Parse("GenericOuter<Integer>.GenericInner<String>")
	System.ArgumentOutOfRangeException: Length cannot be less than zero.
	Parameter name: length
	...

Fix `JavaTypeName.Parse()` to support parsing nested generic types
on generic types.
jonpryor pushed a commit that referenced this pull request Mar 8, 2021
Changes: dotnet/android-tools@479931c...554d45a

  * dotnet/android-tools@554d45a: [Xamarin.Android.Tools.AndroidSdk] Fix CS8600 in AndroidSdkBase (#107)
  * dotnet/android-tools@19454f9: Bump to xamarin/LibZipSharp/main@86f8ae57 [1.0.24] (#111)
  * dotnet/android-tools@3582b39: [macOS] fix DirectoryNotFoundException on clean systems (#110)
  * dotnet/android-tools@ca820e5: Bump to xamarin/LibZipSharp/main@521b54ec [1.0.23] (#109)
@github-actions github-actions bot locked and limited conversation to collaborators Apr 15, 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