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

Make SizeUnit more flexible #1380

Merged
merged 2 commits into from
Dec 14, 2015
Merged

Make SizeUnit more flexible #1380

merged 2 commits into from
Dec 14, 2015

Conversation

mattnelson
Copy link
Contributor

Support case insensitive SizeUnit suffixes.
Support all single letter SizeUnit suffixes.

.put("terabytes", SizeUnit.TERABYTES)
.build();

final TreeMap<String, SizeUnit> treeSuffixes = Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply use an ImmutableSortedMap in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a better idea, updated 29c1bb1

@jplock jplock added this to the 1.0.0 milestone Dec 12, 2015
@joschi
Copy link
Member

joschi commented Dec 14, 2015

LGTM. Thanks!

joschi added a commit that referenced this pull request Dec 14, 2015
Add single letter acronyms to `SizeUnit`.
@joschi joschi merged commit 9044d44 into dropwizard:master Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants