Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2018-03-03Enable warning for resources not managed by try-with-resourceDavid Pursehouse1-1/+1
Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-11-24Ignore warning for minor version change without API changeMatthias Sohn1-1/+11
- this is a new warning option in Eclipse 4.7 and higher - we always change version of all bundles in a release to keep release engineering simple Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-08-30Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn1-1/+1
Do not automatically organize imports using a save action since this seems to be buggy and removed some annotations org.eclipse.jgit.pgm needs to use args4j. Change-Id: I5a91292c3b9241ce2dde3e4ecce14ad460097129 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-08-29Partially revert c0ad77d8 "Enhance Eclipse save actions"Matthias Sohn1-2/+2
Revert the following save actions which were introduced in c0ad77d8: - always use braces around blocks - remove unused imports Other than I expected save actions are run globally on edited files - and not only on edited code lines only. Hence revert the save action "Convert control statement bodies to blocks" which would affect a large number of code lines not affected by the change editing some small part of a class. This would generate a large number of changes which may lead to many unnecessary conflicts. Total number of affected lines across jgit would be around 10k lines. Also revert "Remove unused imports" since it erroneously removes imports of some annotations needed by pgm classes using args4j. Change-Id: I879a47f68e664129e6124cf25c1ae1f6a2d7a5aa Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-08-28Enhance Eclipse save actionsMatthias Sohn1-7/+12
Add the following Eclipse save actions executed when saving modified lines. This should help to reduce manual work needed to maintain a clean and consistent code style: - organize imports - always use braces around blocks - add missing annotations - @Override including implementation of interface methods - @Deprecated - remove - unused imports - unnecessary $NON-NLS$ tags - redundant type arguments Also add default values for new settings that were introduced in recent Eclipse versions up to Neon since we updated save rules the last time. Change-Id: Idc90b249df044d0552f04edf01a5f607c4846f50 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-02-20Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse1-1/+1
Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-02-20Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse1-1/+1
Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-09-20Change JGit minimum execution environment to JavaSE-1.8Matthias Sohn1-3/+3
Bug: 500059 Change-Id: I47f3f6749a67da52029f84e002d9b155ed56d2b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-07-26Ignore 'The value of exception parameter is not used' warningDavid Pursehouse1-0/+1
Change-Id: I50407e4a33e35b718ca40503fdd436f1f9f70fba Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2015-11-09Update dependencies to use the JGit-internal @NullableTerry Parker1-3/+3
Update the project-specific Eclipse settings to replace the use of the org.eclipse.jdt.annotation.Nullable class the new JGit-specific @Nullable annotation. I verified that Eclipse reports errors when the return value of a method annotated with @org.eclipse.jgit.annotations.Nullable is dereferenced without a null check. Also remove the Maven and MANIFEST.MF dependencies on org.eclipse.jdt.annotation. Eclipse null analysis uses three annotations: @Nullable, @NonNull and @NonNullByDefault. All three are updated in this patch because it is invalid to set the Eclipse preferences to empty values. So far only @Nullable has been introduced in org.eclipse.jgit.annotations. My personal preference is to follow the advice in Effective Java and avoid the null-return idiom, and to avoid passing null values in general. This sets the expectation is that arguments and return types are assumed non-null unless otherwise documented. If that is the expectation, then consistent application of @NonNull is redundant and hurts readability by cluttering the code, obscuring the occasional @Nullable annotation that really requires attention. If the JGit community decides there is value in using the @NonNull and @NonNullByDefault annotations we can add them--this change configures Eclipse to use them. Change-Id: I9af1b786d1b44b9b0d9c609480dc842df79bf698 Signed-off-by: Terry Parker <tparker@google.com>
2015-08-20Enable annotation based NPE analysis in jgitAndrey Loskutov1-4/+4
Bug: 470647 Change-Id: I14d1983bb7c208faeffee0504e0567e38d8a89f3 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2015-02-09Set minimum required Java version to Java 7Matthias Sohn1-3/+3
Bug: 458475 Change-Id: Iea8f2236d4e6a94a8d14bb8cc685006ea3fd1bb7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2014-08-02cleanup: Remove no-longer needed API compatibility warning filtersRobin Rosenberg1-38/+0
Change-Id: If534bd0aedaee6160679e965ad08ac30d5dac1c5
2014-07-01Don't warn for methods that can be staticRobin Rosenberg1-1/+1
Making the methods static would gain little in performance, make the code harder to change. Removing unncessary warnings is more important. Change-Id: If3e6aa9c1d92e58b4e7a8e246cf4aace237d7a7b
2014-07-01Add new default settings from Eclipse 4.4Robin Rosenberg1-0/+5
These settings were added by Eclipse simply by touching the project settings. Adding these makes it simpler to see what local changes have been made. Change-Id: Iab0aa62530312eb0c78b03b5c6a632742bcc4978
2014-04-25Making ArchiveFormats breaks the API, but that's okRobin Rosenberg1-0/+38
Add compatibility filters to hide the breakage. Change-Id: Icc1fdc29f15d734d488e49c9c37a18f5ac937903
2013-06-15Disable warning about assigning to parameterRobin Stocker1-1/+1
See change I08bed4275af9ec52aa4d7054067ac82f6a3c9781, where fixing such warning lead to complaints. If fixing is not wanted, disable it instead. Change-Id: If31d4028fa1c6377a11e83ed5688b45701cec68b
2013-05-25Move ArchiveCommand into standard porcelain APIJonathan Nieder8-0/+564
Allow use of ArchiveCommand without depending on the jgit command-line tools. To avoid complicating the process of installing and upgrading JGit, this does not add a dependency by the org.eclipse.jgit bundle on commons-compress. Instead, the caller is responsible for registering any formats they want to use by calling ArchiveCommand.registerFormat. This patch puts functionality that requires an archiver into a separate org.eclipse.jgit.archive bundle for people who want it. One can use it by calling ArchiveCommand.registerFormat directly to register its formats or by relying on OSGi class loading to load org.eclipse.jgit.archive.FormatActivator, which takes care of registration automatically. Once the appropriate formats are registered, you can make a tar or zip from a git tree object as follows: ArchiveCommand cmd = git.archive(); try { cmd.setTree(tree).setFormat(fmt).setOutputStream(out).call(); } finally { cmd.release(); } Change-Id: I418e7e7d76422dc6f010d0b3b624d7bec3b20c6e

    Back to the top