Havoc Pennington
d32ba9aee8
add tests for resolving mutually-referring objects
2012-02-25 10:31:45 -05:00
Havoc Pennington
7ed9eee67e
add test coverage on ConfigDelayedMerge render(), relativized()
2012-02-25 00:17:21 -05:00
Havoc Pennington
fb17706961
add check to SimpleConfigList that resolveStatus is correct
2012-02-24 23:49:43 -05:00
Havoc Pennington
7844f13dfa
Maintain SimpleConfigObject.resolveStatus when adding/removing keys
...
withOnlyKey, withoutKey were buggy and didn't correctly update the
resolved status.
2012-02-24 23:47:51 -05:00
Havoc Pennington
a59e31f744
Redo substitution resolving to better handle complex cases.
...
The main idea of this patch is to introduce "partial resolution"
which means resolving only the minimum branch of the object tree
to get to a desired value. By using partial resolution whenever
possible, more interdependencies between substitutions are permitted.
ConfigDelayedMergeObject was a big problem because a lot of the
code in AbstractConfigObject really didn't work on it, because
it assumed a resolved object; much of that code now moves down
to SimpleConfigObject.
2012-02-24 23:22:25 -05:00
Havoc Pennington
021a958a93
Add a set of failing tests involving resolve() and ConfigDelayedMerge, ConfigDelayedMergeObject
2012-02-24 19:36:06 -05:00
Havoc Pennington
d946c794ef
ConfigSubstitution was missing serialVersionUID. Fix.
2012-02-24 17:26:30 -05:00
Havoc Pennington
982dee4047
switch from lift-json 2.4-SNAPSHOT to 2.4
2012-02-24 16:53:54 -05:00
Havoc Pennington
3051608186
add withOnlyKey, withOnlyPath, withoutKey, withoutPath methods
...
These allow easily pruning a Config or ConfigObject.
Previously would have required some sort of tedious recursive
copying of the nodes in the tree.
2012-02-20 11:15:20 -05:00
Havoc Pennington
71d209070a
add some missing serialVersionUID
...
All the most-derived classes need to have it, not just base classes.
Update expected serializations in the tests to reflect new serialVersionUID.
2012-02-20 11:13:49 -05:00
Havoc Pennington
dc2f52aa24
Merge branch 'serializable'
2012-02-09 13:46:10 -05:00
Havoc Pennington
4979b1345f
Merge pull request #4 from brianm/typesafe-master
...
update readme to include information about unofficial releases in maven central
2012-02-09 10:45:47 -08:00
Brian McCallister
093c19ee0e
update readme to include information about unofficial releases in maven central
2012-02-09 10:23:27 -07:00
Havoc Pennington
fdd3eeec16
correct javadoc that claimed Config had a Map interface
2012-02-09 08:57:26 -05:00
Havoc Pennington
682fdbf772
fix a syntax glitch in ConfigFactory.load javadoc
2012-02-09 08:44:36 -05:00
Havoc Pennington
190bf12ebf
add serialVersionUID to serializable classes
...
Also add tests to detect any incompatible change in serialization
format, to be sure such changes are deliberate.
2012-02-06 17:46:03 -05:00
Roland
277e4ca3a2
update copyright headers for 2012
2012-02-03 14:56:54 +01:00
Havoc Pennington
ab4edcfaf8
When serializing lists, convert to LinkedList
...
ArrayList and emptyList() don't seem to serialize correctly on JDK 1.6.0 betas.
Unknown which other JDKs are affected.
Speculating that the problem is http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6446627
2012-02-01 12:56:26 -05:00
Havoc Pennington
2d8e42686c
Make concrete Config and ConfigValue serializable
2012-02-01 12:15:05 -05:00
Havoc Pennington
846c8c116a
put back SNAPSHOT after 0.2.1
2012-01-20 18:50:40 -05:00
Havoc Pennington
2c8bf3be7e
v0.2.1
2012-01-20 18:50:09 -05:00
Havoc Pennington
bda507b474
Fix behavior of ${?} optional substitution overriding a field
...
The broken behavior was:
foo=10
foo=${?bar}
where 'foo' should be 10 if bar is undefined, but instead
ended up undefined. Now, foo will be 10 (which was the
documented behavior).
2012-01-20 18:37:07 -05:00
Havoc Pennington
8422f34f51
add -SNAPSHOT back after 0.2.0 release
2011-12-14 10:08:39 -05:00
Havoc Pennington
b89e263eb6
v0.2.0
2011-12-14 10:08:07 -05:00
Havoc Pennington
5302c1e90e
remove a nonsense comment from Tokenizer.java leftover from earlier patch iteration
2011-12-13 18:34:29 -05:00
Havoc Pennington
c5028bca3d
Throw BugOrBroken if a ValidationFailed is created with no problems
...
Reported by Max in blog comments, thanks.
2011-12-13 18:33:59 -05:00
Havoc Pennington
516b38f44a
Track the comments preceding a setting in the ConfigOrigin for the value.
...
The rule is that any block of comments uninterrupted by another token
or blank line, goes with the following array element or object field.
The comments are shown in the output of ConfigValue.render().
They are also available in the ConfigOrigin API for custom use.
Comments that don't precede an array element of object field
get discarded, they are not available anywhere.
2011-12-13 16:47:21 -05:00
Havoc Pennington
59a2d8d0df
try to fix rendering of bullet list in API docs README section
2011-12-10 09:30:41 -05:00
Havoc Pennington
1f3c19f029
discuss withFallback in the README
2011-12-10 09:12:35 -05:00
Havoc Pennington
456535327e
some minor docs tweaks
2011-12-09 16:35:26 -05:00
Havoc Pennington
0cb0a8e072
add doc comment to ConfigUtil
2011-12-09 15:50:53 -05:00
Havoc Pennington
a5c78e4f92
link to API docs
2011-12-09 15:48:46 -05:00
Havoc Pennington
45881d4e9d
update link to the maven repo
2011-12-09 10:22:17 -05:00
Havoc Pennington
69ce27d46f
post-release add -SNAPSHOT
2011-12-09 10:21:20 -05:00
Havoc Pennington
19a05b1b2e
v0.1.8 release
2011-12-09 10:21:04 -05:00
Havoc Pennington
6991862def
add ConfigUtil.joinPath, .splitPath, .quoteString
...
To help people get their escaping and quoting right.
2011-12-09 10:20:02 -05:00
Havoc Pennington
aa8a258b59
throw proper ConfigException if EOF occurs before a ${} token ends
...
It was throwing because -1 was passed to a %c format string
2011-12-09 10:12:01 -05:00
Havoc Pennington
694dd9bef5
rename ConfigUtil to ConfigImplUtil
...
Because I want to add a public ConfigUtil class.
2011-12-09 09:46:14 -05:00
Havoc Pennington
46c6d639b5
set crossPaths := false to avoid Scala version on publish
...
Since it's a plain Java project, the Scala version is not wanted.
2011-12-09 09:41:50 -05:00
Havoc Pennington
16622f74cb
link to the published binaries in README
2011-12-09 08:57:42 -05:00
Havoc Pennington
10e61d1bcd
remove a check for a null in fromBasename that no longer happens
2011-12-07 09:26:57 -05:00
Havoc Pennington
0582f33d94
when AnySyntax finds nothing, concat all the exception messages
...
previously we were discarding these which could be bad if one
of them was a weird IO problem of some kind.
2011-12-07 09:25:17 -05:00
Havoc Pennington
c90f46cf78
change to 0.1.7-SNAPSHOT post-release
2011-12-07 09:12:51 -05:00
Havoc Pennington
db4517cced
0.1.7
2011-12-07 09:12:14 -05:00
Havoc Pennington
b13f1fbe88
Fix allow missing for the AnySyntax parse methods, issue gh-1
...
This fix could in theory go further and Parseable.relativeTo
could return a ParseableNotFound instead of null, but for now
eliminate null from within ConfigImpl at least.
2011-12-07 09:08:43 -05:00
Havoc Pennington
002fd53e8e
in tokenizer precompute the lineOrigin
...
We know we need it on every line now because we use it for the newline token.
So no advantage to doing it on-demand. Better to share among all tokens on the line.
2011-12-06 15:11:17 -05:00
Havoc Pennington
81a4fe63f9
start fixing Token hierarchy by factoring origin() up to base class
2011-12-06 15:04:13 -05:00
Havoc Pennington
7d13a00f7d
remove usage of Tokens.newReservedChar preventing compilation
...
I didn't notice this before because apparently I had to 'clean' to see it
2011-12-06 14:57:37 -05:00
Havoc Pennington
59a7012bc1
back to -SNAPSHOT after 0.1.6 release
2011-12-06 10:10:49 -05:00
Havoc Pennington
c6124a1ecd
0.1.6
2011-12-06 10:10:35 -05:00