Commit Graph

17 Commits

Author SHA1 Message Date
Michael Bayne 3f6dd111c8 Provide Depot connection providers. 2015-02-10 14:47:36 -08:00
Ray J. Greenwell c98e7a86ee MultisetUtil.
Originally lived in projectx and had a bunch more interesting stuff.
But the code that used it (gates, minerals, themes) went away because
all that mineral stuff went away.

Kept what's still in use.  In particular, singleton() is quite useful
(really, Google should add it to Multisets or ImmutableMultiset).

The count ordering stuff is perhaps semi-deprecated, since Google has
added Multisets.copyHighestCountFirst().
2015-01-29 15:55:13 -08:00
Jamie Doornbos f490642f3d Fix javadoc. 2014-11-17 11:25:31 -08:00
Ray J. Greenwell e2820c1b49 I didn't end up using these imports. 2014-05-08 15:06:00 -07:00
Ray J. Greenwell 056701ae6d Added a static method to turn a Map<?, ?> straight into a query string.
Sometimes we have a Map already built via other methods, and there's
really no reason to copy each key/value into a Multimap prior
to encoding them.

Accept a Map<?, ?> and just take the small extra step of toStringing
every key and value, otherwise we'd have to transform the map
values and that's a bunch of extra wrapping.
2014-05-08 15:02:45 -07:00
Ray J. Greenwell b7b9d0b1e5 Don't 'throw' on a translation formatting problem.
Translations are sometimes done by third parties long after
development is done. A runtime exception is not appropriate
here. Return what we can and log extensively.

This was noticed when "{0 }" was written instead of "{0}".
2014-01-02 14:24:11 -08:00
Ray J. Greenwell 15b75d1e56 Add addAll(Map<?, ?). 2013-04-30 22:41:47 -07:00
Ray J. Greenwell e5dbb27da2 Bugfix when the parent bundle is missing.
When I had added this feature I verified that it would be OK to look up
a non-existant bundle, and even added a little note in the code.
But, it's the ResourceBundle that will be null, a MessageBundle
is always returned. And so, when it tried to initialize that bogus
MessageBundle and recursed into this same patch of code, the newly
added check for __parent would cause an NPE.
2013-03-22 16:28:24 -07:00
Ray J. Greenwell 24c7dcc7f1 Allow message bundles to specify a parent bundle with the key '__parent'. 2012-02-21 15:19:42 -08:00
Michael Bayne 9936513cd5 Moved database-utils utilities herein.
This is a find home for them, and it allows the miniscule database-utils to go
away.
2012-01-31 09:43:47 -08:00
Ray J. Greenwell 8fd065c9c1 Use guava 11.0
Cache -> LoadingCache
2011-12-19 17:54:23 -08:00
Michael Bayne b3b2ca4926 Make the Log holders package-only.
They're an implementation detail, not an exported public API. It would be nice
if Java allowed for package-plus-subpackage visibility.

I'm tempted to just use a Log class per-package across the board, which would
allow one to omit the import and use Log.log.info() which isn't half bad. It's
certainly better than adding a static Logger field to every single class that
uses logging, which is the "best practice" used by every other Java developer
in the world.
2011-10-05 15:56:59 -07:00
Michael Bayne 07c5207f87 Get the Log class out of com.threerings. That's too general a package to be
sticking classes into.
2011-10-05 15:56:59 -07:00
Michael Bayne d24c15cd7d Missed a spot. 2011-10-05 10:17:28 -07:00
Michael Bayne 6a9d8fb77c Migrated some utility bits from Narya. 2011-10-05 10:12:37 -07:00
Michael Bayne 0b6ad67311 Reheadered. 2011-10-05 10:11:28 -07:00
Michael Bayne 6ab4205054 A place for OOO utilities.
Presently we have some servlet bits from threerings, but shortly I'll be
pulling most of Narya's util package herein.

This is a public library, so we don't want hopelessly threerings-specific
things in there (put those in the newly slimmed down threerings library). What
we can do is rely on Guava, which is what keeps useful things out of samskivert
and often pushes them into weird places like Narya.

What we can also do is use ooo-util to export the latest version of samskivert
and Guava to all of our other projects. A project that relies on the latest
snapshot of ooo-util can expect to have the latest snapshot of samskivert and
Guava, and when either samskivert or Guava ships a versioned release, we'll
ship a versioned release of ooo-util so that projects can bump to that release
to obtain the latest transitive depends.

We should stronly resist the addition of additional depends to this library,
unless they are indisputably useful to every single library and project in the
whole wide world. Guava made that cut a long while back, and samskivert lingers
with us like an embarrassing uncle, but I don't imagine another universally
useful library is likely to come along in this decade. But if it does, we've
got a place to put it.
2011-10-05 09:55:15 -07:00