RyanSkraba opened a new pull request #1347:
URL: https://github.com/apache/avro/pull/1347


   Following the discussion on AVRO-2863, this PR shows how to create an 
`avro-android` artifact for experimental support of android for the next major 
release.
   
   * the `org.apache.avro.reflect package` is not supported.
   * `org.apache.avro.reflect.MapEntry` was deprecated in the `reflect` package 
and moved to `org.apache.avro.util`.  (Note, the important thing about this 
class is that it is reliably available and the internal data members are "key" 
and "value").
   *  All uses of `ClassValue`, which cache information extracted from a 
`java.lang.Class` were wrapped in a `org.apache.avro.util.ClassValueCache` so 
that the android implementation could override its behaviour.
   
   I haven't finished the `ThreadLocal.withInitial` wrapping -- I wanted to 
validate this approach first.
   
   This implementation currently works with the [android test 
project](https://github.com/david-gang/avro-android-compatibility) provided by 
@david-gang, which doesn't call any of the core code that touches 
`ThreadLocal.withInitial`.
   
   For now, Android compatibility needs to be checked manually with a sample 
application, either on an emulator or a real device.
   
   ### Jira
   
   - [X] My PR addresses the following [Avro 
Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them 
in the PR title. For example, "AVRO-1234: My Avro PR"
     - https://issues.apache.org/jira/browse/AVRO-2863
     - In case you are adding a dependency, check if the license complies with 
the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [X] My PR adds the following unit tests __OR__ does not need testing for 
this extremely good reason: Tests around the wrapper class `ClassValueCache`.
   
   ### Commits
   
   - [X] My commits all reference Jira issues in their subject lines. In 
addition, my commits follow the guidelines from "[How to write a good git 
commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [X] In case of new functionality, my PR adds documentation that describes 
how to use it.
     - All the public functions and the classes in the PR contain Javadoc that 
explain what it does
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to