Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented May 27, 2016

Generate Java Callable Wrappers across multiple tasks.

@jonpryor jonpryor force-pushed the jonp-jcw-gen-tasks branch 2 times, most recently from 67c22e4 to 3a417de Compare May 31, 2016 01:45
Generate Java Callable Wrappers across multiple tasks.

A note about the tests: when I first added jcw-gen I tried to use
Tasks so I could get parallel JCW generation, but some of the output
was unexpected, in that it would have the wrong package name.

This is why the JavaCallableWrapperGeneratorTests.GenerateInParallel()
test was added: to try to reproduce the error that I recalled seeing.

Doing this found two unexpected bugs in `JniType.ToJniName()` (yay):

1. I was getting a `NullReferenceException` from
    `JniType.IsNonStaticInnerClass()`, because in
    `JniType.ToJniName<T>()` there is a call to
    `JniType.IsNonStaticInnerClass()` using the result of
    `as TypeDefinition`, but `IsNonStaticInnerClass()` never checked
    for `null`. Oops.

2. The reflection-based `JniType.ToJniName(Type)` overload didn't
    check for `Android.App.InstrumentationAttribute` providing an
    overriding `InstrumentationAttribute.Name` property.
@jonpryor jonpryor force-pushed the jonp-jcw-gen-tasks branch from 3a417de to f0fa3c3 Compare May 31, 2016 02:10
@atsushieno atsushieno merged commit 93af129 into dotnet:master Jun 1, 2016
@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