ray.j.greenwell
e6970e1c91
Via Nathan Curtis: A method on Builder to set the TimeZone.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2747 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-11 22:03:26 +00:00
samskivert
acb2fffb0a
Beans frank.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2746 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 16:26:11 +00:00
samskivert
0468902779
Widened, untabified, added equals() and hashCode() implementation to
...
SynchronizedIntSet.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2745 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 01:17:23 +00:00
samskivert
d4678372be
This must be some leftover C-ism because (x & 0xffffffff) == x for int
...
variables.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2744 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 01:09:39 +00:00
samskivert
82a664c879
Use unsigned shift to avoid breakage on overflow.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2743 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 01:03:32 +00:00
samskivert
fc638663eb
Untabify.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2742 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 01:01:47 +00:00
samskivert
ad3736e055
Be more specific about what we catch.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2741 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 01:01:11 +00:00
samskivert
b4c32aeb84
Simplify, cope with nulls.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2740 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:59:54 +00:00
samskivert
420df91056
More FindBugs inspired hygeine.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2739 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:53:15 +00:00
samskivert
9d9b5a5649
We don't actually want an inner class here with its outer this pointer and
...
ability to implicitly call methods on its outer class. We just need a static
wrapper.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2738 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:48:14 +00:00
samskivert
726aec37ed
We don't use or need the integer codes in our policy and justification constant
...
objects.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2737 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:42:22 +00:00
samskivert
4da25bc39b
Use a string builder.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2736 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:40:16 +00:00
samskivert
fa938b847f
Small rearrangement.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2735 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:40:07 +00:00
samskivert
0aeab762aa
Untabified. Made some string building use StringBuilder.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2734 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-10 00:39:37 +00:00
samskivert
b8b9a0d70a
Nixed some manual boxing.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2733 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 22:46:51 +00:00
samskivert
3339b6707e
These inner classes should be static. In the case of IntIntMap this was a big
...
fat waste of four bytes per map entry. Whoops.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2732 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 22:40:49 +00:00
samskivert
f44c51555e
NOOP--.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2731 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 22:38:29 +00:00
samskivert
23d8fc9876
Fun fact: SimpleDateFormat is not thread safe (apparently all DateFormat
...
implementations are noted in the docs as not thread safe). I specifically
verified that parse() mutates internal fields.
Since ParameterUtil is *designed* to be called by servlets which naturally run
on multiple threads, we need to be careful here to avoid getting bogus results.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2730 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 22:35:56 +00:00
samskivert
c9598b3110
More finality.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2729 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:29:01 +00:00
samskivert
ddd0b0b72a
Untabifying, widening, nixed wacky client version parsing.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2728 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:22:40 +00:00
samskivert
053d4c6196
This can be static final as well.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2727 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:16:52 +00:00
samskivert
28a48351fa
Introduce some finality.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2726 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:16:12 +00:00
samskivert
9cf8d22e1d
Unwrap, use Map.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2725 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:15:50 +00:00
samskivert
2f912d7068
ClassLoader creation apparently must be run as a privileged action so that if
...
unprivileged code calls into privileged code, the security manager "does the
right thing" (I'd explain this better if I understood it better).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2724 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 21:08:37 +00:00
samskivert
7829ca78dc
Properly close streams.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2723 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:57:07 +00:00
samskivert
033c67d81b
Make sure we close our stream.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2722 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:47:54 +00:00
samskivert
8be87e9412
More Comparable reduction. Made node final in NodeInfo.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2721 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:45:39 +00:00
samskivert
d5de5dc997
Comparable -> Comparator. private -> protected.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2720 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:39:47 +00:00
samskivert
add2871199
To make something Comparable implies that you could do something like stick it
...
into a collection that keeps things sorted. Doing so without implementing
hashCode() and equals() is a recipe for breakage. Instead we'll just define a
comparator that does the one sorting we need, and use that, rather than give
the wrong impression.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2719 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:32:45 +00:00
samskivert
cf7f3a582c
We don't need to manually finalize things here.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2718 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:28:17 +00:00
samskivert
43a06a8acd
Ignoring exceptions is naughty.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2717 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:26:40 +00:00
samskivert
654596a619
Added instanceof checks to equals().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2716 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:25:01 +00:00
samskivert
c9a12f1b3e
Eliminate check for impossible nullness.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2715 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:21:55 +00:00
samskivert
d25492df43
Break not if getSourceClassName() is null.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2714 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:20:07 +00:00
samskivert
c7e16e52b3
Correct and easier to read.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2713 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:14:44 +00:00
samskivert
09d98be8d7
Avoid NPE.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2712 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:13:01 +00:00
samskivert
3a0f8e3fc2
Less wacky.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2711 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-02-09 20:11:43 +00:00
ray.j.greenwell
9b602fd73e
This inferCaller() isn't used, but let's at least format it with spaces instead of tabs.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2710 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-27 21:42:23 +00:00
ray.j.greenwell
2d0625ee75
A sample usage of @ReplacedBy.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2709 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-21 00:52:54 +00:00
ray.j.greenwell
28b9755e3b
Ye olde experiment.
...
I am starting to prefer things in the guava library when there are
equivalents. I've been wondering what we want to do about informing
people about the changes. Something more interesting will happen,
because I want a place to put useful bits of code built atop guava,
and that's not samskivert, at least not now.
So anyway, here's a lighter-weight @Deprecated sorta annotation.
It can be used to indicate methods that have a replacement in guava
(or new stuff in the standard java libraries). It will show up
in the javadocs. Let's see how it looks.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2708 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-21 00:52:21 +00:00
ray.j.greenwell
b09afabba8
Formatting, annotations, and other pedantry from Dave Hoover.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2707 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 21:59:57 +00:00
ray.j.greenwell
0534e40a60
Correctly return the new count from add().
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2706 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 21:56:20 +00:00
ray.j.greenwell
efad5d31f6
Same speed, but create our Entry instead of the int[].
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2705 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-18 09:56:06 +00:00
ray.j.greenwell
c48106695a
Ok, Charlie Groves has done a good job convincing me I'm crazy, but I'll
...
check this in anyway, at least for posterity.
The advantages over the 'CountingMap' (currently in yohoho):
- Faster, because adding to a count doesn't add to a boxed int, nor does
it hash twice (except on the intial use of a particular key).
The disadvantages:
- More complicated implementation (CountingMap builds upon google
collections)
- If a non-HashMap is desired, the fact that the underlying map is
<K, int[]> is exposed.
- When iterating over the entrySet, each entry is a new object
created solely for your iteration.
So.. yeah. I'll check it in. Maybe I'll blow it away. We should
probably think about how samskivert will move forward- do we want to
depend on google-collect or guava? Do we want to deprecate huge
swaths of this library in preference to those? A lot of what's
in here is a bit outdated, but maintained to support code built
atop it.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2704 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-16 03:00:23 +00:00
ray.j.greenwell
74d5d82704
Buh-bye.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2703 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-15 01:49:15 +00:00
ray.j.greenwell
2a6397ddcb
I'm just going to commit these for posterity, but I'll remove them.
...
Hell, maybe I should remove IntSets.java too.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2702 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-15 01:48:57 +00:00
ray.j.greenwell
e0e2f1cf7d
AbstractCollection's isEmpty() calls size(). We can often do better:
...
- Provide an implementation in AbstractIntSet that checks the interator
for at least one element.
- Override that in ArrayIntSet so that we're just checking our size again.
- Added optimized isEmpty()s for a few of the inner classes in IntSets.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2701 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-14 21:25:52 +00:00
ray.j.greenwell
8f24b4a8b8
Nix redundant cast.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2700 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:57:22 +00:00
ray.j.greenwell
f731c7b406
Nix redundant cast.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2699 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:53:15 +00:00
ray.j.greenwell
05d562387c
Added getProbability(), from Dave Hoover.
...
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2698 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2010-01-13 18:34:15 +00:00