Commit Graph

2727 Commits

Author SHA1 Message Date
samskivert 9ba1410a46 Allow code that already has a reader to rock right on as well.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2587 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 20:55:37 +00:00
samskivert 5c46986b00 I grow tired of having a commons-io dependency (and all the crap that comes
along with it just to have essentially two methods:

copy(InputStream,OutputStream) and toString(InputStream)

We'll just duplicate those ten lines of code and save a dozen of our libraries
some trouble. This is a precursor to a possible Velocity jihad because Velocity
is pissing me off by not working because of some bullshit classloader
tomfoolery that is the sort of thing that makes Java programmers want to jump
butt first off the building.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2586 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-12 20:52:39 +00:00
samskivert 96f48149a2 Patch from Dave to avoid potential disaster when Java decides remove(Integer)
should mean a call to remove(Object) instead of unboxing the integer and
calling remove(int). Beware bogus boxing.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2585 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 23:40:11 +00:00
samskivert 8296003607 As Dave points out (or perhaps Dave's Eclipse), we're implementing an IntSet
method here not overriding an AbstractSet method here.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2584 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 23:13:49 +00:00
samskivert 297466ec29 Factored some bits into AbstractIntSet, added keySet() to IntIntMap.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2583 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-10 22:45:48 +00:00
samskivert 18acdb2401 Check for circular dependency of very small diameter, from Mike T.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2582 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-07-07 18:32:55 +00:00
samskivert 2f35801566 Provide a constructor that allows the class loader used to load the properties
files to be supplied. I'm amazed I haven't needed this sooner. Clearly I
haven't been doing enough class loader jockeying in the last decade.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2581 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-30 21:28:56 +00:00
samskivert 999c17a4fb An operation that automatically closes all opened statements when it completes.
Courtesy of Mr Groves.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2580 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-23 23:05:06 +00:00
samskivert 4092913008 Nixed unused imports.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2579 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 23:51:56 +00:00
samskivert a7fff912ff Need to quote that. Oh how we love primitive database technologies.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2578 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 19:52:41 +00:00
samskivert 972c741ae3 Sessions don't need integer ids. We can just pretend like they're not there and
this code will work equally well on our existing sessions tables and new ones
that have no sessionId.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2577 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-22 18:26:44 +00:00
samskivert 62a87561ea Patch from Charlie to extract Logger.format into LogBuilder class.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2576 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-12 21:29:20 +00:00
samskivert 406600dc87 Use a safer compare().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2575 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-09 18:42:31 +00:00
samskivert 75a28c890c Patch from Dave to genericize ShortestPath.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2574 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-09 18:36:20 +00:00
samskivert f3710b7367 More tidying from Dave.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2573 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-09 18:10:31 +00:00
samskivert 31da661a18 Patch from Dave to make requestCompleted() final and to add a retype() method.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2572 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-09 05:30:48 +00:00
ray.j.greenwell 17d7492248 Added limit(), which will retain up to the first N elements of a Collection
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2571 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 23:10:33 +00:00
samskivert ed70c50606 Route dirty marking through a method. We'll skip the whold FieldMask business
elsewhere.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2570 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 21:20:45 +00:00
samskivert 816939e1e2 Allow a mask to be created using just an array of names.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2569 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 21:12:22 +00:00
samskivert 479919a60f Let's report something useful in these error messages.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2568 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 20:58:11 +00:00
samskivert a118198a37 Widening, made getDirtyMask() public.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2567 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 18:44:40 +00:00
ray.j.greenwell 3a38984b08 We know exactly how big this ArrayList will be, so let's be efficient.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2566 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-04 18:27:48 +00:00
samskivert 74df35d0e5 Added a target for running a subset of the unit tests.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2565 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-06-02 20:36:06 +00:00
samskivert 2537eba304 Hey, we can quote identifiers with backticks in MySQL. Yay!
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2564 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-28 22:34:27 +00:00
samskivert 3aee24ecdc Fix javadoc.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2563 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-28 22:34:14 +00:00
samskivert 04637df95c Some small enhancements from Mark.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2562 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-28 00:13:22 +00:00
samskivert 926f242b32 Some sanity checking.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2561 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-27 22:19:07 +00:00
samskivert 38f1ab2e1e Allow ShutdownComponent to be registered after init() has been called.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2560 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-27 22:06:48 +00:00
samskivert 68900548c1 Lifecycle management helper classes.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2559 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-27 19:15:18 +00:00
samskivert 933c486986 Make Strings more like Options.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2558 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-26 22:21:21 +00:00
ray.j.greenwell b759dcad7d We must assign the _size when setting the array like this.
Also: added duplicate-removing code to preserve Set-ness.
Suddenly this is all looking like a "code-weirding" optimization.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2557 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-13 00:57:39 +00:00
samskivert a0e960449c When constructing a set with an array of values, copy and sort the array rather
than doing individual add()s.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2556 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-12 17:21:28 +00:00
ray.j.greenwell ee688973dd Don't freak out if we were constructed with an initial capacity of
zero (or a zero-length array) and we need to grow.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2555 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-08 21:50:17 +00:00
samskivert 2f7e060653 Added getParameterNames() to avoid distasteful interactions with untyped
Enumerations.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2554 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-06 20:38:05 +00:00
samskivert cbf7153a5c The base invoker no longer tracks units run.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2553 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-04 23:45:41 +00:00
samskivert f9f1d3a567 Configure all log handlers to use UTF-8 instead of the JVM's default encoding.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2552 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-04 23:44:34 +00:00
samskivert 75727e6daa Widening.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2551 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-04 23:42:45 +00:00
samskivert 2247e7d0a0 Various cleanuppery: added containsKey(), deprecated contains(), added
getOrElse() and removeOrElse() and encourage their use in the class
documentation (I was tempted to deprecate get() and remove() but I think that's
going too far).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2550 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-05-04 00:26:44 +00:00
samskivert 5b1328e768 We never throw PersistenceException here.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2549 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-23 23:08:25 +00:00
ray.j.greenwell 1ba33b7e5d mdb suggests this approach.
Seems fine, even if this is the only method ever in this class.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2548 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-22 22:05:13 +00:00
ray.j.greenwell 7cfc28d378 A Callable that just returns some Value.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2547 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-22 21:44:49 +00:00
ray.j.greenwell 2b18264feb Small stupid optimization I had lying around.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2546 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-22 21:36:53 +00:00
samskivert 2b9952508c Oops. Can't do that.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2545 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-17 22:58:36 +00:00
samskivert a04031f38f Allow 1.6 source but continue to target 1.5 bytecode.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2544 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-17 22:50:48 +00:00
samskivert 262ad342ae No need for this to be JComponent, just Component will do (from Charlie).
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2543 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-04-02 18:33:45 +00:00
samskivert 05204558eb Let's also add asList() doing Arrays.asList(IntListUtil.unbox()) is annoying.
This is not as efficient as it could be (it doesn't create a List backed by the
int[], instead it creates an ArrayList).


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2542 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-03-25 23:41:43 +00:00
samskivert 830cf8de5c Added an unbox() method that take an Integer collection.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2541 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-03-25 23:37:06 +00:00
samskivert 0629367932 - Thread.dumpStack() -> log.warning(..., new Exception())
- Cleaned up a couple of incorrect javadoc references.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2540 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-03-24 18:50:29 +00:00
samskivert 44ad7fce50 As Charlie points out, we do still want to complain if you ask to load
inherited properties for a path that matches no properties files at all.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2539 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-03-16 21:14:41 +00:00
samskivert 86ab90e042 Nix Tomcat 3.3 bug workaround, use foreach in a couple of spots.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2538 6335cc39-0255-0410-8fd6-9bcaacd3b74c
2009-03-13 22:43:28 +00:00