Mercurial > jhg
comparison src/org/tmatesoft/hg/repo/HgLookup.java @ 622:4e6179bde4fc
Update to comply with Java 1.5 target
| author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
|---|---|
| date | Mon, 20 May 2013 16:56:40 +0200 |
| parents | 7c0d2ce340b8 |
| children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
| 621:99ad1e3a4e4d | 622:4e6179bde4fc |
|---|---|
| 116 } | 116 } |
| 117 if (url == null) { | 117 if (url == null) { |
| 118 String server = null; | 118 String server = null; |
| 119 if (hgRepo != null && !hgRepo.isInvalid()) { | 119 if (hgRepo != null && !hgRepo.isInvalid()) { |
| 120 PathsSection ps = hgRepo.getConfiguration().getPaths(); | 120 PathsSection ps = hgRepo.getConfiguration().getPaths(); |
| 121 server = key == null || key.trim().isEmpty() ? ps.getDefault() : ps.getString(key, null); | 121 server = key == null || key.trim().length() == 0 ? ps.getDefault() : ps.getString(key, null); // XXX Java 1.5 isEmpty() |
| 122 } else if (key == null || key.trim().length() == 0) { | 122 } else if (key == null || key.trim().length() == 0) { |
| 123 throw new HgBadArgumentException("Can't look up empty key in a global configuration", null); | 123 throw new HgBadArgumentException("Can't look up empty key in a global configuration", null); |
| 124 } | 124 } |
| 125 if (server == null) { | 125 if (server == null) { |
| 126 server = getGlobalConfig().getSection("paths").get(key); | 126 server = getGlobalConfig().getSection("paths").get(key); |
