Mercurial > jhg
diff src/org/tmatesoft/hg/util/CancelSupport.java @ 423:9c9c442b5f2e
Major refactoring of exception handling. Low-level API uses RuntimeExceptions, while checked are left for higher level
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 23 Mar 2012 22:51:18 +0100 |
parents | 91d75e1bac9f |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/CancelSupport.java Fri Mar 23 21:26:01 2012 +0100 +++ b/src/org/tmatesoft/hg/util/CancelSupport.java Fri Mar 23 22:51:18 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 TMate Software Ltd + * Copyright (c) 2011-2012 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,10 +47,11 @@ if (cs != null) { return cs; } - return new CancelSupport() { + class NoCancel implements CancelSupport { public void checkCancelled() { } }; + return new NoCancel(); } public static CancelSupport get(Object target, CancelSupport defaultValue) {