This shouldn't be exposed. Internal classes switch to using
the full class rather than the interface, so they can carry
on accessing the removed methods.
Stop swimming against the tide and accept what most of the rest of
the world does.
While it adds an annoying depth to the actual source code, it makes
the root directory nicer (no more 'test-res' dirs), means we don't
have to override the gradle config, and makes it nicer to work in
IDEA 2016.1.
Handle errors when creating defaults dirs properly
If we can't create the defaults directory it's a Very Bad Sign™, and
we should bail out immediately. It probably means the user is running
from a directory they don't have write access to, and if we can't
write defaults then the client isn't going to work very well at all.
Previous behaviour tried to carry on and failed a precondition check
and died even more painfully.
Change-Id: Id72fb63c014939ac384ee03b9eb0f14baf6e18fe
Fixes-Issue: CLIENT-488
Reviewed-on: http://gerrit.dmdirc.com/3335
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Make the IdentityManager responsible for adding the initial
identities to a ConfigManager.
Change-Id: I91520e208b06d40385729b4d7adee8bb7f1141cb
Reviewed-on: http://gerrit.dmdirc.com/3083
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
This allows things to create ConfigManagers without being exposed
to the underlying implementation.
Change-Id: I50e916909d83c6bd95dfbd1d61c446caade3ec02
Reviewed-on: http://gerrit.dmdirc.com/3079
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Use Guava's Preconditions instead, which throw appropriate exceptions
rather than AssertionErrors (whose idea was that?!)
Also fix weirdness in CommandArguments where start was allowed to be
1 greater than end when getting words.
Change-Id: Icce38e36da6507f645fb8b3b872dfe2c60c43ea7
Reviewed-on: http://gerrit.dmdirc.com/2961
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Build Manager
Introduces a ConfigProviderMigrator interface, which allows
migration of a ConfigProvider. This allows the owner of
the provider to migrate it, and pass around an instance,
while prevent any other user accidentally migrating it.
e.g. Server can own a ConfigProviderMigrator, and only
expose the inner ConfigProvider, so noone else can migrate
it to a different target.
Change-Id: I2a78947f60ba42c6877433c897ef458cead6a3e3
Fixes-Issue: CLIENT-408
Reviewed-on: http://gerrit.dmdirc.com/2828
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>
Move static factory methods into IdentityFactory, and replace
almost every use of Identity with ConfigProvider.
Depends-On: I6a32f3592cb5fc3df99a23eee62ae961ce0fc143
Change-Id: I66b382d54b77ef030d88448e456a83eb98aca216
Reviewed-on: http://gerrit.dmdirc.com/2777
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Greg Holmes <greg@dmdirc.com>