summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "ObjectDirectory: Add pack directory getter"David Pursehouse2017-11-1411-18/+22
|\
| * ObjectDirectory: Add pack directory getterHector Caballero2017-11-1411-18/+22
| | | | | | | | | | | | | | | | | | | | So far, in order to get the pack directory it was necessary to resolve it from the object directory. This resolution is already done when creating the object directory, so simplify the call by just adding a getter to the pack directory. Change-Id: I69e783141dc6739024e8b3d5acc30843edd651a7 Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
* | Merge "Add return tag"David Pursehouse2017-11-141-2/+3
|\|
| * Add return tagHector Caballero2017-11-141-2/+3
| | | | | | | | | | | | | | Eclipse was complaining about the missing tag for the return type. Change-Id: I43c7e823c3090b19dc8202c1e4d7968e1fa8e6bb Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
* | Merge "ReftableCompactor should accept 0 for minUpdateIndex"Jonathan Nieder2017-11-142-3/+329
|\ \ | |/ |/|
| * ReftableCompactor should accept 0 for minUpdateIndexMinh Thai2017-11-142-3/+329
| | | | | | | | | | | | | | | | Do not use 0 as the unset value for minUpdateIndex, as input reftables may have minUpdateIndex starting at 0. Change-Id: Ie040a6b73d4a5eba5521e51d0ee4580713c84a3e Signed-off-by: Minh Thai <mthai@google.com>
* | FileUtils.toPath to convert File to PathMarc Strapetz2017-11-148-21/+44
| | | | | | | | | | | | | | | | | | | | | | When invoking File.toPath(), an (unchecked) InvalidPathException may be thrown which should be converted to a checked IOException. For now, we will replace File.toPath() by FileUtils.toPath() only for code which can already handle IOExceptions. Change-Id: I0f0c5fd2a11739e7a02071adae9a5550985d4df6 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Silence invalid @since 3.5 API warning on ResolveMerge#processEntryMatthias Sohn2017-11-131-0/+7
|/ | | | | | | | This method was removed in 4.9 and reintroduced in I48ba4308dee73925fa32d6c2fd6b5fd89632c571 as deprecated in 4.9.1 in order to help EMF Compare to avoid breakage. Change-Id: Ia638517178313da42ae13ebcf88ad535d9a02723 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge changes I335587ee,I4182a174David Pursehouse2017-11-106-1/+104
|\ | | | | | | | | | | * changes: Merge branch 'stable-4.9' Remove an unused import from PackParserTest
| * Merge branch 'stable-4.9'Matthias Sohn2017-11-115-0/+104
| |\ | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Work around a Jsch bug: ensure the user name is set from URI Reintroduce protected method which removal broke EMF Compare Change-Id: I335587eee279f91bd36c9ba9fc149b17a6db6110 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| | * Work around a Jsch bug: ensure the user name is set from URIThomas Wolf2017-11-103-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JSch unconditionally overrides the user name given in the connection URI by the one found in ~/.ssh/config (if that does specify one for the used host). If the SSH config file has a different user name, we'll end up using the wrong name, which typically results in an authentication failure or in Eclipse/EGit asking for a password for the wrong user. Unfortunately there is no way to prevent or circumvent this Jsch behavior up front; it occurs already in the Session constructor at com.jcraft.jsch.Session() and the Session.applyConfig() method. And while there is a Session.setUserName() that would enable us to correct this, that latter method has package visibility only. So resort to reflection to invoke that setUserName() method to ensure that Jsch uses the user name from the URI, if there is one. Bug: 526778 Change-Id: Ia327099b5210a037380b2750a7fd76ff25c41a5a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| | * Merge "Reintroduce protected method which removal broke EMF Compare" into ↵Matthias Sohn2017-11-022-0/+68
| | |\ | | | | | | | | | | | | stable-4.9
| | | * Reintroduce protected method which removal broke EMF CompareMatthias Sohn2017-10-242-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we follow OSGi semantic versioning [1] which says the following: "A change in the second (minor) part of the version signals that the change is backward compatible with consumers of the API package but not with the providers of that API. That is, when the API package goes from version 1.5 to 1.6 it is no longer compatible with a provider of that API but consumers of that API are backward compatible with that API package." The change Ib5fbf17bdaf727bc5d0e106ce88f2620d9f87a6f broke EMF Compare which subclasses ResolveMerger since we added a new parameter to the protected ResolveMerger.processEntry() method. According to the above cited OSGi semantic versioning this is ok, implementers should expect that they break on minor version changes of the API they implement. This change reintroduces the old processEntry() method in order to help avoid breakage for existing EMF Compare versions which expect breakage also for the implementer case only for major version change (in this case from JGit 4.x to 5.x). [1] http://www.osgi.org/wp-content/uploads/SemanticVersioning1.pdf See: https://dev.eclipse.org/mhonarc/lists/jgit-dev/msg03431.html Change-Id: I48ba4308dee73925fa32d6c2fd6b5fd89632c571 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | | Remove an unused import from PackParserTestMatthias Sohn2017-11-111-1/+0
| | | | | | | | | | | | | | | | Change-Id: I4182a1746b09dedab648e457d1ece6d667a01f12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Add a setting for fsck to check connectivity onlyZhen Chen2017-11-101-1/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | The object checks may take a long time and sometimes we are only interested in connectivity check. This is similar to 'git fsck --connectivity-only'. Change-Id: I654e8fdccdb16d796f920088429d188cc96734bc Signed-off-by: Zhen Chen <czhen@google.com>
* | | Merge changes I22a8874b,I68ed4abd,I740bc4bf,Icbd17d15Jonathan Nieder2017-11-107-123/+409
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: BitmapWalker: do not revisit objects in bitmap Use bitmaps for non-commit reachability checks Make PackWriterBitmapWalker public UploadPackTest: construct commits in test method
| * | | BitmapWalker: do not revisit objects in bitmapJonathan Tan2017-11-101-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, BitmapWalker walks through every object returned by the internal ObjectWalk, regardless of whether that object has already been marked in the bitmap. Set an object filter to ensure that only bitmap-unmarked objects are walked through. Change-Id: I22a8874b1e571df3c33643b365036d95f52fe7c7 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * | | Use bitmaps for non-commit reachability checksJonathan Tan2017-11-102-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, unless RequestPolicy#ANY is used, UploadPack rejects all non-commit "want" lines unless they were advertized. This is fine, except when "uploadpack.allowreachablesha1inwant" is true (corresponding to RequestPolicy#REACHABLE_COMMIT), in which case one would expect that "want"-ing anything reachable would work. (There is no restriction that "want" lines must only contain commits - it is allowed for refs to directly point to trees and blobs, and requesting for them using "want" lines works.) This commit has been written to avoid performance regressions as much as possible. In the usual (and currently working) case where the only unadvertized things requested are commits, we do a standard RevWalk in order to avoid incurring the cost of loading bitmaps. However, if unadvertized non-commits are requested, bitmaps are used instead, and if there are no bitmaps, a WantNotValidException is thrown (as is currently done). Change-Id: I68ed4abd0e477ff415c696c7544ccaa234df7f99 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * | | Make PackWriterBitmapWalker publicJonathan Tan2017-11-105-122/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make PackWriterBitmapWriter class public and move it to a more central location, in preparation for its use by another class (in a subsequent commit). One of its inner static classes, AddUnseenToBitmapFilter, previously package-private, is also used directly in its former package. Therefore, AddUnseenToBitmapFilter and its sibling class have been moved to an internal package instead. Change-Id: I740bc4bfc4e4e3c857d1ee7d25fe45e90cd22a75 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * | | UploadPackTest: construct commits in test methodJonathan Tan2017-11-011-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a subsequent commit, more tests will be added. This commit allows those tests to reuse fields. Change-Id: Icbd17d158cfe3ba4dacbd8a11a67f9e7607b41b3 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | Reject pack if delta exceeds array size limitShawn Pearce2017-11-092-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JGit's delta handling code requires the target to be a single byte array. Any attempt to inflate a delta larger than fits in the 2GiB limit will fail with some form of array index exceptions. Check for this overflow early and abort pack parsing. Change-Id: I5bb3a71f1e4f4e0e89b8a177c7019a74ee6194da
* | | | Check non-flushed packs for existence of objectZhen Chen2017-11-071-0/+6
| | | | | | | | | | | | | | | | | | | | Change-Id: Id466909d70ec6f828c904692139891dec880305e Signed-off-by: Zhen Chen <czhen@google.com>
* | | | Suppress "Unlikely argument type for equals()" warnings in testsDavid Pursehouse2017-11-064-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new warning was introduced in Eclipse 4.7 Oxygen [1]. The only instances of the warning are in test code that is asserting that some class does not compare equal to Strings. As in the Gerrit project [2] these asserts are arguably overkill, but arguably also a reasonable test of an equals implementation. Ignore the warning in these cases. Note that if the project is opened in an earlier version of Eclipse, a warning "Unsupported @SuppressWarnings" will be emitted. [1] https://www.eclipse.org/eclipse/news/4.7/M6/ [2] https://gerrit-review.googlesource.com/#/c/gerrit/+/110339/ Change-Id: I08ea33d71e6009cf0f37e6492a475931f447256b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | Update spotbugs-maven-plugin to 3.1.0-RC7Matthias Sohn2017-11-042-5/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic1c2c5b6e3955a1404780e51206513d226600e4b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge branch 'stable-4.9'David Pursehouse2017-11-029-21/+1213
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: PackInserter: Implement newReader() Move some strings from DfsText to JGitText FileRepository: Add pack-based inserter implementation ObjectDirectory: Factor a method to close open pack handles ObjectDirectory: Remove last modified check in insertPack Change-Id: Ifc9ed6f5d8336bc978818a64eae122bceb933e5d
| * | | PackInserter: Implement newReader()Dave Borowitz2017-11-012-2/+351
| | | | | | | | | | | | | | | | Change-Id: Ib9e7f6439332eaed3d936f895a5271a7d514d3e9
| * | | Move some strings from DfsText to JGitTextDave Borowitz2017-11-015-9/+9
| | | | | | | | | | | | | | | | Change-Id: I60050e5127d12b6139d81859dba929fcfaabe504
| * | | FileRepository: Add pack-based inserter implementationDave Borowitz2017-11-013-0/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications that use ObjectInserters to create lots of individual objects may prefer to avoid cluttering up the object directory with loose objects. Add a specialized inserter implementation that produces a single pack file no matter how many objects. This inserter is loosely based on the existing DfsInserter implementation, but is simpler since we don't need to buffer blocks in memory before writing to storage. An alternative for such applications would be to write out the loose objects and then repack just those objects later. This operation is not currently supported with the GC class, which always repacks existing packs when compacting loose objects. This in turn requires more CPU-intensive reachability checks and extra I/O to copy objects from old packs to new packs. So, the choice was between implementing a new variant of repack, or not writing loose objects in the first place. The latter approach is likely less code overall, and avoids unnecessary I/O at runtime. The current implementation does not yet support newReader() for reading back objects. Change-Id: I2074418f4e65853b7113de5eaced3a6b037d1a17
| * | | ObjectDirectory: Factor a method to close open pack handlesDave Borowitz2017-11-012-10/+16
| | | | | | | | | | | | | | | | Change-Id: I9490c4583fdf801de9c0bb09595ebb8fb4926988
| * | | ObjectDirectory: Remove last modified check in insertPackDave Borowitz2017-11-011-2/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GC explicitly handles the case where a new pack has the same name as an existing pack due to it containing the exact same set of objects. In this case, the pack passed to insertPack will have the same name as an existing pack, but it will also almost certainly have a later mtime than the existing pack. The loop in insertPack tried to short-circuit when inserting a new pack, to avoid walking more of the pack list than necessary. Unfortunately, this means it will never get to the check for an identical name, resulting in a duplicate entry for the same PackFile in the pack list. Remove the short-circuit so that insertPack does not insert a duplicate entry. Change-Id: I00711b28594622ad3bd104332334e8a3592cda7f
* | | Upgrade error_prone_core to 2.1.2David Pursehouse2017-10-301-1/+1
| | | | | | | | | | | | | | | Change-Id: I2e6ea106ed5e6568eaf421ce5794bfe446c6cadb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Move loggers to the top of their classSaša Živkov2017-10-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a possibility of hitting NPE on a logger if it is not the first statically initialized member. For example, if another static initializer creates an instance of its class and the logger is used from the constructor. Change-Id: I51fa855a8883c107f2e4ef5ac039dc12a571a7ae
* | | Merge "Align PackStatistics and DfsPackDescription list length"Terry Parker2017-10-262-4/+14
|\ \ \
| * | | Align PackStatistics and DfsPackDescription list lengthMasaya Suzuki2017-10-202-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this the caller cannot tell which PackStatistics is for which pack file. Change-Id: Ifa530f8bc82459611ae694c0a0d111daec3e08f3 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* | | | Update .mailmapDavid Pursehouse2017-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: $ git shortlog -n -s | grep Han 14 Han-Wen Nienhuys 1 Han-Wen NIenhuys After: $ git shortlog -n -s | grep Han 15 Han-Wen Nienhuys Change-Id: I2874713f120f09bcbd33a1c48645e25fb5bf9259 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | Revert "Throw BinaryBlobException from RawParseUtils#lineMap."Han-Wen NIenhuys2017-10-244-48/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f2e64cd895a6aa4f18ab3b876f13b7814fb98f04. The newly added throws clause breaks backward compatibility. Change-Id: Ifa76a1b95935e52640b81cd53c171eb17da175c2 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | | | Fix typo in commentHan-Wen Nienhuys2017-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I04912b32b55dd61ad2d2e7ccb5d688655b1dc335
* | | | Throw BinaryBlobException from RawParseUtils#lineMap.Han-Wen Nienhuys2017-10-244-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes detection of binaries exact for ResolveMerger and DiffFormatter: they will classify files as binary regardless of where the '\0' occurs in the text. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Id4342a199628d9406bfa04af1b023c27a47d4014
* | | | Avoid loading and merging binary data in ResolveMergerHan-Wen Nienhuys2017-10-242-7/+165
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Ide4b68872d426aa262142f224acf636c776b35d3
* | | | Introduce ObjectLoader.Filter for delegationHan-Wen Nienhuys2017-10-241-0/+38
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: I78ada3f4023c4304b19f94fb044024f0f0b2cbbe
* | | | Introduce RawText#load.Han-Wen Nienhuys2017-10-244-53/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method creates a RawText from a blob, but avoids reading the blob if the start contains null bytes. This should reduce the amount of garbage that Gerrit produces for changes with binaries. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Idd202d20251f2d1653e5f1ca374fe644c2cf205f
* | | | Add missing @since tags for new API in ReceiveCommandMatthias Sohn2017-10-231-2/+8
| | | | | | | | | | | | | | | | Change-Id: I6e5d29390b71a1c123bc90ec2e3435706ea9211c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | Merge branch 'stable-4.9'David Pursehouse2017-10-232-21/+49
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | | | | | | | * stable-4.9: Avoid bad rounding "1 year, 12 months" in date formatter Ensure that ~ in ssh config is replaced before Jsch sees it Change-Id: If6ca55f9447aaea3d7c2d36c03520d5e6dd5193e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | Avoid bad rounding "1 year, 12 months" in date formatterMichael Keppler2017-10-232-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Round first, then calculate the labels. This avoids "x years, 12 months" and instead produces "x+1 years". One test case has been added for the original example the bug was found with, and one assertion has been moved from an existing test case to the new test case, since it also triggered the bug. Bug: 525907 Change-Id: I3270af3850c4fb7bae9123a0a6582f93055c9780 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Ensure that ~ in ssh config is replaced before Jsch sees itThomas Wolf2017-10-182-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do tilde replacement for values from the ssh config file that are file names in all cases to make sure that they are already replaced when Jsch tries to get the values. Previously, OpenSshConfig did tilde replacement only for the IdentityFile in the JGit-facing "Host" interface and left the replacement in the Jsch-facing "Config" interface to Jsch. But on Windows the JGit notion of what should be used to replace the tilde differs from Jsch's replacement. Jsch always replaces the tilde by the value of the system property "user.home", whereas JGit also considers some environment variables like %HOME%. This can lead to rather surprising failures as in the case of bug 526175 where %HOME% != user.home. Prior to commit 9d24470 (i.e.,prior to JGit 4.9.0) this problem never occurred because Jsch was completely unaware of the ssh config file and all host and IdentityFile handling happened exclusively in JGit. Bug: 526175 Change-Id: I1511699664ffea07cb58ed751cfdb79b15e3a99e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | dfs: Switch InMemoryRepository to DfsReftableDatabaseShawn Pearce2017-10-187-219/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensure DfsReftableDatabase is tested by the same test suites that use/test InMemoryRepository. It also simplifies the logic of InMemoryRepository and brings its compatibility story closer to any other DFS repository that uses reftables for its reference storage. Change-Id: I881469fd77ed11a9239b477633510b8c482a19ca Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Terry Parker <tparker@google.com>
* | | Merge changes from topic 'reftable'Terry Parker2017-10-1811-28/+1132
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: dfs: reftable backed DfsRefDatabase Support symbolic references in ReceiveCommand
| * | | dfs: reftable backed DfsRefDatabaseShawn Pearce2017-10-185-6/+864
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DfsReftableDatabase is a new alternative for DfsRefDatabase that handles more operations for the implementor by delegating through reftables. All reftable files are stored in sibling DfsObjDatabase using PackExt.REFTABLE and PackSource.INSERT. Its assumed the DfsObjDatabase periodically runs compactions and GCs using DfsPackCompactor and DfsGarbageCollector. Those passes are essential to collapsing the stack of reftables. Change-Id: Ia03196ff6fd9ae2d0623c3747cfa84357c6d0c79 Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Terry Parker <tparker@google.com>
| * | | Support symbolic references in ReceiveCommandShawn Pearce2017-10-186-22/+268
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow creating symbolic references with link, and deleting them or switching to ObjectId with unlink. How this happens is up to the individual RefDatabase. The default implementation detaches RefUpdate if a symbolic reference is involved, supporting these command instances on RefDirectory. Unfortunately the packed-refs file does not support storing symrefs, so atomic transactions involving more than one symref command are failed early. Updating InMemoryRepository is deferred until reftable lands, as I plan to switch InMemoryRepository to use reftable for its internal storage representation. Change-Id: Ibcae068b17a2fc6d958f767f402a570ad88d9151 Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Terry Parker <tparker@google.com>
* / | Avoid bad rounding "1 year, 12 months" in date formatterMichael Keppler2017-10-182-3/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Round first, then calculate the labels. This avoids "x years, 12 months" and instead produces "x+1 years". One test case has been added for the original example the bug was found with, and one assertion has been moved from an existing test case to the new test case, since it also triggered the bug. Bug: 525907 Change-Id: I3270af3850c4fb7bae9123a0a6582f93055c9780 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>