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

Refactoring internal API to use modern Java APIs #889

Merged
merged 6 commits into from
Nov 17, 2014

Conversation

garcia-jj
Copy link
Member

Hashtable is too old and its prefered to use HashMap. Has no reason to use Hashtable here. And GsonDeserializer can use Charset instead of String charset name, that is preferable in Java 6+.

Plus: some minor changes that violates JLS like transient values stored into serializable objects, possible InputStream leaks, comparators without serialization, and more.

Hashtable is too old and its prefered to use HashMap instead Hashtable. Has
no reason to use Hashtable here. And GsonDeserializer can use Charset
instead of String charset name, that is preferable in Java 6+.
According JLS all comparators should implements Serializable and
overriding equals and hashcode methods.
Because I18nParam class is stored in a serializable class, so must be
serializable too.
@garcia-jj garcia-jj changed the title Using modern Java APIs Refactoring internal API to use modern Java APIs Nov 17, 2014
garcia-jj added a commit that referenced this pull request Nov 17, 2014
Refactoring internal API to use modern Java APIs
@garcia-jj garcia-jj merged commit 414fb6f into master Nov 17, 2014
@garcia-jj garcia-jj deleted the ot-usingmodernapis branch November 17, 2014 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant