Skip to content
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

Remove reference to javax.xml.bind.DatatypeConverter #7

Closed
dlew opened this issue Apr 8, 2014 · 12 comments
Closed

Remove reference to javax.xml.bind.DatatypeConverter #7

dlew opened this issue Apr 8, 2014 · 12 comments

Comments

@dlew
Copy link

dlew commented Apr 8, 2014

Not strictly necessary, but Android doesn't include javax.xml.bind so if this were removed it would be easier to include this lib in Android without it complaining.

@dlew
Copy link
Author

dlew commented Apr 8, 2014

A thought: if you're alright with it, we could port Android's Base64 over and use that (to minimize work of re-implementing base64 encoding). It's also licensed under Apache 2.0.

@jodastephen
Copy link
Member

I'd be happy to see a pull request to replace the base64 use with a package scoped utility class. I don't want to add any dependencies on other projects however. Ideally, I'd like to have all the code in Joda-Convert under my own copyright for simplicity (which preludes simply porting code owned by someone else without their permission).

@dlew
Copy link
Author

dlew commented Apr 9, 2014

Excuse my ignorance, but what difficulties are introduced by using code from another copyright (but is open sourced)?

@jodastephen
Copy link
Member

Those companies that examine projects look more deeply when there are multiple licenses involved - its not just Apache 2 that matters, but the copyright notices. It also prevents me from upgrading the code to a different license, say a future Apache 3. It would just be nicer to have a from-scratch implementation, but perhaps we have to start by copying code from Apache Commons.

@tomball
Copy link

tomball commented Aug 24, 2015

Does the output have to be Base64? I can't find an output format specified anywhere. If it doesn't matter, would your org.joda.convert.factory.ByteObjectArrayStringConverterFactory work? It's not as compact a format, but already meets your authorship/license requirements.

@jodastephen
Copy link
Member

I've implemented a Base64 encode/decode

@tomball
Copy link

tomball commented Aug 30, 2015

Thanks! It helps iOS users, too:

$ j2objc -d /tmp/joda -classpath ~/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar -sourcepath src/main/java `find src/main/java -name *.java`
translating src/main/java/org/joda/convert/AbstractTypeStringConverter.java
translating src/main/java/org/joda/convert/AnnotationStringConverterFactory.java
translating src/main/java/org/joda/convert/EnumStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/BooleanArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/BooleanObjectArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/ByteObjectArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/CharObjectArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/NumericArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/factory/NumericObjectArrayStringConverterFactory.java
translating src/main/java/org/joda/convert/FromString.java
translating src/main/java/org/joda/convert/FromStringConverter.java
translating src/main/java/org/joda/convert/FromStringFactory.java
translating src/main/java/org/joda/convert/JDKStringConverter.java
translating src/main/java/org/joda/convert/MethodConstructorStringConverter.java
translating src/main/java/org/joda/convert/MethodsStringConverter.java
translating src/main/java/org/joda/convert/ReflectionStringConverter.java
translating src/main/java/org/joda/convert/RenameHandler.java
translating src/main/java/org/joda/convert/StringConvert.java
translating src/main/java/org/joda/convert/StringConverter.java
translating src/main/java/org/joda/convert/StringConverterFactory.java
translating src/main/java/org/joda/convert/ToString.java
translating src/main/java/org/joda/convert/ToStringConverter.java
translating src/main/java/org/joda/convert/TypedAdapter.java
translating src/main/java/org/joda/convert/TypedStringConverter.java
translating src/main/java/org/joda/convert/TypeStringConverter.java
translating src/main/java/org/joda/convert/TypeTokenStringConverter.java
Translated 26 files: 0 errors, 0 warnings

There are a few test failures, which are likely due to problems with j2objc's JRE emulation.

@advayDev1
Copy link

@jodastephen would it be possible to get an official release on Maven Central with this fix 962dd4c?

We are trying to get joda-convert easily usable in Gradle projects shared across Android and iOS, and this commit is currently the blocker:
https://travis-ci.org/j2objc-contrib/j2objc-common-libs-e2e-test/jobs/82347638

Thanks!

@brunobowden
Copy link

@jodastphen - Thanks for your work on this. Can I echo the request from @advayDev1 for an official release with the fix. This'll make it much easier to use it on iOS using Google's J2ObjC (Java to Objective-C translator).

@brunobowden
Copy link

Corrected name:

@jodastephen - Thanks for your work on this. Can I echo the request from @advayDev1 for an official release with the fix. This'll make it much easier to use it on iOS using Google's J2ObjC (Java to Objective-C translator).

@jodastephen
Copy link
Member

v1.8 released

@brunobowden
Copy link

@jodastephen - thanks for the new release.

@advayDev1 - let's give this a whirl...

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants