]> source.dussan.org Git - jgit.git/commitdiff
Merge bundle org.eclipse.jgit.java7 into org.eclipse.jgit 68/43768/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 13 Mar 2015 02:30:37 +0000 (19:30 -0700)
committerChristian Halstrick <christian.halstrick@sap.com>
Mon, 23 Mar 2015 13:23:07 +0000 (14:23 +0100)
As we moved minimum Java version to 7 we don't need a separate bundle
and feature for JGit features depending on Java 7 anymore.

Change-Id: Ib5da61b0886ddbdea65298f1e8c6d65c9879ced1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
87 files changed:
org.eclipse.jgit.java7.test/.classpath [deleted file]
org.eclipse.jgit.java7.test/.gitignore [deleted file]
org.eclipse.jgit.java7.test/.project [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.tasks.ui.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.team.ui.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.core.prefs [deleted file]
org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF [deleted file]
org.eclipse.jgit.java7.test/build.properties [deleted file]
org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test (Java 8).launch [deleted file]
org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch [deleted file]
org.eclipse.jgit.java7.test/plugin.properties [deleted file]
org.eclipse.jgit.java7.test/pom.xml [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/symlinks/SymlinksTest.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FSJava7Test.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FileUtils7Test.java [deleted file]
org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/HookTest.java [deleted file]
org.eclipse.jgit.java7/.classpath [deleted file]
org.eclipse.jgit.java7/.fbprefs [deleted file]
org.eclipse.jgit.java7/.gitignore [deleted file]
org.eclipse.jgit.java7/.project [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.tasks.ui.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.team.ui.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.jgit.java7/.settings/org.eclipse.pde.core.prefs [deleted file]
org.eclipse.jgit.java7/META-INF/MANIFEST.MF [deleted file]
org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF [deleted file]
org.eclipse.jgit.java7/about.html [deleted file]
org.eclipse.jgit.java7/build.properties [deleted file]
org.eclipse.jgit.java7/plugin.properties [deleted file]
org.eclipse.jgit.java7/pom.xml [deleted file]
org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java [deleted file]
org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java [deleted file]
org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java [deleted file]
org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java [deleted file]
org.eclipse.jgit.java7/src/org/eclipse/jgit/util/Java7FSFactory.java [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
org.eclipse.jgit.packaging/org.eclipse.jgit.feature/pom.xml
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.gitignore [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.project [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.team.ui.prefs [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/build.properties [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/edl-v10.html [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.properties [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/license.html [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml [deleted file]
org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/pom.xml
org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml
org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml
org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml
org.eclipse.jgit.packaging/pom.xml
org.eclipse.jgit.pgm.test/pom.xml
org.eclipse.jgit.pgm/pom.xml
org.eclipse.jgit.test/META-INF/MANIFEST.MF
org.eclipse.jgit.test/pom.xml
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/GitConstructionTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/SymlinksTest.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java [new file with mode: 0644]
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java5.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java6.java [deleted file]
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java [new file with mode: 0644]
pom.xml

diff --git a/org.eclipse.jgit.java7.test/.classpath b/org.eclipse.jgit.java7.test/.classpath
deleted file mode 100644 (file)
index 131f635..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.jgit.java7"/>
-       <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.jgit.test"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.jgit.java7.test/.gitignore b/org.eclipse.jgit.java7.test/.gitignore
deleted file mode 100644 (file)
index 934e0e0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target
diff --git a/org.eclipse.jgit.java7.test/.project b/org.eclipse.jgit.java7.test/.project
deleted file mode 100644 (file)
index fd4cc60..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.jgit.java7.test</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index f77db3b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Sat Dec 20 21:21:24 CET 2008
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 9f733ee..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Mar 24 18:55:56 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index dcc0d3a..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=true
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index c336cce..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_JGit Format
-formatter_settings_version=12
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=false
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644 (file)
index 823c0f5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644 (file)
index 0cba949..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-commit.comment.template=${task.description} \n\nBug\: ${task.key}
-eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index cd148d9..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#Tue Oct 18 00:52:01 CEST 2011
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Ignore
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.java7.test/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 82793f2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Jan 14 14:34:32 CST 2010
-eclipse.preferences.version=1
-resolve.requirebundle=false
diff --git a/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7.test/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index a160c8c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %plugin_name
-Bundle-SymbolicName: org.eclipse.jgit.java7.test
-Bundle-Version: 4.0.0.qualifier
-Bundle-Vendor: %provider_name
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.eclipse.jgit.api;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.api.errors;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.diff;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.dircache;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.hooks;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.internal.storage.file;version="4.0.0",
- org.eclipse.jgit.junit;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.lib;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.revwalk;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.storage.file;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.treewalk;version="[4.0.0,4.1.0)",
- org.eclipse.jgit.util;version="[4.0.0,4.1.0)",
- org.junit;version="[4.11.0,5.0.0)"
diff --git a/org.eclipse.jgit.java7.test/build.properties b/org.eclipse.jgit.java7.test/build.properties
deleted file mode 100644 (file)
index b1e8ac1..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-bin.includes = META-INF/,\
-              .,\
-              plugin.properties
diff --git a/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test (Java 8).launch b/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test (Java 8).launch
deleted file mode 100644 (file)
index 0c460f0..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.jgit.java7.test"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.java7.test"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.java7.test"/>
-</launchConfiguration>
diff --git a/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch b/org.eclipse.jgit.java7.test/org.eclipse.jgit.java7 -- Java7 feature test.launch
deleted file mode 100644 (file)
index d65d045..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.jgit.java7.test"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.java7.test"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.java7.test"/>
-</launchConfiguration>
diff --git a/org.eclipse.jgit.java7.test/plugin.properties b/org.eclipse.jgit.java7.test/plugin.properties
deleted file mode 100644 (file)
index 5f9d756..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-plugin_name=JGit Core Java 7 Tests
-provider_name=Eclipse.org
diff --git a/org.eclipse.jgit.java7.test/pom.xml b/org.eclipse.jgit.java7.test/pom.xml
deleted file mode 100644 (file)
index 3dcf7ef..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
-   and other copyright owners as documented in the project's IP log.
-
-   This program and the accompanying materials are made available
-   under the terms of the Eclipse Distribution License v1.0 which
-   accompanies this distribution, is reproduced below, and is
-   available at http://www.eclipse.org/org/documents/edl-v10.php
-
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above
-     copyright notice, this list of conditions and the following
-     disclaimer in the documentation and/or other materials provided
-     with the distribution.
-
-   - Neither the name of the Eclipse Foundation, Inc. nor the
-     names of its contributors may be used to endorse or promote
-     products derived from this software without specific prior
-     written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.eclipse.jgit</groupId>
-    <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.jgit.java7.test</artifactId>
-  <name>JGit - Core Java 7 Tests</name>
-
-  <description>
-    JUnit tests for Java7 support in the core library.
-  </description>
-
-  <dependencies>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-library</artifactId>
-      <scope>test</scope>
-      <version>[1.1.0,2.0.0)</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.junit</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.java7</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-  <build>
-    <testSourceDirectory>src/</testSourceDirectory>
-
-    <testResources>
-      <testResource>
-       <directory>tst-rsrc/</directory>
-      </testResource>
-    </testResources>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <argLine>-Xmx256m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java
deleted file mode 100644 (file)
index b0d31cd..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2013, Christian Halstrick <christian.halstrick@sap.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Distribution License v1.0 which accompanies this
- * distribution, is reproduced below, and is available at
- * http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.lib;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.internal.storage.file.FileRepository;
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.jgit.util.FileUtils;
-import org.junit.Before;
-import org.junit.Test;
-
-public class DirCacheCheckoutTestWithSymlinks extends RepositoryTestCase {
-       @Before
-       public void beforeMethod() {
-               // If this assumption fails the tests are skipped. When running on a
-               // filesystem not supporting symlinks I don't want this tests
-               org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks());
-       }
-
-       @Test
-       public void testDontDeleteSymlinkOnTopOfRootDir() throws Exception {
-               // create a parent folder containing a folder with a test repository
-               File repos = createTempDirectory("repos");
-               File testRepo = new File(repos, "repo");
-               testRepo.mkdirs();
-               Git git = Git.init().setDirectory(testRepo).call();
-               db = (FileRepository) git.getRepository();
-
-               // Create a situation where a checkout of master whould delete a file in
-               // a subfolder of the root of the worktree. No other files/folders exist
-               writeTrashFile("d/f", "f");
-               git.add().addFilepattern(".").call();
-               RevCommit initial = git.commit().setMessage("inital").call();
-               git.rm().addFilepattern("d/f").call();
-               git.commit().setMessage("modifyOnMaster").call();
-               git.checkout().setCreateBranch(true).setName("side")
-                               .setStartPoint(initial).call();
-               writeTrashFile("d/f", "f2");
-               git.add().addFilepattern(".").call();
-               git.commit().setMessage("modifyOnSide").call();
-               git.getRepository().close();
-
-               // Create a symlink pointing to the parent folder of the repo and open
-               // the repo with the path containing the symlink
-               File reposSymlink = createTempFile();
-               FileUtils.createSymLink(reposSymlink, repos.getPath());
-
-               Repository symlinkDB = FileRepositoryBuilder.create(new File(
-                               reposSymlink, "repo/.git"));
-               Git symlinkRepo = Git.wrap(symlinkDB);
-               symlinkRepo.checkout().setName("master").call();
-
-               // check that the symlink still exists
-               assertTrue("The symlink to the repo should exist after a checkout",
-                               reposSymlink.exists());
-       }
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/symlinks/SymlinksTest.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/symlinks/SymlinksTest.java
deleted file mode 100644 (file)
index 3ddc3de..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (C) 2013, Axel Richard <axel.richard@obeo.fr>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Distribution License v1.0 which accompanies this
- * distribution, is reproduced below, and is available at
- * http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.symlinks;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.diff.DiffEntry;
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.lib.FileMode;
-import org.eclipse.jgit.lib.Ref;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.treewalk.FileTreeIterator;
-import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry;
-import org.eclipse.jgit.treewalk.TreeWalk;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.jgit.util.FileUtils;
-import org.junit.Before;
-import org.junit.Test;
-
-public class SymlinksTest extends RepositoryTestCase {
-       @Before
-       public void beforeMethod() {
-               // If this assumption fails the tests are skipped. When running on a
-               // filesystem not supporting symlinks I don't want this tests
-               org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks());
-       }
-
-       /**
-        * Steps: 1.Add file 'a' 2.Commit 3.Create branch '1' 4.Replace file 'a' by
-        * symlink 'a' 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should contain 'a' with FileMode.REGULAR_FILE after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestFileThenSymlink() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("a", "Hello world a");
-               writeTrashFile("b", "Hello world b");
-               git.add().addFilepattern(".").call();
-               git.commit().setMessage("add files a & b").call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               git.rm().addFilepattern("a").call();
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
-               git.add().addFilepattern("a").call();
-               git.commit().setMessage("add symlink a").call();
-
-               FileEntry entry = new FileTreeIterator.FileEntry(new File(
-                               db.getWorkTree(), "a"), db.getFS());
-               assertEquals(FileMode.SYMLINK, entry.getMode());
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
-                               db.getFS());
-               assertEquals(FileMode.REGULAR_FILE, entry.getMode());
-       }
-
-       /**
-        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Replace symlink
-        * 'a' by file 'a' 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should contain 'a' with FileMode.SYMLINK after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestSymlinkThenFile() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("b", "Hello world b");
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
-               git.add().addFilepattern(".").call();
-               git.commit().setMessage("add file b & symlink a").call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               git.rm().addFilepattern("a").call();
-               writeTrashFile("a", "Hello world a");
-               git.add().addFilepattern("a").call();
-               git.commit().setMessage("add file a").call();
-
-               FileEntry entry = new FileTreeIterator.FileEntry(new File(
-                               db.getWorkTree(), "a"), db.getFS());
-               assertEquals(FileMode.REGULAR_FILE, entry.getMode());
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
-                               db.getFS());
-               assertEquals(FileMode.SYMLINK, entry.getMode());
-       }
-
-       /**
-        * Steps: 1.Add folder 'a' 2.Commit 3.Create branch '1' 4.Replace folder 'a'
-        * by symlink 'a' 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should contain 'a' with FileMode.TREE after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestFolderThenSymlink() throws Exception {
-               Git git = new Git(db);
-               FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
-               writeTrashFile("a/b", "Hello world b");
-               writeTrashFile("c", "Hello world c");
-               git.add().addFilepattern(".").call();
-               git.commit().setMessage("add folder a").call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               git.rm().addFilepattern("a").call();
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
-               git.add().addFilepattern("a").call();
-               git.commit().setMessage("add symlink a").call();
-
-               FileEntry entry = new FileTreeIterator.FileEntry(new File(
-                               db.getWorkTree(), "a"), db.getFS());
-               assertEquals(FileMode.SYMLINK, entry.getMode());
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
-                               db.getFS());
-               assertEquals(FileMode.TREE, entry.getMode());
-       }
-
-       /**
-        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Replace symlink
-        * 'a' by folder 'a' 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should contain 'a' with FileMode.SYMLINK after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestSymlinkThenFolder() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("c", "Hello world c");
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
-               git.add().addFilepattern(".").call();
-               git.commit().setMessage("add symlink a").call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               git.rm().addFilepattern("a").call();
-               FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
-               writeTrashFile("a/b", "Hello world b");
-               git.add().addFilepattern("a").call();
-               git.commit().setMessage("add folder a").call();
-
-               FileEntry entry = new FileTreeIterator.FileEntry(new File(
-                               db.getWorkTree(), "a"), db.getFS());
-               assertEquals(FileMode.TREE, entry.getMode());
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
-                               db.getFS());
-               assertEquals(FileMode.SYMLINK, entry.getMode());
-       }
-
-       /**
-        * Steps: 1.Add file 'b' 2.Commit 3.Create branch '1' 4.Add symlink 'a'
-        * 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should not contain 'a' -> FileMode.MISSING after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestMissingThenSymlink() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("b", "Hello world b");
-               git.add().addFilepattern(".").call();
-               RevCommit commit1 = git.commit().setMessage("add file b").call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
-               git.add().addFilepattern("a").call();
-               RevCommit commit2 = git.commit().setMessage("add symlink a").call();
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               TreeWalk tw = new TreeWalk(db);
-               tw.addTree(commit1.getTree());
-               tw.addTree(commit2.getTree());
-               List<DiffEntry> scan = DiffEntry.scan(tw);
-               assertEquals(1, scan.size());
-               assertEquals(FileMode.SYMLINK, scan.get(0).getNewMode());
-               assertEquals(FileMode.MISSING, scan.get(0).getOldMode());
-       }
-
-       /**
-        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Delete symlink
-        * 'a' 5.Commit 6.Checkout branch '1'
-        *
-        * The working tree should contain 'a' with FileMode.SYMLINK after the
-        * checkout.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void fileModeTestSymlinkThenMissing() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("b", "Hello world b");
-               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
-               git.add().addFilepattern(".").call();
-               RevCommit commit1 = git.commit().setMessage("add file b & symlink a")
-                               .call();
-               Ref branch_1 = git.branchCreate().setName("branch_1").call();
-               git.rm().addFilepattern("a").call();
-               RevCommit commit2 = git.commit().setMessage("delete symlink a").call();
-
-               git.checkout().setName(branch_1.getName()).call();
-
-               TreeWalk tw = new TreeWalk(db);
-               tw.addTree(commit1.getTree());
-               tw.addTree(commit2.getTree());
-               List<DiffEntry> scan = DiffEntry.scan(tw);
-               assertEquals(1, scan.size());
-               assertEquals(FileMode.MISSING, scan.get(0).getNewMode());
-               assertEquals(FileMode.SYMLINK, scan.get(0).getOldMode());
-       }
-
-       @Test
-       public void createSymlinkAfterTarget() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("a", "start");
-               git.add().addFilepattern("a").call();
-               RevCommit base = git.commit().setMessage("init").call();
-               writeTrashFile("target", "someData");
-               FileUtils.createSymLink(new File(db.getWorkTree(), "link"), "target");
-               git.add().addFilepattern("target").addFilepattern("link").call();
-               git.commit().setMessage("add target").call();
-               assertEquals(4, db.getWorkTree().list().length); // self-check
-               git.checkout().setName(base.name()).call();
-               assertEquals(2, db.getWorkTree().list().length); // self-check
-               git.checkout().setName("master").call();
-               assertEquals(4, db.getWorkTree().list().length);
-               String data = read(new File(db.getWorkTree(), "target"));
-               assertEquals(8, new File(db.getWorkTree(), "target").length());
-               assertEquals("someData", data);
-               data = read(new File(db.getWorkTree(), "link"));
-               assertEquals("target",
-                               FileUtils.readSymLink(new File(db.getWorkTree(), "link")));
-               assertEquals("someData", data);
-       }
-
-       @Test
-       public void createFileSymlinkBeforeTarget() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("a", "start");
-               git.add().addFilepattern("a").call();
-               RevCommit base = git.commit().setMessage("init").call();
-               writeTrashFile("target", "someData");
-               FileUtils.createSymLink(new File(db.getWorkTree(), "tlink"), "target");
-               git.add().addFilepattern("target").addFilepattern("tlink").call();
-               git.commit().setMessage("add target").call();
-               assertEquals(4, db.getWorkTree().list().length); // self-check
-               git.checkout().setName(base.name()).call();
-               assertEquals(2, db.getWorkTree().list().length); // self-check
-               git.checkout().setName("master").call();
-               assertEquals(4, db.getWorkTree().list().length);
-               String data = read(new File(db.getWorkTree(), "target"));
-               assertEquals(8, new File(db.getWorkTree(), "target").length());
-               assertEquals("someData", data);
-               data = read(new File(db.getWorkTree(), "tlink"));
-               assertEquals("target",
-                               FileUtils.readSymLink(new File(db.getWorkTree(), "tlink")));
-               assertEquals("someData", data);
-       }
-
-       @Test
-       public void createDirSymlinkBeforeTarget() throws Exception {
-               Git git = new Git(db);
-               writeTrashFile("a", "start");
-               git.add().addFilepattern("a").call();
-               RevCommit base = git.commit().setMessage("init").call();
-               FileUtils.createSymLink(new File(db.getWorkTree(), "link"), "target");
-               FileUtils.mkdir(new File(db.getWorkTree(), "target"));
-               writeTrashFile("target/file", "someData");
-               git.add().addFilepattern("target").addFilepattern("link").call();
-               git.commit().setMessage("add target").call();
-               assertEquals(4, db.getWorkTree().list().length); // self-check
-               git.checkout().setName(base.name()).call();
-               assertEquals(2, db.getWorkTree().list().length); // self-check
-               git.checkout().setName("master").call();
-               assertEquals(4, db.getWorkTree().list().length);
-               String data = read(new File(db.getWorkTree(), "target/file"));
-               assertEquals(8, new File(db.getWorkTree(), "target/file").length());
-               assertEquals("someData", data);
-               data = read(new File(db.getWorkTree(), "link/file"));
-               assertEquals("target",
-                               FileUtils.readSymLink(new File(db.getWorkTree(), "link")));
-               assertEquals("someData", data);
-       }
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java
deleted file mode 100644 (file)
index 741396c..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.treewalk;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.ResetCommand.ResetType;
-import org.eclipse.jgit.dircache.DirCache;
-import org.eclipse.jgit.dircache.DirCacheEditor;
-import org.eclipse.jgit.dircache.DirCacheEntry;
-import org.eclipse.jgit.dircache.DirCacheIterator;
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.FileMode;
-import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.ObjectInserter;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.jgit.util.FileUtils;
-import org.junit.Test;
-
-public class FileTreeIteratorJava7Test extends RepositoryTestCase {
-       @Test
-       public void testFileModeSymLinkIsNotATree() throws IOException {
-               FS fs = db.getFS();
-               // mÃ¥l = target in swedish, just to get som unicode in here
-               writeTrashFile("mÃ¥l/data", "targetdata");
-               fs.createSymLink(new File(trash, "länk"), "mÃ¥l");
-               FileTreeIterator fti = new FileTreeIterator(db);
-               assertFalse(fti.eof());
-               assertEquals("länk", fti.getEntryPathString());
-               assertEquals(FileMode.SYMLINK, fti.getEntryFileMode());
-               fti.next(1);
-               assertFalse(fti.eof());
-               assertEquals("mÃ¥l", fti.getEntryPathString());
-               assertEquals(FileMode.TREE, fti.getEntryFileMode());
-               fti.next(1);
-               assertTrue(fti.eof());
-       }
-
-       @Test
-       public void testSymlinkNotModifiedThoughNormalized() throws Exception {
-               DirCache dc = db.lockDirCache();
-               DirCacheEditor dce = dc.editor();
-               final String UNNORMALIZED = "target/";
-               final byte[] UNNORMALIZED_BYTES = Constants.encode(UNNORMALIZED);
-               ObjectInserter oi = db.newObjectInserter();
-               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB,
-                               UNNORMALIZED_BYTES, 0,
-                               UNNORMALIZED_BYTES.length);
-               oi.release();
-               dce.add(new DirCacheEditor.PathEdit("link") {
-                       @Override
-                       public void apply(DirCacheEntry ent) {
-                               ent.setFileMode(FileMode.SYMLINK);
-                               ent.setObjectId(linkid);
-                               ent.setLength(UNNORMALIZED_BYTES.length);
-                       }
-               });
-               assertTrue(dce.commit());
-               new Git(db).commit().setMessage("Adding link").call();
-               new Git(db).reset().setMode(ResetType.HARD).call();
-               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
-               FileTreeIterator fti = new FileTreeIterator(db);
-
-               // self-check
-               assertEquals("link", fti.getEntryPathString());
-               assertEquals("link", dci.getEntryPathString());
-
-               // test
-               assertFalse(fti.isModified(dci.getDirCacheEntry(), true,
-                               db.newObjectReader()));
-       }
-
-       /**
-        * Like #testSymlinkNotModifiedThoughNormalized but there is no
-        * normalization being done.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void testSymlinkModifiedNotNormalized() throws Exception {
-               DirCache dc = db.lockDirCache();
-               DirCacheEditor dce = dc.editor();
-               final String NORMALIZED = "target";
-               final byte[] NORMALIZED_BYTES = Constants.encode(NORMALIZED);
-               ObjectInserter oi = db.newObjectInserter();
-               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB, NORMALIZED_BYTES,
-                               0, NORMALIZED_BYTES.length);
-               oi.release();
-               dce.add(new DirCacheEditor.PathEdit("link") {
-                       @Override
-                       public void apply(DirCacheEntry ent) {
-                               ent.setFileMode(FileMode.SYMLINK);
-                               ent.setObjectId(linkid);
-                               ent.setLength(NORMALIZED_BYTES.length);
-                       }
-               });
-               assertTrue(dce.commit());
-               new Git(db).commit().setMessage("Adding link").call();
-               new Git(db).reset().setMode(ResetType.HARD).call();
-               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
-               FileTreeIterator fti = new FileTreeIterator(db);
-
-               // self-check
-               assertEquals("link", fti.getEntryPathString());
-               assertEquals("link", dci.getEntryPathString());
-
-               // test
-               assertFalse(fti.isModified(dci.getDirCacheEntry(), true,
-                               db.newObjectReader()));
-       }
-
-       /**
-        * Like #testSymlinkNotModifiedThoughNormalized but here the link is
-        * modified.
-        *
-        * @throws Exception
-        */
-       @Test
-       public void testSymlinkActuallyModified() throws Exception {
-               final String NORMALIZED = "target";
-               final byte[] NORMALIZED_BYTES = Constants.encode(NORMALIZED);
-               ObjectInserter oi = db.newObjectInserter();
-               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB, NORMALIZED_BYTES,
-                               0, NORMALIZED_BYTES.length);
-               oi.release();
-               DirCache dc = db.lockDirCache();
-               DirCacheEditor dce = dc.editor();
-               dce.add(new DirCacheEditor.PathEdit("link") {
-                       @Override
-                       public void apply(DirCacheEntry ent) {
-                               ent.setFileMode(FileMode.SYMLINK);
-                               ent.setObjectId(linkid);
-                               ent.setLength(NORMALIZED_BYTES.length);
-                       }
-               });
-               assertTrue(dce.commit());
-               new Git(db).commit().setMessage("Adding link").call();
-               new Git(db).reset().setMode(ResetType.HARD).call();
-
-               FileUtils.delete(new File(trash, "link"), FileUtils.NONE);
-               FS.DETECTED.createSymLink(new File(trash, "link"), "newtarget");
-               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
-               FileTreeIterator fti = new FileTreeIterator(db);
-
-               // self-check
-               assertEquals("link", fti.getEntryPathString());
-               assertEquals("link", dci.getEntryPathString());
-
-               // test
-               assertTrue(fti.isModified(dci.getDirCacheEntry(), true,
-                               db.newObjectReader()));
-       }
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java
deleted file mode 100644 (file)
index bb1f2a6..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.treewalk;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.util.FS;
-import org.junit.Test;
-
-public class TreeWalkJava7Test extends RepositoryTestCase {
-       @Test
-       public void testSymlinkToDirNotRecursingViaSymlink() throws Exception {
-               FS fs = db.getFS();
-               assertTrue(fs.supportsSymlinks());
-               writeTrashFile("target/data", "targetdata");
-               fs.createSymLink(new File(trash, "link"), "target");
-               TreeWalk tw = new TreeWalk(db);
-               tw.setRecursive(true);
-               tw.addTree(new FileTreeIterator(db));
-               assertTrue(tw.next());
-               assertEquals("link", tw.getPathString());
-               assertTrue(tw.next());
-               assertEquals("target/data", tw.getPathString());
-               assertFalse(tw.next());
-       }
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FSJava7Test.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FSJava7Test.java
deleted file mode 100644 (file)
index 91555f3..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
-import static org.junit.Assume.assumeNotNull;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.nio.file.Files;
-import java.nio.file.attribute.PosixFileAttributeView;
-import java.nio.file.attribute.PosixFilePermission;
-import java.util.Set;
-
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class FSJava7Test {
-       private File trash;
-
-       @Before
-       public void setUp() throws Exception {
-               trash = File.createTempFile("tmp_", "");
-               trash.delete();
-               assertTrue("mkdir " + trash, trash.mkdir());
-       }
-
-       @After
-       public void tearDown() throws Exception {
-               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY);
-       }
-
-       /**
-        * The old File methods traverse symbolic links and look at the targets.
-        * With symbolic links we usually want to modify/look at the link. For some
-        * reason the executable attribute seems to always look at the target, but
-        * for the other attributes like lastModified, hidden and exists we must
-        * differ between the link and the target.
-        *
-        * @throws IOException
-        * @throws InterruptedException
-        */
-       @Test
-       public void testSymlinkAttributes() throws IOException, InterruptedException {
-               FS fs = FS.DETECTED;
-               File link = new File(trash, "ä");
-               File target = new File(trash, "Ã¥");
-               fs.createSymLink(link, "Ã¥");
-               assertTrue(fs.exists(link));
-               String targetName = fs.readSymLink(link);
-               assertEquals("Ã¥", targetName);
-               assertTrue(fs.lastModified(link) > 0);
-               assertTrue(fs.exists(link));
-               assertFalse(fs.canExecute(link));
-               assertEquals(2, fs.length(link));
-               assertFalse(fs.exists(target));
-               assertFalse(fs.isFile(target));
-               assertFalse(fs.isDirectory(target));
-               assertFalse(fs.canExecute(target));
-
-               RepositoryTestCase.fsTick(link);
-               // Now create the link target
-               FileUtils.createNewFile(target);
-               assertTrue(fs.exists(link));
-               assertTrue(fs.lastModified(link) > 0);
-               assertTrue(fs.lastModified(target) > fs.lastModified(link));
-               assertFalse(fs.canExecute(link));
-               fs.setExecute(target, true);
-               assertFalse(fs.canExecute(link));
-               assertTrue(fs.canExecute(target));
-       }
-
-       @Test
-       public void testExecutableAttributes() throws Exception {
-               FS fs = FS.DETECTED;
-               // If this assumption fails the test is halted and ignored.
-               assumeTrue(fs instanceof FS_POSIX_Java7);
-
-               File f = new File(trash, "bla");
-               assertTrue(f.createNewFile());
-               assertFalse(fs.canExecute(f));
-
-               String umask = readUmask();
-               assumeNotNull(umask);
-
-               char others = umask.charAt(umask.length() - 1);
-
-               boolean badUmask;
-               if (others != '0' && others != '2' && others != '4' && others != '6') {
-                       // umask is set in the way that "others" can not "execute" => git
-                       // CLI will not set "execute" attribute for "others", so we also
-                       // don't care
-                       badUmask = true;
-               } else {
-                       badUmask = false;
-               }
-
-               Set<PosixFilePermission> permissions = readPermissions(f);
-               assertTrue(!permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
-               assertTrue(!permissions.contains(PosixFilePermission.GROUP_EXECUTE));
-               assertTrue(!permissions.contains(PosixFilePermission.OWNER_EXECUTE));
-
-               fs.setExecute(f, true);
-
-               permissions = readPermissions(f);
-               assertTrue("'owner' execute permission not set",
-                               permissions.contains(PosixFilePermission.OWNER_EXECUTE));
-               assertTrue("'group' execute permission not set",
-                               permissions.contains(PosixFilePermission.GROUP_EXECUTE));
-               if (badUmask) {
-                       assertFalse("'others' execute permission set",
-                                       permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
-                       System.err.println("WARNING: your system's umask: \"" + umask
-                                       + "\" doesn't allow FSJava7Test to test if setting posix"
-                                       + "  permissions for \"others\" works properly");
-                       assumeFalse(badUmask);
-               } else {
-                       assertTrue("'others' execute permission not set",
-                                       permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
-               }
-       }
-
-       private String readUmask() throws Exception {
-               Process p = Runtime.getRuntime().exec(
-                               new String[] { "sh", "-c", "umask" }, null, null);
-               final BufferedReader lineRead = new BufferedReader(
-                               new InputStreamReader(p.getInputStream(), Charset
-                                               .defaultCharset().name()));
-               p.waitFor();
-               return lineRead.readLine();
-       }
-
-       private Set<PosixFilePermission> readPermissions(File f) throws IOException {
-               return Files
-                               .getFileAttributeView(f.toPath(), PosixFileAttributeView.class)
-                               .readAttributes().permissions();
-       }
-
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FileUtils7Test.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/FileUtils7Test.java
deleted file mode 100644 (file)
index 9dc5fac..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (C) 2013, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class FileUtils7Test {
-
-       private final File trash = new File(new File("target"), "trash");
-
-       @Before
-       public void setUp() throws Exception {
-               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY | FileUtils.SKIP_MISSING);
-               assertTrue(trash.mkdirs());
-       }
-
-       @After
-       public void tearDown() throws Exception {
-               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY);
-       }
-
-       @Test
-       public void testDeleteSymlinkToDirectoryDoesNotDeleteTarget()
-                       throws IOException {
-               FS fs = FS.DETECTED;
-               File dir = new File(trash, "dir");
-               File file = new File(dir, "file");
-               File link = new File(trash, "link");
-               FileUtils.mkdirs(dir);
-               FileUtils.createNewFile(file);
-               fs.createSymLink(link, "dir");
-               FileUtils.delete(link, FileUtils.RECURSIVE);
-               assertFalse(link.exists());
-               assertTrue(dir.exists());
-               assertTrue(file.exists());
-       }
-}
diff --git a/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/HookTest.java b/org.eclipse.jgit.java7.test/src/org/eclipse/jgit/util/HookTest.java
deleted file mode 100644 (file)
index d3cc0ce..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2014 Matthias Sohn <matthias.sohn@sap.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package org.eclipse.jgit.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.errors.AbortedByHookException;
-import org.eclipse.jgit.hooks.CommitMsgHook;
-import org.eclipse.jgit.hooks.PreCommitHook;
-import org.eclipse.jgit.junit.JGitTestUtil;
-import org.eclipse.jgit.junit.RepositoryTestCase;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.junit.Assume;
-import org.junit.Test;
-
-public class HookTest extends RepositoryTestCase {
-
-       @Test
-       public void testFindHook() throws Exception {
-               assumeSupportedPlatform();
-
-               assertNull("no hook should be installed",
-                               FS.DETECTED.findHook(db, PreCommitHook.NAME));
-               File hookFile = writeHookFile(PreCommitHook.NAME,
-                               "#!/bin/bash\necho \"test $1 $2\"");
-               assertEquals("expected to find pre-commit hook", hookFile,
-                               FS.DETECTED.findHook(db, PreCommitHook.NAME));
-       }
-
-       @Test
-       public void testFailedCommitMsgHookBlocksCommit() throws Exception {
-               assumeSupportedPlatform();
-
-               writeHookFile(CommitMsgHook.NAME,
-                               "#!/bin/sh\necho \"test\"\n\necho 1>&2 \"stderr\"\nexit 1");
-               Git git = Git.wrap(db);
-               String path = "a.txt";
-               writeTrashFile(path, "content");
-               git.add().addFilepattern(path).call();
-               ByteArrayOutputStream out = new ByteArrayOutputStream();
-               try {
-                       git.commit().setMessage("commit")
-                                       .setHookOutputStream(new PrintStream(out)).call();
-                       fail("expected commit-msg hook to abort commit");
-               } catch (AbortedByHookException e) {
-                       assertEquals("unexpected error message from commit-msg hook",
-                                       "Rejected by \"commit-msg\" hook.\nstderr\n",
-                                       e.getMessage());
-                       assertEquals("unexpected output from commit-msg hook", "test\n",
-                                       out.toString());
-               }
-       }
-
-       @Test
-       public void testCommitMsgHookReceivesCorrectParameter() throws Exception {
-               assumeSupportedPlatform();
-
-               writeHookFile(CommitMsgHook.NAME,
-                               "#!/bin/sh\necho $1\n\necho 1>&2 \"stderr\"\nexit 0");
-               Git git = Git.wrap(db);
-               String path = "a.txt";
-               writeTrashFile(path, "content");
-               git.add().addFilepattern(path).call();
-               ByteArrayOutputStream out = new ByteArrayOutputStream();
-               git.commit().setMessage("commit")
-                               .setHookOutputStream(new PrintStream(out)).call();
-               assertEquals(".git/COMMIT_EDITMSG\n", out.toString("UTF-8"));
-       }
-
-       @Test
-       public void testCommitMsgHookCanModifyCommitMessage() throws Exception {
-               assumeSupportedPlatform();
-
-               writeHookFile(CommitMsgHook.NAME,
-                               "#!/bin/sh\necho \"new message\" > $1\nexit 0");
-               Git git = Git.wrap(db);
-               String path = "a.txt";
-               writeTrashFile(path, "content");
-               git.add().addFilepattern(path).call();
-               ByteArrayOutputStream out = new ByteArrayOutputStream();
-               RevCommit revCommit = git.commit().setMessage("commit")
-                               .setHookOutputStream(new PrintStream(out)).call();
-               assertEquals("new message\n", revCommit.getFullMessage());
-       }
-
-       @Test
-       public void testRunHook() throws Exception {
-               assumeSupportedPlatform();
-
-               writeHookFile(PreCommitHook.NAME,
-                               "#!/bin/sh\necho \"test $1 $2\"\nread INPUT\necho $INPUT\necho 1>&2 \"stderr\"");
-               ByteArrayOutputStream out = new ByteArrayOutputStream();
-               ByteArrayOutputStream err = new ByteArrayOutputStream();
-               ProcessResult res = FS.DETECTED.runHookIfPresent(db,
-                               PreCommitHook.NAME,
-                               new String[] {
-                               "arg1", "arg2" },
-                               new PrintStream(out), new PrintStream(err), "stdin");
-               assertEquals("unexpected hook output", "test arg1 arg2\nstdin\n",
-                               out.toString("UTF-8"));
-               assertEquals("unexpected output on stderr stream", "stderr\n",
-                               err.toString("UTF-8"));
-               assertEquals("unexpected exit code", 0, res.getExitCode());
-               assertEquals("unexpected process status", ProcessResult.Status.OK,
-                               res.getStatus());
-       }
-
-       @Test
-       public void testFailedPreCommitHookBlockCommit() throws Exception {
-               assumeSupportedPlatform();
-
-               writeHookFile(PreCommitHook.NAME,
-                               "#!/bin/sh\necho \"test\"\n\necho 1>&2 \"stderr\"\nexit 1");
-               Git git = Git.wrap(db);
-               String path = "a.txt";
-               writeTrashFile(path, "content");
-               git.add().addFilepattern(path).call();
-               ByteArrayOutputStream out = new ByteArrayOutputStream();
-               try {
-                       git.commit().setMessage("commit")
-                                       .setHookOutputStream(new PrintStream(out)).call();
-                       fail("expected pre-commit hook to abort commit");
-               } catch (AbortedByHookException e) {
-                       assertEquals("unexpected error message from pre-commit hook",
-                                       "Rejected by \"pre-commit\" hook.\nstderr\n",
-                                       e.getMessage());
-                       assertEquals("unexpected output from pre-commit hook", "test\n",
-                                       out.toString());
-               }
-       }
-
-       private File writeHookFile(final String name, final String data)
-                       throws IOException {
-               File path = new File(db.getWorkTree() + "/.git/hooks/", name);
-               JGitTestUtil.write(path, data);
-               FS.DETECTED.setExecute(path, true);
-               return path;
-       }
-
-       private void assumeSupportedPlatform() {
-               Assume.assumeTrue(FS.DETECTED instanceof FS_POSIX
-                               || FS.DETECTED instanceof FS_Win32_Java7Cygwin);
-       }
-}
diff --git a/org.eclipse.jgit.java7/.classpath b/org.eclipse.jgit.java7/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.jgit.java7/.fbprefs b/org.eclipse.jgit.java7/.fbprefs
deleted file mode 100644 (file)
index 81a0767..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-#FindBugs User Preferences
-#Mon May 04 16:24:13 PDT 2009
-detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
-detectorBadAppletConstructor=BadAppletConstructor|false
-detectorBadResultSetAccess=BadResultSetAccess|true
-detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
-detectorBadUseOfReturnValue=BadUseOfReturnValue|true
-detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
-detectorBooleanReturnNull=BooleanReturnNull|true
-detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
-detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
-detectorCheckTypeQualifiers=CheckTypeQualifiers|true
-detectorCloneIdiom=CloneIdiom|false
-detectorComparatorIdiom=ComparatorIdiom|true
-detectorConfusedInheritance=ConfusedInheritance|true
-detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
-detectorCrossSiteScripting=CrossSiteScripting|true
-detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
-detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
-detectorDontUseEnum=DontUseEnum|true
-detectorDroppedException=DroppedException|true
-detectorDumbMethodInvocations=DumbMethodInvocations|true
-detectorDumbMethods=DumbMethods|true
-detectorDuplicateBranches=DuplicateBranches|true
-detectorEmptyZipFileEntry=EmptyZipFileEntry|true
-detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
-detectorFinalizerNullsFields=FinalizerNullsFields|true
-detectorFindBadCast2=FindBadCast2|true
-detectorFindBadForLoop=FindBadForLoop|true
-detectorFindCircularDependencies=FindCircularDependencies|false
-detectorFindDeadLocalStores=FindDeadLocalStores|true
-detectorFindDoubleCheck=FindDoubleCheck|true
-detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
-detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
-detectorFindFinalizeInvocations=FindFinalizeInvocations|true
-detectorFindFloatEquality=FindFloatEquality|true
-detectorFindHEmismatch=FindHEmismatch|true
-detectorFindInconsistentSync2=FindInconsistentSync2|true
-detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
-detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
-detectorFindMaskedFields=FindMaskedFields|true
-detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
-detectorFindNakedNotify=FindNakedNotify|true
-detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true
-detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true
-detectorFindNonShortCircuit=FindNonShortCircuit|true
-detectorFindNullDeref=FindNullDeref|true
-detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
-detectorFindOpenStream=FindOpenStream|true
-detectorFindPuzzlers=FindPuzzlers|true
-detectorFindRefComparison=FindRefComparison|true
-detectorFindReturnRef=FindReturnRef|true
-detectorFindRunInvocations=FindRunInvocations|true
-detectorFindSelfComparison=FindSelfComparison|true
-detectorFindSelfComparison2=FindSelfComparison2|true
-detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
-detectorFindSpinLoop=FindSpinLoop|true
-detectorFindSqlInjection=FindSqlInjection|true
-detectorFindTwoLockWait=FindTwoLockWait|true
-detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
-detectorFindUnconditionalWait=FindUnconditionalWait|true
-detectorFindUninitializedGet=FindUninitializedGet|true
-detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
-detectorFindUnreleasedLock=FindUnreleasedLock|true
-detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
-detectorFindUnsyncGet=FindUnsyncGet|true
-detectorFindUselessControlFlow=FindUselessControlFlow|true
-detectorFormatStringChecker=FormatStringChecker|true
-detectorHugeSharedStringConstants=HugeSharedStringConstants|true
-detectorIDivResultCastToDouble=IDivResultCastToDouble|true
-detectorIncompatMask=IncompatMask|true
-detectorInconsistentAnnotations=InconsistentAnnotations|true
-detectorInefficientMemberAccess=InefficientMemberAccess|false
-detectorInefficientToArray=InefficientToArray|true
-detectorInfiniteLoop=InfiniteLoop|true
-detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
-detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false
-detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
-detectorInitializationChain=InitializationChain|true
-detectorInstantiateStaticClass=InstantiateStaticClass|true
-detectorInvalidJUnitTest=InvalidJUnitTest|true
-detectorIteratorIdioms=IteratorIdioms|true
-detectorLazyInit=LazyInit|true
-detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
-detectorMethodReturnCheck=MethodReturnCheck|true
-detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
-detectorMutableLock=MutableLock|true
-detectorMutableStaticFields=MutableStaticFields|true
-detectorNaming=Naming|true
-detectorNumberConstructor=NumberConstructor|true
-detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
-detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
-detectorPublicSemaphores=PublicSemaphores|false
-detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
-detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
-detectorRedundantInterfaces=RedundantInterfaces|true
-detectorRepeatedConditionals=RepeatedConditionals|true
-detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
-detectorSerializableIdiom=SerializableIdiom|true
-detectorStartInConstructor=StartInConstructor|true
-detectorStaticCalendarDetector=StaticCalendarDetector|true
-detectorStringConcatenation=StringConcatenation|true
-detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
-detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
-detectorSwitchFallthrough=SwitchFallthrough|true
-detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
-detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
-detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
-detectorURLProblems=URLProblems|true
-detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
-detectorUnnecessaryMath=UnnecessaryMath|true
-detectorUnreadFields=UnreadFields|true
-detectorUseObjectEquals=UseObjectEquals|false
-detectorUselessSubclassMethod=UselessSubclassMethod|false
-detectorVarArgsProblems=VarArgsProblems|true
-detectorVolatileUsage=VolatileUsage|true
-detectorWaitInLoop=WaitInLoop|true
-detectorWrongMapIterator=WrongMapIterator|true
-detectorXMLFactoryBypass=XMLFactoryBypass|true
-detector_threshold=2
-effort=default
-excludefilter0=findBugs/FindBugsExcludeFilter.xml
-filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false
-filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL|
-run_at_full_build=true
diff --git a/org.eclipse.jgit.java7/.gitignore b/org.eclipse.jgit.java7/.gitignore
deleted file mode 100644 (file)
index 934e0e0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target
diff --git a/org.eclipse.jgit.java7/.project b/org.eclipse.jgit.java7/.project
deleted file mode 100644 (file)
index 291c8ff..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.jgit.java7</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 66ac15c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Aug 11 16:46:12 PDT 2008
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 006e07e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Mon Mar 24 18:55:50 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index ff39d16..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=1
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=true
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index c336cce..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_JGit Format
-formatter_settings_version=12
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=java;javax;org;com;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=false
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644 (file)
index 823c0f5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644 (file)
index 0cba949..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-commit.comment.template=${task.description} \n\nBug\: ${task.key}
-eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index cd148d9..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#Tue Oct 18 00:52:01 CEST 2011
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Ignore
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.jgit.java7/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.java7/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644 (file)
index 82793f2..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Thu Jan 14 14:34:32 CST 2010
-eclipse.preferences.version=1
-resolve.requirebundle=false
diff --git a/org.eclipse.jgit.java7/META-INF/MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 92da30d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Fragment-Host: org.eclipse.jgit;bundle-version="4.0.0"
-Bundle-Name: %plugin_name
-Bundle-SymbolicName: org.eclipse.jgit.java7
-Bundle-Version: 4.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-Vendor: %provider_name
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Export-Package: org.eclipse.jgit.util;version="4.0.0"
diff --git a/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.java7/META-INF/SOURCE-MANIFEST.MF
deleted file mode 100644 (file)
index 77cc74c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.jgit.java7 - Sources
-Bundle-SymbolicName: org.eclipse.jgit.java7.source
-Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 4.0.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.java7;version="4.0.0.qualifier";roots="."
-
diff --git a/org.eclipse.jgit.java7/about.html b/org.eclipse.jgit.java7/about.html
deleted file mode 100644 (file)
index 2cb2663..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Distribution License - Version 1.0</title>
-<style type="text/css">
-  body {
-    size: 8.5in 11.0in;
-    margin: 0.25in 0.5in 0.25in 0.5in;
-    tab-interval: 0.5in;
-    }
-  p {
-    margin-left: auto;
-    margin-top:  0.5em;
-    margin-bottom: 0.5em;
-    }
-  p.list {
-       margin-left: 0.5in;
-    margin-top:  0.05em;
-    margin-bottom: 0.05em;
-    }
-  </style>
-
-</head>
-
-<body lang="EN-US">
-
-<p><b>Eclipse Distribution License - v 1.0</b></p>
-
-<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p>
-
-<p>All rights reserved.</p>
-<p>Redistribution and use in source and binary forms, with or without modification,
-       are permitted provided that the following conditions are met:
-<ul><li>Redistributions of source code must retain the above copyright notice,
-       this list of conditions and the following disclaimer. </li>
-<li>Redistributions in binary form must reproduce the above copyright notice,
-       this list of conditions and the following disclaimer in the documentation
-       and/or other materials provided with the distribution. </li>
-<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its
-       contributors may be used to endorse or promote products derived from
-       this software without specific prior written permission. </li></ul>
-</p>
-<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.</p>
-
-</body>
-
-</html>
diff --git a/org.eclipse.jgit.java7/build.properties b/org.eclipse.jgit.java7/build.properties
deleted file mode 100644 (file)
index 185d310..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties
-
diff --git a/org.eclipse.jgit.java7/plugin.properties b/org.eclipse.jgit.java7/plugin.properties
deleted file mode 100644 (file)
index fc2c16a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-plugin_name=JGit Java 7 Support
-provider_name=Eclipse JGit
diff --git a/org.eclipse.jgit.java7/pom.xml b/org.eclipse.jgit.java7/pom.xml
deleted file mode 100644 (file)
index 6c17efa..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2012-2013, Robin Rosenberg
-   and other copyright owners as documented in the project's IP log.
-
-   This program and the accompanying materials are made available
-   under the terms of the Eclipse Distribution License v1.0 which
-   accompanies this distribution, is reproduced below, and is
-   available at http://www.eclipse.org/org/documents/edl-v10.php
-
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above
-     copyright notice, this list of conditions and the following
-     disclaimer in the documentation and/or other materials provided
-     with the distribution.
-
-   - Neither the name of the Eclipse Foundation, Inc. nor the
-     names of its contributors may be used to endorse or promote
-     products derived from this software without specific prior
-     written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.eclipse.jgit</groupId>
-    <artifactId>org.eclipse.jgit-parent</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.jgit.java7</artifactId>
-  <name>JGit - Core Java7 Support</name>
-
-  <description>
-    Java7 support for symbolic links etc
-  </description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
-
-  <properties>
-    <translate-qualifier/>
-    <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
-  </properties>
-
-  <build>
-    <sourceDirectory>src/</sourceDirectory>
-
-    <resources>
-      <resource>
-        <directory>.</directory>
-        <includes>
-          <include>plugin.properties</include>
-          <include>about.html</include>
-        </includes>
-      </resource>
-      <resource>
-           <directory>resources/</directory>
-      </resource>
-    </resources>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>translate-source-qualifier</id>
-            <phase>generate-resources</phase>
-            <configuration>
-              <target>
-                <copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
-                <replace file="${source-bundle-manifest}">
-                  <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
-                </replace>
-              </target>
-            </configuration>
-            <goals>
-              <goal>run</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <inherited>true</inherited>
-        <executions>
-          <execution>
-            <id>attach-sources</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>jar</goal>
-            </goals>
-            <configuration>
-              <archive>
-                <manifestFile>${source-bundle-manifest}</manifestFile>
-              </archive>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>${bundle-manifest}</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>clirr-maven-plugin</artifactId>
-      </plugin>
-    </plugins>
-
-    <pluginManagement>
-      <plugins>
-        <plugin>
-             <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-pmd-plugin</artifactId>
-          <version>2.7.1</version>
-          <configuration>
-            <sourceEncoding>utf-8</sourceEncoding>
-            <minimumTokens>100</minimumTokens>
-            <targetJdk>1.7</targetJdk>
-            <format>xml</format>
-            <failOnViolation>false</failOnViolation>
-          </configuration>
-          <executions>
-            <execution>
-              <goals>
-                <goal>cpd-check</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>clirr-maven-plugin</artifactId>
-        <version>${clirr-version}</version>
-        <configuration>
-          <comparisonVersion>${jgit-last-release-version}</comparisonVersion>
-          <minSeverity>info</minSeverity>
-        </configuration>
-      </plugin>
-    </plugins>
-  </reporting>
-</project>
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_POSIX_Java7.java
deleted file mode 100644 (file)
index 118e166..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.attribute.PosixFilePermission;
-import java.util.Set;
-
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.Repository;
-
-/**
- * FS implementation for Java7 on unix like systems
- */
-public class FS_POSIX_Java7 extends FS_POSIX {
-
-       /*
-        * True if the current user "umask" allows to set execute bit for "others".
-        * Can be null if "umask" is not supported (or returns unexpected values) by
-        * current user shell.
-        *
-        * Bug 424395: with the umask of 0002 (user: rwx group: rwx others: rx) egit
-        * checked out files as rwx,rwx,r (execution not allowed for "others"). To
-        * fix this and properly set "executable" permission bit for "others", we
-        * must consider the user umask on checkout
-        */
-       private static final Boolean EXECUTE_FOR_OTHERS;
-
-       /*
-        * True if the current user "umask" allows to set execute bit for "group".
-        * Can be null if "umask" is not supported (or returns unexpected values) by
-        * current user shell.
-        */
-       private static final Boolean EXECUTE_FOR_GROUP;
-
-       static {
-               String umask = readUmask();
-
-               // umask return value consists of 3 or 4 digits, like "002" or "0002"
-               if (umask != null && umask.length() > 0 && umask.matches("\\d{3,4}")) { //$NON-NLS-1$
-                       EXECUTE_FOR_OTHERS = isGranted(PosixFilePermission.OTHERS_EXECUTE,
-                                       umask);
-                       EXECUTE_FOR_GROUP = isGranted(PosixFilePermission.GROUP_EXECUTE,
-                                       umask);
-               } else {
-                       EXECUTE_FOR_OTHERS = null;
-                       EXECUTE_FOR_GROUP = null;
-               }
-       }
-
-       FS_POSIX_Java7(FS_POSIX_Java7 src) {
-               super(src);
-       }
-
-       FS_POSIX_Java7() {
-               // empty
-       }
-
-       @Override
-       public FS newInstance() {
-               return new FS_POSIX_Java7(this);
-       }
-
-       @Override
-       public boolean supportsExecute() {
-               return true;
-       }
-
-       @Override
-       public boolean canExecute(File f) {
-               return FileUtil.canExecute(f);
-       }
-
-       @Override
-       public boolean setExecute(File f, boolean canExecute) {
-               if (!isFile(f))
-                       return false;
-               // only if the execute has to be set, and we know the umask
-               if (canExecute && EXECUTE_FOR_OTHERS != null) {
-                       try {
-                               Path path = f.toPath();
-                               Set<PosixFilePermission> pset = Files
-                                               .getPosixFilePermissions(path);
-                               // user is always allowed to set execute
-                               pset.add(PosixFilePermission.OWNER_EXECUTE);
-
-                               if (EXECUTE_FOR_GROUP.booleanValue())
-                                       pset.add(PosixFilePermission.GROUP_EXECUTE);
-
-                               if (EXECUTE_FOR_OTHERS.booleanValue())
-                                       pset.add(PosixFilePermission.OTHERS_EXECUTE);
-
-                               Files.setPosixFilePermissions(path, pset);
-                               return true;
-                       } catch (IOException e) {
-                               // The interface doesn't allow to throw IOException
-                               final boolean debug = Boolean.parseBoolean(SystemReader
-                                               .getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$
-                               if (debug)
-                                       System.err.println(e);
-                               return false;
-                       }
-               }
-               // if umask is not working for some reason: fall back to default (buggy)
-               // implementation which does not consider umask: see bug 424395
-               return f.setExecutable(canExecute);
-       }
-
-       /**
-        * Derives requested permission from given octal umask value as defined e.g.
-        * in <a href="http://linux.die.net/man/2/umask">http://linux.die.net/man/2/
-        * umask</a>.
-        * <p>
-        * The umask expected here must consist of 3 or 4 digits. Last three digits
-        * are significant here because they represent file permissions granted to
-        * the "owner", "group" and "others" (in this order).
-        * <p>
-        * Each single digit from the umask represents 3 bits of the mask standing
-        * for "<b>r</b>ead, <b>w</b>rite, e<b>x</b>ecute" permissions (in this
-        * order).
-        * <p>
-        * The possible umask values table:
-        *
-        * <pre>
-        * Value : Bits:Abbr.: Permission
-        *     0 : 000 :rwx  : read, write and execute
-        *     1 : 001 :rw   : read and write
-        *     2 : 010 :rx   : read and execute
-        *     3 : 011 :r    : read only
-        *     4 : 100 :wx   : write and execute
-        *     5 : 101 :w    : write only
-        *     6 : 110 :x    : execute only
-        *     7 : 111 :     : no permissions
-        * </pre>
-        * <p>
-        * Note, that umask value is used to "mask" the requested permissions on
-        * file creation by combining the requested permission bit with the
-        * <b>negated</b> value of the umask bit.
-        * <p>
-        * Simply speaking, if a bit is <b>not</b> set in the umask, then the
-        * appropriate right <b>will</b> be granted <b>if</b> requested. If a bit is
-        * set in the umask value, then the appropriate permission will be not
-        * granted.
-        * <p>
-        * Example:
-        * <li>umask 023 ("000 010 011" or rwx rx r) combined with the request to
-        * create an executable file with full set of permissions for everyone (777)
-        * results in the file with permissions 754 (rwx rx r).
-        * <li>umask 002 ("000 000 010" or rwx rwx rx) combined with the request to
-        * create an executable file with full set of permissions for everyone (777)
-        * results in the file with permissions 775 (rwx rwx rx).
-        * <li>umask 002 ("000 000 010" or rwx rwx rx) combined with the request to
-        * create a file without executable rights for everyone (666) results in the
-        * file with permissions 664 (rw rw r).
-        *
-        * @param p
-        *            non null permission
-        * @param umask
-        *            octal umask value represented by at least three digits. The
-        *            digits (read from the end to beginning of the umask) represent
-        *            permissions for "others", "group" and "owner".
-        *
-        * @return true if the requested permission is set according to given umask
-        */
-       private static Boolean isGranted(PosixFilePermission p, String umask) {
-               char val;
-               switch (p) {
-               case OTHERS_EXECUTE:
-                       // Read last digit, because umask is ordered as: User/Group/Others.
-                       val = umask.charAt(umask.length() - 1);
-                       return isExecuteGranted(val);
-               case GROUP_EXECUTE:
-                       val = umask.charAt(umask.length() - 2);
-                       return isExecuteGranted(val);
-               default:
-                       throw new UnsupportedOperationException(
-                                       "isGranted() for " + p + " is not implemented!"); //$NON-NLS-1$ //$NON-NLS-2$
-               }
-       }
-
-       /**
-        * @param c
-        *            character representing octal permission value from the table
-        *            in {@link #isGranted(PosixFilePermission, String)}
-        * @return true if the "execute" permission is granted according to given
-        *         character
-        */
-       private static Boolean isExecuteGranted(char c) {
-               if (c == '0' || c == '2' || c == '4' || c == '6')
-                       return Boolean.TRUE;
-               return Boolean.FALSE;
-       }
-
-       private static String readUmask() {
-               Process p;
-               try {
-                       p = Runtime.getRuntime().exec(
-                                       new String[] { "sh", "-c", "umask" }, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                       try (BufferedReader lineRead = new BufferedReader(
-                                       new InputStreamReader(p.getInputStream(), Charset
-                                                       .defaultCharset().name()))) {
-                               p.waitFor();
-                               return lineRead.readLine();
-                       }
-               } catch (Exception e) {
-                       return null;
-               }
-       }
-
-       @Override
-       public boolean retryFailedLockFileCommit() {
-               return false;
-       }
-
-       @Override
-       public boolean supportsSymlinks() {
-               return true;
-       }
-
-       @Override
-       public boolean isSymLink(File path) throws IOException {
-               return FileUtil.isSymlink(path);
-       }
-
-       @Override
-       public long lastModified(File path) throws IOException {
-               return FileUtil.lastModified(path);
-       }
-
-       @Override
-       public void setLastModified(File path, long time) throws IOException {
-               FileUtil.setLastModified(path, time);
-       }
-
-       @Override
-       public void delete(File path) throws IOException {
-               FileUtil.delete(path);
-       }
-
-       @Override
-       public long length(File f) throws IOException {
-               return FileUtil.getLength(f);
-       }
-
-       @Override
-       public boolean exists(File path) {
-               return FileUtil.exists(path);
-       }
-
-       @Override
-       public boolean isDirectory(File path) {
-               return FileUtil.isDirectory(path);
-       }
-
-       @Override
-       public boolean isFile(File path) {
-               return FileUtil.isFile(path);
-       }
-
-       @Override
-       public boolean isHidden(File path) throws IOException {
-               return FileUtil.isHidden(path);
-       }
-
-       @Override
-       public void setHidden(File path, boolean hidden) throws IOException {
-               // no action on POSIX
-       }
-
-       @Override
-       public String readSymLink(File path) throws IOException {
-               return FileUtil.readSymlink(path);
-       }
-
-       @Override
-       public void createSymLink(File path, String target) throws IOException {
-               FileUtil.createSymLink(path, target);
-       }
-
-       /**
-        * @since 3.3
-        */
-       @Override
-       public Attributes getAttributes(File path) {
-               return FileUtil.getFileAttributesPosix(this, path);
-       }
-
-       /**
-        * @since 3.3
-        */
-       @Override
-       public File normalize(File file) {
-               return FileUtil.normalize(file);
-       }
-
-       /**
-        * @since 3.3
-        */
-       @Override
-       public String normalize(String name) {
-               return FileUtil.normalize(name);
-       }
-
-       /**
-        * @since 3.7
-        */
-       @Override
-       public File findHook(Repository repository, String hookName) {
-               final File gitdir = repository.getDirectory();
-               final Path hookPath = gitdir.toPath().resolve(Constants.HOOKS)
-                               .resolve(hookName);
-               if (Files.isExecutable(hookPath))
-                       return hookPath.toFile();
-               return null;
-       }
-}
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7.java
deleted file mode 100644 (file)
index 0711867..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * FS for Java7 on Windows
- */
-public class FS_Win32_Java7 extends FS_Win32 {
-
-       private volatile Boolean supportSymlinks;
-
-       FS_Win32_Java7(FS src) {
-               super(src);
-       }
-
-       FS_Win32_Java7() {
-       }
-
-       @Override
-       public FS newInstance() {
-               return new FS_Win32_Java7(this);
-       }
-
-       @Override
-       public boolean supportsSymlinks() {
-               if (supportSymlinks == null)
-                       detectSymlinkSupport();
-               return Boolean.TRUE.equals(supportSymlinks);
-       }
-
-       private void detectSymlinkSupport() {
-               File tempFile = null;
-               try {
-                       tempFile = File.createTempFile("tempsymlinktarget", ""); //$NON-NLS-1$ //$NON-NLS-2$
-                       File linkName = new File(tempFile.getParentFile(), "tempsymlink"); //$NON-NLS-1$
-                       FileUtil.createSymLink(linkName, tempFile.getPath());
-                       supportSymlinks = Boolean.TRUE;
-                       linkName.delete();
-               } catch (IOException | UnsupportedOperationException e) {
-                       supportSymlinks = Boolean.FALSE;
-               } finally {
-                       if (tempFile != null)
-                               try {
-                                       FileUtils.delete(tempFile);
-                               } catch (IOException e) {
-                                       throw new RuntimeException(e); // panic
-                               }
-               }
-       }
-
-       @Override
-       public boolean isSymLink(File path) throws IOException {
-               return FileUtil.isSymlink(path);
-       }
-
-       @Override
-       public long lastModified(File path) throws IOException {
-               return FileUtil.lastModified(path);
-       }
-
-       @Override
-       public void setLastModified(File path, long time) throws IOException {
-               FileUtil.setLastModified(path, time);
-       }
-
-       @Override
-       public void delete(File path) throws IOException {
-               FileUtil.delete(path);
-       }
-
-       @Override
-       public long length(File f) throws IOException {
-               return FileUtil.getLength(f);
-       }
-
-       @Override
-       public boolean exists(File path) {
-               return FileUtil.exists(path);
-       }
-
-       @Override
-       public boolean isDirectory(File path) {
-               return FileUtil.isDirectory(path);
-       }
-
-       @Override
-       public boolean isFile(File path) {
-               return FileUtil.isFile(path);
-       }
-
-       @Override
-       public boolean isHidden(File path) throws IOException {
-               return FileUtil.isHidden(path);
-       }
-
-       @Override
-       public void setHidden(File path, boolean hidden) throws IOException {
-               FileUtil.setHidden(path, hidden);
-       }
-
-       @Override
-       public String readSymLink(File path) throws IOException {
-               return FileUtil.readSymlink(path);
-       }
-
-       @Override
-       public void createSymLink(File path, String target) throws IOException {
-               FileUtil.createSymLink(path, target);
-       }
-
-       /**
-        * @since 3.3
-        */
-       @Override
-       public Attributes getAttributes(File path) {
-               return FileUtil.getFileAttributesBasic(this, path);
-       }
-}
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FS_Win32_Java7Cygwin.java
deleted file mode 100644 (file)
index 4c371de..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.Repository;
-
-/**
- * FS for Java7 on Windows with Cygwin
- */
-public class FS_Win32_Java7Cygwin extends FS_Win32_Cygwin {
-
-       FS_Win32_Java7Cygwin(FS src) {
-               super(src);
-       }
-
-       FS_Win32_Java7Cygwin() {
-       }
-
-       @Override
-       public FS newInstance() {
-               return new FS_Win32_Java7Cygwin(this);
-       }
-
-       @Override
-       public boolean supportsSymlinks() {
-               return true;
-       }
-
-       @Override
-       public boolean isSymLink(File path) throws IOException {
-               return FileUtil.isSymlink(path);
-       }
-
-       @Override
-       public long lastModified(File path) throws IOException {
-               return FileUtil.lastModified(path);
-       }
-
-       @Override
-       public void setLastModified(File path, long time) throws IOException {
-               FileUtil.setLastModified(path, time);
-       }
-
-       @Override
-       public void delete(File path) throws IOException {
-               FileUtil.delete(path);
-       }
-
-       @Override
-       public long length(File f) throws IOException {
-               return FileUtil.getLength(f);
-       }
-
-       @Override
-       public boolean exists(File path) {
-               return FileUtil.exists(path);
-       }
-
-       @Override
-       public boolean isDirectory(File path) {
-               return FileUtil.isDirectory(path);
-       }
-
-       @Override
-       public boolean isFile(File path) {
-               return FileUtil.isFile(path);
-       }
-
-       @Override
-       public boolean isHidden(File path) throws IOException {
-               return FileUtil.isHidden(path);
-       }
-
-       @Override
-       public void setHidden(File path, boolean hidden) throws IOException {
-               FileUtil.setHidden(path, hidden);
-       }
-
-       @Override
-       public String readSymLink(File path) throws IOException {
-               return FileUtil.readSymlink(path);
-       }
-
-       @Override
-       public void createSymLink(File path, String target) throws IOException {
-               FileUtil.createSymLink(path, target);
-       }
-
-       /**
-        * @since 3.3
-        */
-       @Override
-       public Attributes getAttributes(File path) {
-               return FileUtil.getFileAttributesBasic(this, path);
-       }
-
-       /**
-        * @since 3.7
-        */
-       @Override
-       public File findHook(Repository repository, String hookName) {
-               final File gitdir = repository.getDirectory();
-               final Path hookPath = gitdir.toPath().resolve(Constants.HOOKS)
-                               .resolve(hookName);
-               if (Files.isExecutable(hookPath))
-                       return hookPath.toFile();
-               return null;
-       }
-}
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/FileUtil.java
deleted file mode 100644 (file)
index 67fcc92..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.LinkOption;
-import java.nio.file.NoSuchFileException;
-import java.nio.file.Path;
-import java.nio.file.attribute.BasicFileAttributeView;
-import java.nio.file.attribute.BasicFileAttributes;
-import java.nio.file.attribute.FileTime;
-import java.nio.file.attribute.PosixFileAttributeView;
-import java.nio.file.attribute.PosixFileAttributes;
-import java.nio.file.attribute.PosixFilePermission;
-import java.text.Normalizer;
-import java.text.Normalizer.Form;
-
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.util.FS.Attributes;
-
-class FileUtil {
-
-       static class Java7BasicAttributes extends Attributes {
-
-               Java7BasicAttributes(FS fs, File fPath, boolean exists,
-                               boolean isDirectory, boolean isExecutable,
-                               boolean isSymbolicLink, boolean isRegularFile,
-                               long creationTime, long lastModifiedTime, long length) {
-                       super(fs, fPath, exists, isDirectory, isExecutable, isSymbolicLink,
-                                       isRegularFile, creationTime, lastModifiedTime, length);
-               }
-       }
-
-       static String readSymlink(File path) throws IOException {
-               Path nioPath = path.toPath();
-               Path target = Files.readSymbolicLink(nioPath);
-               String targetString = target.toString();
-               if (SystemReader.getInstance().isWindows())
-                       targetString = targetString.replace('\\', '/');
-               else if (SystemReader.getInstance().isMacOS())
-                       targetString = Normalizer.normalize(targetString, Form.NFC);
-               return targetString;
-       }
-
-       public static void createSymLink(File path, String target)
-                       throws IOException {
-               Path nioPath = path.toPath();
-               if (Files.exists(nioPath, LinkOption.NOFOLLOW_LINKS))
-                       Files.delete(nioPath);
-               if (SystemReader.getInstance().isWindows())
-                       target = target.replace('/', '\\');
-               Path nioTarget = new File(target).toPath();
-               Files.createSymbolicLink(nioPath, nioTarget);
-       }
-
-       public static boolean isSymlink(File path) {
-               Path nioPath = path.toPath();
-               return Files.isSymbolicLink(nioPath);
-       }
-
-       public static long lastModified(File path) throws IOException {
-               Path nioPath = path.toPath();
-               return Files.getLastModifiedTime(nioPath, LinkOption.NOFOLLOW_LINKS)
-                               .toMillis();
-       }
-
-       public static void setLastModified(File path, long time) throws IOException {
-               Path nioPath = path.toPath();
-               Files.setLastModifiedTime(nioPath, FileTime.fromMillis(time));
-       }
-
-       public static boolean exists(File path) {
-               Path nioPath = path.toPath();
-               return Files.exists(nioPath, LinkOption.NOFOLLOW_LINKS);
-       }
-
-       public static boolean isHidden(File path) throws IOException {
-               Path nioPath = path.toPath();
-               return Files.isHidden(nioPath);
-       }
-
-       public static void setHidden(File path, boolean hidden) throws IOException {
-               Path nioPath = path.toPath();
-               Files.setAttribute(nioPath, "dos:hidden", Boolean.valueOf(hidden), //$NON-NLS-1$
-                               LinkOption.NOFOLLOW_LINKS);
-       }
-
-       public static long getLength(File path) throws IOException {
-               Path nioPath = path.toPath();
-               if (Files.isSymbolicLink(nioPath))
-                       return Files.readSymbolicLink(nioPath).toString()
-                                       .getBytes(Constants.CHARSET).length;
-               return Files.size(nioPath);
-       }
-
-       public static boolean isDirectory(File path) {
-               Path nioPath = path.toPath();
-               return Files.isDirectory(nioPath, LinkOption.NOFOLLOW_LINKS);
-       }
-
-       public static boolean isFile(File path) {
-               Path nioPath = path.toPath();
-               return Files.isRegularFile(nioPath, LinkOption.NOFOLLOW_LINKS);
-       }
-
-       public static boolean canExecute(File path) {
-               if (!isFile(path))
-                       return false;
-               return path.canExecute();
-       }
-
-       /**
-        * @param path
-        * @param executable
-        * @return true if succeeded, false if not supported or failed
-        * @deprecated the implementation is highly platform dependent, consider
-        *             using {@link FS#setExecute(File, boolean)} instead
-        */
-       @Deprecated
-       public static boolean setExecute(File path, boolean executable) {
-               if (!isFile(path))
-                       return false;
-               return path.setExecutable(executable);
-       }
-
-       public static void delete(File path) throws IOException {
-               Path nioPath = path.toPath();
-               Files.delete(nioPath);
-       }
-
-       static Attributes getFileAttributesBasic(FS fs, File path) {
-               try {
-                       Path nioPath = path.toPath();
-                       BasicFileAttributes readAttributes = nioPath
-                                       .getFileSystem()
-                                       .provider()
-                                       .getFileAttributeView(nioPath,
-                                                       BasicFileAttributeView.class,
-                                                       LinkOption.NOFOLLOW_LINKS).readAttributes();
-                       Attributes attributes = new FileUtil.Java7BasicAttributes(fs, path,
-                                       true,
-                                       readAttributes.isDirectory(),
-                                       fs.supportsExecute() ? path.canExecute() : false,
-                                       readAttributes.isSymbolicLink(),
-                                       readAttributes.isRegularFile(), //
-                                       readAttributes.creationTime().toMillis(), //
-                                       readAttributes.lastModifiedTime().toMillis(),
-                                       readAttributes.isSymbolicLink() ? Constants
-                                                       .encode(FileUtils.readSymLink(path)).length
-                                                       : readAttributes.size());
-                       return attributes;
-               } catch (NoSuchFileException e) {
-                       return new FileUtil.Java7BasicAttributes(fs, path, false, false,
-                                       false, false, false, 0L, 0L, 0L);
-               } catch (IOException e) {
-                       return new Attributes(path, fs);
-               }
-       }
-
-       static Attributes getFileAttributesPosix(FS fs, File path) {
-               try {
-                       Path nioPath = path.toPath();
-                       PosixFileAttributes readAttributes = nioPath
-                                       .getFileSystem()
-                                       .provider()
-                                       .getFileAttributeView(nioPath,
-                                                       PosixFileAttributeView.class,
-                                                       LinkOption.NOFOLLOW_LINKS).readAttributes();
-                       Attributes attributes = new FileUtil.Java7BasicAttributes(
-                                       fs,
-                                       path,
-                                       true, //
-                                       readAttributes.isDirectory(), //
-                                       readAttributes.permissions().contains(
-                                                       PosixFilePermission.OWNER_EXECUTE),
-                                       readAttributes.isSymbolicLink(),
-                                       readAttributes.isRegularFile(), //
-                                       readAttributes.creationTime().toMillis(), //
-                                       readAttributes.lastModifiedTime().toMillis(),
-                                       readAttributes.size());
-                       return attributes;
-               } catch (NoSuchFileException e) {
-                       return new FileUtil.Java7BasicAttributes(fs, path, false, false,
-                                       false, false, false, 0L, 0L, 0L);
-               } catch (IOException e) {
-                       return new Attributes(path, fs);
-               }
-       }
-
-       public static File normalize(File file) {
-               if (SystemReader.getInstance().isMacOS()) {
-                       // TODO: Would it be faster to check with isNormalized first
-                       // assuming normalized paths are much more common
-                       String normalized = Normalizer.normalize(file.getPath(),
-                                       Normalizer.Form.NFC);
-                       return new File(normalized);
-               }
-               return file;
-       }
-
-       public static String normalize(String name) {
-               if (SystemReader.getInstance().isMacOS()) {
-                       if (name == null)
-                               return null;
-                       return Normalizer.normalize(name, Normalizer.Form.NFC);
-               }
-               return name;
-       }
-
-}
diff --git a/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/Java7FSFactory.java b/org.eclipse.jgit.java7/src/org/eclipse/jgit/util/Java7FSFactory.java
deleted file mode 100644 (file)
index 2e8c0ec..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import org.eclipse.jgit.util.FS;
-import org.eclipse.jgit.util.FS.FSFactory;
-import org.eclipse.jgit.util.SystemReader;
-
-/**
- * A factory for creating FS instances on Java7
- */
-public class Java7FSFactory extends FSFactory {
-       @Override
-       public FS detect(Boolean cygwinUsed) {
-               if (SystemReader.getInstance().isWindows()) {
-                       if (cygwinUsed == null)
-                               cygwinUsed = Boolean.valueOf(FS_Win32_Cygwin.isCygwin());
-                       if (cygwinUsed.booleanValue())
-                               return new FS_Win32_Java7Cygwin();
-                       else
-                               return new FS_Win32_Java7();
-               } else
-                       return new FS_POSIX_Java7();
-       }
-}
index 07e39be79e2c6e7a77aa971504c47c8e1f6122a6..9a1759763f11e77678a0630b6945159080137683 100644 (file)
       <discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
    </url>
 
-   <includes
-         id="org.eclipse.jgit.java7"
-         version="0.0.0"
-         name="Java implementation of Git - optional Java 7 libraries"
-         optional="true"/>
-
    <plugin
          id="org.eclipse.jgit"
          download-size="0"
index a6c12092d34bec7ce8c1ee6dbba363f6f7450bad..172d4fdb9988dd8b4baf394d4d72e99b72b822f4 100644 (file)
       <artifactId>org.eclipse.jgit</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.java7</artifactId>
-      <version>${project.version}</version>
-    </dependency>
   </dependencies>
 
 </project>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.gitignore
deleted file mode 100644 (file)
index 2f7896d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-target/
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.project
deleted file mode 100644 (file)
index 318860e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.jgit.java7.feature</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.FeatureBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.FeatureNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 14bdc2c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 898252b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 18 23:33:45 CEST 2010
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644 (file)
index 823c0f5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/.settings/org.eclipse.mylyn.team.ui.prefs
deleted file mode 100644 (file)
index 0cba949..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#Tue Jul 19 20:11:28 CEST 2011
-commit.comment.template=${task.description} \n\nBug\: ${task.key}
-eclipse.preferences.version=1
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/build.properties
deleted file mode 100644 (file)
index b4a8dde..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-bin.includes = feature.xml,\
-               edl-v10.html,\
-               feature.properties,\
-               license.html
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/edl-v10.html
deleted file mode 100644 (file)
index 1826b47..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Distribution License - Version 1.0</title>
-<style type="text/css">
-  body {
-    size: 8.5in 11.0in;
-    margin: 0.25in 0.5in 0.25in 0.5in;
-    tab-interval: 0.5in;
-    }
-  p {
-    margin-left: auto;
-    margin-top:  0.5em;
-    margin-bottom: 0.5em;
-    }
-  p.list {
-    margin-left: 0.5in;
-    margin-top:  0.05em;
-    margin-bottom: 0.05em;
-    }
-  </style>
-
-</head>
-
-<body lang="EN-US">
-
-<p><b>Eclipse Distribution License - v 1.0</b></p>
-
-<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p>
-
-<p>All rights reserved.</p>
-<p>Redistribution and use in source and binary forms, with or without modification,
-    are permitted provided that the following conditions are met:
-<ul><li>Redistributions of source code must retain the above copyright notice,
-    this list of conditions and the following disclaimer.</li>
-<li>Redistributions in binary form must reproduce the above copyright notice,
-    this list of conditions and the following disclaimer in the documentation
-    and/or other materials provided with the distribution.</li>
-<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its
-    contributors may be used to endorse or promote products derived from
-    this software without specific prior written permission.</li></ul>
-</p>
-<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.</p>
-
-</body>
-
-</html>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.properties
deleted file mode 100644 (file)
index c29f299..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2010 IBM Corporation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-###############################################################################
-
-featureName=Java implementation of Git - optional Java 7 libraries
-providerName=Eclipse JGit
-
-updateSiteName=Eclipse JGit Update Site
-
-# description property - text of the "Feature Description"
-description=\
-Optional Java 7 libraries for JGit.\n
-################ end of description property ##################################
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2005, 2013 Shawn Pearce, Robin Rosenberg, et.al.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Distribution License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/org/documents/edl-v10.html\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-Eclipse Foundation Software User Agreement\n\
-April 9, 2014\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the\n\
-Eclipse Foundation is provided to you under the terms and conditions of\n\
-the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
-provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse Foundation source code\n\
-repository ("Repository") in software modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
-       - Content may be structured and packaged into modules to facilitate delivering,\n\
-         extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
-         plug-in fragments ("Fragments"), and features ("Features").\n\
-       - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
-         in a directory named "plugins".\n\
-       - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
-         Each Feature may be packaged as a sub-directory in a directory named "features".\n\
-         Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
-         numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
-       - Features may also include other Features ("Included Features"). Within a Feature, files\n\
-         named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
-       - The top-level (root) directory\n\
-       - Plug-in and Fragment directories\n\
-       - Inside Plug-ins and Fragments packaged as JARs\n\
-       - Sub-directories of the directory named "src" of certain Plug-ins\n\
-       - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
-Update License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties" found within a Feature.\n\
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
-terms and conditions (or references to such terms and conditions) that\n\
-govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
-       - Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
-       - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
-       - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
-       - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
-       - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-\n\Use of Provisioning Technology\n\
-\n\
-The Eclipse Foundation makes available provisioning software, examples of which include,\n\
-but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
-the purpose of allowing users to install software, documentation, information and/or\n\
-other materials (collectively "Installable Software"). This capability is provided with\n\
-the intent of allowing such users to install, extend and update Eclipse-based products.\n\
-Information about packaging Installable Software is available at\n\
-http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
-\n\
-You may use Provisioning Technology to allow other parties to install Installable Software.\n\
-You shall be responsible for enabling the applicable license agreements relating to the\n\
-Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
-in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
-making it available in accordance with the Specification, you further acknowledge your\n\
-agreement to, and the acquisition of all necessary rights to permit the following:\n\
-\n\
-       1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
-          the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
-          extending or updating the functionality of an Eclipse-based product.\n\
-       2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
-          Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
-       3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
-          govern the use of the Installable Software ("Installable Software Agreement") and such\n\
-          Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
-          with the Specification. Such Installable Software Agreement must inform the user of the\n\
-          terms and conditions that govern the Installable Software and must solicit acceptance by\n\
-          the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
-          indication of agreement by the user, the provisioning Technology will complete installation\n\
-          of the Installable Software.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use, and\n\
-re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
-########### end of license property ##########################################
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/feature.xml
deleted file mode 100644 (file)
index bd0f3b0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.eclipse.jgit.java7"
-      label="%featureName"
-      version="4.0.0.qualifier"
-      provider-name="%providerName">
-
-   <description url="http://www.eclipse.org/jgit/">
-      %description
-   </description>
-
-   <copyright>
-      %copyright
-   </copyright>
-
-   <license url="%licenseURL">
-      %license
-   </license>
-
-   <url>
-      <update label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
-      <discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
-   </url>
-
-   <plugin
-         id="org.eclipse.jgit.java7"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/license.html
deleted file mode 100644 (file)
index 95ad95e..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 9, 2014</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
-   (COLLECTIVELY "CONTENT").  USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
-   CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW.  BY USING THE CONTENT, YOU AGREE THAT YOUR USE
-   OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
-   NOTICES INDICATED OR REFERENCED BELOW.  IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
-   CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
-   ("EPL").  A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-   For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
-   repository ("Repository") in software modules ("Modules") and made available as downloadable archives ("Downloads").</p>
-
-<ul>
-       <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content.  Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
-       <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java\99 ARchive) in a directory named "plugins".</li>
-       <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.  Each Feature may be packaged as a sub-directory in a directory named "features".  Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
-      and/or Fragments associated with that Feature.</li>
-       <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
-Included Features should be contained in files named "license.html" ("Feature Licenses").  Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
-       <li>The top-level (root) directory</li>
-       <li>Plug-in and Fragment directories</li>
-       <li>Inside Plug-ins and Fragments packaged as JARs</li>
-       <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
-       <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license ("Feature Update License") during the
-installation process.  If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them.  Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.  SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
-       <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
-       <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
-       <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
-       <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
-       <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT.  If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
-   Update Manager ("Provisioning Technology") for the purpose of allowing users to install software, documentation, information and/or
-   other materials (collectively "Installable Software"). This capability is provided with the intent of allowing such users to
-   install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
-   ("Specification").</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
-   applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
-   in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
-   Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
-       <li>A series of actions may occur ("Provisioning Process") in which a user may execute the Provisioning Technology
-       on a machine ("Target Machine") with the intent of installing, extending or updating the functionality of an Eclipse-based
-       product.</li>
-       <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
-       accessed and copied to the Target Machine.</li>
-       <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
-       Software ("Installable Software Agreement") and such Installable Software Agreement shall be accessed from the Target
-       Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
-       the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
-       indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
-   another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
-   possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-
-
-</body></html>
\ No newline at end of file
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.java7.feature/pom.xml
deleted file mode 100644 (file)
index fec2e31..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2009-2012, Matthias Sohn <matthias.sohn@sap.com>
-   and other copyright owners as documented in the project's IP log.
-
-   This program and the accompanying materials are made available
-   under the terms of the Eclipse Distribution License v1.0 which
-   accompanies this distribution, is reproduced below, and is
-   available at http://www.eclipse.org/org/documents/edl-v10.php
-
-   All rights reserved.
-
-   Redistribution and use in source and binary forms, with or
-   without modification, are permitted provided that the following
-   conditions are met:
-
-   - Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-
-   - Redistributions in binary form must reproduce the above
-     copyright notice, this list of conditions and the following
-     disclaimer in the documentation and/or other materials provided
-     with the distribution.
-
-   - Neither the name of the Eclipse Foundation, Inc. nor the
-     names of its contributors may be used to endorse or promote
-     products derived from this software without specific prior
-     written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-   CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-   INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.eclipse.jgit</groupId>
-    <artifactId>jgit.tycho.parent</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
-  </parent>
-
-  <groupId>org.eclipse.jgit.feature</groupId>
-  <artifactId>org.eclipse.jgit.java7</artifactId>
-  <packaging>eclipse-feature</packaging>
-
-  <name>JGit Optional Java 7 Feature</name>
-  <dependencies>
-
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.java7</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-  </dependencies>
-
-</project>
index f80c8ce54b0b42591506b475bd340bfd4d63d3f2..d663db0ff9f36bf43d330ba013441f285b96497a 100644 (file)
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.java7</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm</artifactId>
index b1c81648b970a5a8f375a0114f2ff2a2d5e55d29..2186ad98256a14a8217436a691ee7907c445576b 100644 (file)
@@ -18,9 +18,6 @@
    <feature url="features/org.eclipse.jgit.junit_0.0.0.qualifier.jar" id="org.eclipse.jgit.junit" version="0.0.0" patch="true">
       <category name="JGit"/>
    </feature>
-   <feature url="features/org.eclipse.jgit.java7_0.0.0.qualifier.jar" id="org.eclipse.jgit.java7" version="0.0.0" patch="true">
-      <category name="JGit"/>
-   </feature>
    <feature url="features/org.eclipse.jgit.http.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.http.apache" version="0.0.0" patch="true">
       <category name="JGit"/>
    </feature>
index f2aa7af61a2aece703b3ea6d5956b5e0fddbf973..80125f30424d183c420207df2535ffa8fa14f355 100644 (file)
          <artifactId>org.eclipse.jgit.http.apache</artifactId>
          <version>${project.version}</version>
        </dependency>
-       <dependency>
-         <groupId>org.eclipse.jgit</groupId>
-         <artifactId>org.eclipse.jgit.java7</artifactId>
-         <version>${project.version}</version>
-       </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm</artifactId>
index 937c0fdbe21a7fa57a3eb586708a84766a9f47a5..ab6ed7725a7c36363e19be6e4275df139d2a9b74 100644 (file)
          install-size="0"
          version="0.0.0"
          unpack="false"/>
-   <plugin
-         id="org.eclipse.jgit.java7.source"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
 </feature>
index dbea59168b9059d0a3238bece83f0f93fb5c03f0..3f552b6666d82e9381657fecd1c99fe07a4977a4 100644 (file)
@@ -74,7 +74,6 @@
     <module>org.eclipse.jgit.target</module>
     <module>org.eclipse.jgit.feature</module>
     <module>org.eclipse.jgit.http.apache.feature</module>
-    <module>org.eclipse.jgit.java7.feature</module>
     <module>org.eclipse.jgit.pgm.feature</module>
     <module>org.eclipse.jgit.source.feature</module>
     <module>org.eclipse.jgit.pgm.source.feature</module>
       <version>${project.version}</version>
       <classifier>sources</classifier>
     </dependency>
-    <dependency>
-      <groupId>org.eclipse.jgit</groupId>
-      <artifactId>org.eclipse.jgit.java7</artifactId>
-      <version>${project.version}</version>
-      <classifier>sources</classifier>
-    </dependency>
     <dependency>
       <groupId>org.eclipse.jgit</groupId>
       <artifactId>org.eclipse.jgit.pgm</artifactId>
index bd4317c1b19e67afb662beefde4eef6a3f93756e..979081d9046e9de90b7feaf8474511f7f56e120f 100644 (file)
     Tests for command line client tools built on top of JGit.
   </description>
 
-  <profiles>
-    <profile>
-      <id>jgit.java7</id>
-      <activation>
-       <jdk>[1.7,)</jdk>
-      </activation>
-      <dependencies>
-       <dependency>
-         <groupId>org.eclipse.jgit</groupId>
-         <artifactId>org.eclipse.jgit.java7</artifactId>
-         <version>${project.version}</version>
-         <optional>true</optional>
-       </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
index 5724cfdb2df393aeafadcba2040f044daa8a46a5..2bc11e8b9a81495ba20f510d106abd9b5820e333 100644 (file)
     </dependency>
   </dependencies>
 
-  <profiles>
-    <profile>
-      <id>java7</id>
-      <activation>
-       <jdk>[1.7,)</jdk>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>org.eclipse.jgit</groupId>
-          <artifactId>org.eclipse.jgit.java7</artifactId>
-          <version>${project.version}</version>
-          <optional>true</optional>
-        </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
   <build>
     <sourceDirectory>src/</sourceDirectory>
 
index 199c586a2049c5606c1abc2a5719d2397880e974..2bc7cd1a4446c2e4ebde24ba0e16a2285c94e9c7 100644 (file)
@@ -19,6 +19,7 @@ Import-Package: com.googlecode.javaewah;version="[0.7.9,0.8.0)",
  org.eclipse.jgit.events;version="[4.0.0,4.1.0)",
  org.eclipse.jgit.fnmatch;version="[4.0.0,4.1.0)",
  org.eclipse.jgit.gitrepo;version="[4.0.0,4.1.0)",
+ org.eclipse.jgit.hooks;version="[4.0.0,4.1.0)",
  org.eclipse.jgit.ignore;version="[4.0.0,4.1.0)",
  org.eclipse.jgit.ignore.internal;version="[4.0.0,4.1.0)",
  org.eclipse.jgit.internal;version="[4.0.0,4.1.0)",
index 12dfa68484133dc0320ffbc20c3031bb1a511dd0..0e1419a161a5364857cb708c616e6d9b1dc50ac7 100644 (file)
     JUnit tests for the core library.
   </description>
 
-  <profiles>
-    <profile>
-      <id>jgit.java7</id>
-      <activation>
-       <jdk>[1.7,)</jdk>
-      </activation>
-      <dependencies>
-       <dependency>
-         <groupId>org.eclipse.jgit</groupId>
-         <artifactId>org.eclipse.jgit.java7</artifactId>
-         <version>${project.version}</version>
-       </dependency>
-      </dependencies>
-    </profile>
-  </profiles>
-
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
index 64bb8bfa4d94706f4f5cd831a798b1ff40388c1e..2220a536f147628df58ea9b77423f2a0e8cc9127 100644 (file)
@@ -140,7 +140,8 @@ public class GitConstructionTest extends RepositoryTestCase {
        public void testClose() throws IOException, JGitInternalException,
                        GitAPIException {
                File workTree = db.getWorkTree();
-               Git git = Git.wrap(db);
+               db.close();
+               Git git = Git.open(workTree);
                git.gc().setExpire(null).call();
                git.checkout().setName(git.getRepository().resolve("HEAD^").getName())
                                .call();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTestWithSymlinks.java
new file mode 100644 (file)
index 0000000..b0d31cd
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2013, Christian Halstrick <christian.halstrick@sap.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v1.0 which accompanies this
+ * distribution, is reproduced below, and is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.lib;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.Before;
+import org.junit.Test;
+
+public class DirCacheCheckoutTestWithSymlinks extends RepositoryTestCase {
+       @Before
+       public void beforeMethod() {
+               // If this assumption fails the tests are skipped. When running on a
+               // filesystem not supporting symlinks I don't want this tests
+               org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks());
+       }
+
+       @Test
+       public void testDontDeleteSymlinkOnTopOfRootDir() throws Exception {
+               // create a parent folder containing a folder with a test repository
+               File repos = createTempDirectory("repos");
+               File testRepo = new File(repos, "repo");
+               testRepo.mkdirs();
+               Git git = Git.init().setDirectory(testRepo).call();
+               db = (FileRepository) git.getRepository();
+
+               // Create a situation where a checkout of master whould delete a file in
+               // a subfolder of the root of the worktree. No other files/folders exist
+               writeTrashFile("d/f", "f");
+               git.add().addFilepattern(".").call();
+               RevCommit initial = git.commit().setMessage("inital").call();
+               git.rm().addFilepattern("d/f").call();
+               git.commit().setMessage("modifyOnMaster").call();
+               git.checkout().setCreateBranch(true).setName("side")
+                               .setStartPoint(initial).call();
+               writeTrashFile("d/f", "f2");
+               git.add().addFilepattern(".").call();
+               git.commit().setMessage("modifyOnSide").call();
+               git.getRepository().close();
+
+               // Create a symlink pointing to the parent folder of the repo and open
+               // the repo with the path containing the symlink
+               File reposSymlink = createTempFile();
+               FileUtils.createSymLink(reposSymlink, repos.getPath());
+
+               Repository symlinkDB = FileRepositoryBuilder.create(new File(
+                               reposSymlink, "repo/.git"));
+               Git symlinkRepo = Git.wrap(symlinkDB);
+               symlinkRepo.checkout().setName("master").call();
+
+               // check that the symlink still exists
+               assertTrue("The symlink to the repo should exist after a checkout",
+                               reposSymlink.exists());
+       }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/SymlinksTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/symlinks/SymlinksTest.java
new file mode 100644 (file)
index 0000000..3ddc3de
--- /dev/null
@@ -0,0 +1,336 @@
+/*
+ * Copyright (C) 2013, Axel Richard <axel.richard@obeo.fr>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Distribution License v1.0 which accompanies this
+ * distribution, is reproduced below, and is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.symlinks;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.diff.DiffEntry;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.treewalk.FileTreeIterator;
+import org.eclipse.jgit.treewalk.FileTreeIterator.FileEntry;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.Before;
+import org.junit.Test;
+
+public class SymlinksTest extends RepositoryTestCase {
+       @Before
+       public void beforeMethod() {
+               // If this assumption fails the tests are skipped. When running on a
+               // filesystem not supporting symlinks I don't want this tests
+               org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks());
+       }
+
+       /**
+        * Steps: 1.Add file 'a' 2.Commit 3.Create branch '1' 4.Replace file 'a' by
+        * symlink 'a' 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should contain 'a' with FileMode.REGULAR_FILE after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestFileThenSymlink() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("a", "Hello world a");
+               writeTrashFile("b", "Hello world b");
+               git.add().addFilepattern(".").call();
+               git.commit().setMessage("add files a & b").call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               git.rm().addFilepattern("a").call();
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
+               git.add().addFilepattern("a").call();
+               git.commit().setMessage("add symlink a").call();
+
+               FileEntry entry = new FileTreeIterator.FileEntry(new File(
+                               db.getWorkTree(), "a"), db.getFS());
+               assertEquals(FileMode.SYMLINK, entry.getMode());
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
+                               db.getFS());
+               assertEquals(FileMode.REGULAR_FILE, entry.getMode());
+       }
+
+       /**
+        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Replace symlink
+        * 'a' by file 'a' 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should contain 'a' with FileMode.SYMLINK after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestSymlinkThenFile() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("b", "Hello world b");
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
+               git.add().addFilepattern(".").call();
+               git.commit().setMessage("add file b & symlink a").call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               git.rm().addFilepattern("a").call();
+               writeTrashFile("a", "Hello world a");
+               git.add().addFilepattern("a").call();
+               git.commit().setMessage("add file a").call();
+
+               FileEntry entry = new FileTreeIterator.FileEntry(new File(
+                               db.getWorkTree(), "a"), db.getFS());
+               assertEquals(FileMode.REGULAR_FILE, entry.getMode());
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
+                               db.getFS());
+               assertEquals(FileMode.SYMLINK, entry.getMode());
+       }
+
+       /**
+        * Steps: 1.Add folder 'a' 2.Commit 3.Create branch '1' 4.Replace folder 'a'
+        * by symlink 'a' 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should contain 'a' with FileMode.TREE after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestFolderThenSymlink() throws Exception {
+               Git git = new Git(db);
+               FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
+               writeTrashFile("a/b", "Hello world b");
+               writeTrashFile("c", "Hello world c");
+               git.add().addFilepattern(".").call();
+               git.commit().setMessage("add folder a").call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               git.rm().addFilepattern("a").call();
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
+               git.add().addFilepattern("a").call();
+               git.commit().setMessage("add symlink a").call();
+
+               FileEntry entry = new FileTreeIterator.FileEntry(new File(
+                               db.getWorkTree(), "a"), db.getFS());
+               assertEquals(FileMode.SYMLINK, entry.getMode());
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
+                               db.getFS());
+               assertEquals(FileMode.TREE, entry.getMode());
+       }
+
+       /**
+        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Replace symlink
+        * 'a' by folder 'a' 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should contain 'a' with FileMode.SYMLINK after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestSymlinkThenFolder() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("c", "Hello world c");
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "c");
+               git.add().addFilepattern(".").call();
+               git.commit().setMessage("add symlink a").call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               git.rm().addFilepattern("a").call();
+               FileUtils.mkdirs(new File(db.getWorkTree(), "a"));
+               writeTrashFile("a/b", "Hello world b");
+               git.add().addFilepattern("a").call();
+               git.commit().setMessage("add folder a").call();
+
+               FileEntry entry = new FileTreeIterator.FileEntry(new File(
+                               db.getWorkTree(), "a"), db.getFS());
+               assertEquals(FileMode.TREE, entry.getMode());
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               entry = new FileTreeIterator.FileEntry(new File(db.getWorkTree(), "a"),
+                               db.getFS());
+               assertEquals(FileMode.SYMLINK, entry.getMode());
+       }
+
+       /**
+        * Steps: 1.Add file 'b' 2.Commit 3.Create branch '1' 4.Add symlink 'a'
+        * 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should not contain 'a' -> FileMode.MISSING after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestMissingThenSymlink() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("b", "Hello world b");
+               git.add().addFilepattern(".").call();
+               RevCommit commit1 = git.commit().setMessage("add file b").call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
+               git.add().addFilepattern("a").call();
+               RevCommit commit2 = git.commit().setMessage("add symlink a").call();
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               TreeWalk tw = new TreeWalk(db);
+               tw.addTree(commit1.getTree());
+               tw.addTree(commit2.getTree());
+               List<DiffEntry> scan = DiffEntry.scan(tw);
+               assertEquals(1, scan.size());
+               assertEquals(FileMode.SYMLINK, scan.get(0).getNewMode());
+               assertEquals(FileMode.MISSING, scan.get(0).getOldMode());
+       }
+
+       /**
+        * Steps: 1.Add symlink 'a' 2.Commit 3.Create branch '1' 4.Delete symlink
+        * 'a' 5.Commit 6.Checkout branch '1'
+        *
+        * The working tree should contain 'a' with FileMode.SYMLINK after the
+        * checkout.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void fileModeTestSymlinkThenMissing() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("b", "Hello world b");
+               FileUtils.createSymLink(new File(db.getWorkTree(), "a"), "b");
+               git.add().addFilepattern(".").call();
+               RevCommit commit1 = git.commit().setMessage("add file b & symlink a")
+                               .call();
+               Ref branch_1 = git.branchCreate().setName("branch_1").call();
+               git.rm().addFilepattern("a").call();
+               RevCommit commit2 = git.commit().setMessage("delete symlink a").call();
+
+               git.checkout().setName(branch_1.getName()).call();
+
+               TreeWalk tw = new TreeWalk(db);
+               tw.addTree(commit1.getTree());
+               tw.addTree(commit2.getTree());
+               List<DiffEntry> scan = DiffEntry.scan(tw);
+               assertEquals(1, scan.size());
+               assertEquals(FileMode.MISSING, scan.get(0).getNewMode());
+               assertEquals(FileMode.SYMLINK, scan.get(0).getOldMode());
+       }
+
+       @Test
+       public void createSymlinkAfterTarget() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("a", "start");
+               git.add().addFilepattern("a").call();
+               RevCommit base = git.commit().setMessage("init").call();
+               writeTrashFile("target", "someData");
+               FileUtils.createSymLink(new File(db.getWorkTree(), "link"), "target");
+               git.add().addFilepattern("target").addFilepattern("link").call();
+               git.commit().setMessage("add target").call();
+               assertEquals(4, db.getWorkTree().list().length); // self-check
+               git.checkout().setName(base.name()).call();
+               assertEquals(2, db.getWorkTree().list().length); // self-check
+               git.checkout().setName("master").call();
+               assertEquals(4, db.getWorkTree().list().length);
+               String data = read(new File(db.getWorkTree(), "target"));
+               assertEquals(8, new File(db.getWorkTree(), "target").length());
+               assertEquals("someData", data);
+               data = read(new File(db.getWorkTree(), "link"));
+               assertEquals("target",
+                               FileUtils.readSymLink(new File(db.getWorkTree(), "link")));
+               assertEquals("someData", data);
+       }
+
+       @Test
+       public void createFileSymlinkBeforeTarget() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("a", "start");
+               git.add().addFilepattern("a").call();
+               RevCommit base = git.commit().setMessage("init").call();
+               writeTrashFile("target", "someData");
+               FileUtils.createSymLink(new File(db.getWorkTree(), "tlink"), "target");
+               git.add().addFilepattern("target").addFilepattern("tlink").call();
+               git.commit().setMessage("add target").call();
+               assertEquals(4, db.getWorkTree().list().length); // self-check
+               git.checkout().setName(base.name()).call();
+               assertEquals(2, db.getWorkTree().list().length); // self-check
+               git.checkout().setName("master").call();
+               assertEquals(4, db.getWorkTree().list().length);
+               String data = read(new File(db.getWorkTree(), "target"));
+               assertEquals(8, new File(db.getWorkTree(), "target").length());
+               assertEquals("someData", data);
+               data = read(new File(db.getWorkTree(), "tlink"));
+               assertEquals("target",
+                               FileUtils.readSymLink(new File(db.getWorkTree(), "tlink")));
+               assertEquals("someData", data);
+       }
+
+       @Test
+       public void createDirSymlinkBeforeTarget() throws Exception {
+               Git git = new Git(db);
+               writeTrashFile("a", "start");
+               git.add().addFilepattern("a").call();
+               RevCommit base = git.commit().setMessage("init").call();
+               FileUtils.createSymLink(new File(db.getWorkTree(), "link"), "target");
+               FileUtils.mkdir(new File(db.getWorkTree(), "target"));
+               writeTrashFile("target/file", "someData");
+               git.add().addFilepattern("target").addFilepattern("link").call();
+               git.commit().setMessage("add target").call();
+               assertEquals(4, db.getWorkTree().list().length); // self-check
+               git.checkout().setName(base.name()).call();
+               assertEquals(2, db.getWorkTree().list().length); // self-check
+               git.checkout().setName("master").call();
+               assertEquals(4, db.getWorkTree().list().length);
+               String data = read(new File(db.getWorkTree(), "target/file"));
+               assertEquals(8, new File(db.getWorkTree(), "target/file").length());
+               assertEquals("someData", data);
+               data = read(new File(db.getWorkTree(), "link/file"));
+               assertEquals("target",
+                               FileUtils.readSymLink(new File(db.getWorkTree(), "link")));
+               assertEquals("someData", data);
+       }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java
new file mode 100644 (file)
index 0000000..741396c
--- /dev/null
@@ -0,0 +1,200 @@
+/*
+ * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.treewalk;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.ResetCommand.ResetType;
+import org.eclipse.jgit.dircache.DirCache;
+import org.eclipse.jgit.dircache.DirCacheEditor;
+import org.eclipse.jgit.dircache.DirCacheEntry;
+import org.eclipse.jgit.dircache.DirCacheIterator;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.FileMode;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectInserter;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.jgit.util.FileUtils;
+import org.junit.Test;
+
+public class FileTreeIteratorJava7Test extends RepositoryTestCase {
+       @Test
+       public void testFileModeSymLinkIsNotATree() throws IOException {
+               FS fs = db.getFS();
+               // mÃ¥l = target in swedish, just to get som unicode in here
+               writeTrashFile("mÃ¥l/data", "targetdata");
+               fs.createSymLink(new File(trash, "länk"), "mÃ¥l");
+               FileTreeIterator fti = new FileTreeIterator(db);
+               assertFalse(fti.eof());
+               assertEquals("länk", fti.getEntryPathString());
+               assertEquals(FileMode.SYMLINK, fti.getEntryFileMode());
+               fti.next(1);
+               assertFalse(fti.eof());
+               assertEquals("mÃ¥l", fti.getEntryPathString());
+               assertEquals(FileMode.TREE, fti.getEntryFileMode());
+               fti.next(1);
+               assertTrue(fti.eof());
+       }
+
+       @Test
+       public void testSymlinkNotModifiedThoughNormalized() throws Exception {
+               DirCache dc = db.lockDirCache();
+               DirCacheEditor dce = dc.editor();
+               final String UNNORMALIZED = "target/";
+               final byte[] UNNORMALIZED_BYTES = Constants.encode(UNNORMALIZED);
+               ObjectInserter oi = db.newObjectInserter();
+               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB,
+                               UNNORMALIZED_BYTES, 0,
+                               UNNORMALIZED_BYTES.length);
+               oi.release();
+               dce.add(new DirCacheEditor.PathEdit("link") {
+                       @Override
+                       public void apply(DirCacheEntry ent) {
+                               ent.setFileMode(FileMode.SYMLINK);
+                               ent.setObjectId(linkid);
+                               ent.setLength(UNNORMALIZED_BYTES.length);
+                       }
+               });
+               assertTrue(dce.commit());
+               new Git(db).commit().setMessage("Adding link").call();
+               new Git(db).reset().setMode(ResetType.HARD).call();
+               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
+               FileTreeIterator fti = new FileTreeIterator(db);
+
+               // self-check
+               assertEquals("link", fti.getEntryPathString());
+               assertEquals("link", dci.getEntryPathString());
+
+               // test
+               assertFalse(fti.isModified(dci.getDirCacheEntry(), true,
+                               db.newObjectReader()));
+       }
+
+       /**
+        * Like #testSymlinkNotModifiedThoughNormalized but there is no
+        * normalization being done.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void testSymlinkModifiedNotNormalized() throws Exception {
+               DirCache dc = db.lockDirCache();
+               DirCacheEditor dce = dc.editor();
+               final String NORMALIZED = "target";
+               final byte[] NORMALIZED_BYTES = Constants.encode(NORMALIZED);
+               ObjectInserter oi = db.newObjectInserter();
+               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB, NORMALIZED_BYTES,
+                               0, NORMALIZED_BYTES.length);
+               oi.release();
+               dce.add(new DirCacheEditor.PathEdit("link") {
+                       @Override
+                       public void apply(DirCacheEntry ent) {
+                               ent.setFileMode(FileMode.SYMLINK);
+                               ent.setObjectId(linkid);
+                               ent.setLength(NORMALIZED_BYTES.length);
+                       }
+               });
+               assertTrue(dce.commit());
+               new Git(db).commit().setMessage("Adding link").call();
+               new Git(db).reset().setMode(ResetType.HARD).call();
+               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
+               FileTreeIterator fti = new FileTreeIterator(db);
+
+               // self-check
+               assertEquals("link", fti.getEntryPathString());
+               assertEquals("link", dci.getEntryPathString());
+
+               // test
+               assertFalse(fti.isModified(dci.getDirCacheEntry(), true,
+                               db.newObjectReader()));
+       }
+
+       /**
+        * Like #testSymlinkNotModifiedThoughNormalized but here the link is
+        * modified.
+        *
+        * @throws Exception
+        */
+       @Test
+       public void testSymlinkActuallyModified() throws Exception {
+               final String NORMALIZED = "target";
+               final byte[] NORMALIZED_BYTES = Constants.encode(NORMALIZED);
+               ObjectInserter oi = db.newObjectInserter();
+               final ObjectId linkid = oi.insert(Constants.OBJ_BLOB, NORMALIZED_BYTES,
+                               0, NORMALIZED_BYTES.length);
+               oi.release();
+               DirCache dc = db.lockDirCache();
+               DirCacheEditor dce = dc.editor();
+               dce.add(new DirCacheEditor.PathEdit("link") {
+                       @Override
+                       public void apply(DirCacheEntry ent) {
+                               ent.setFileMode(FileMode.SYMLINK);
+                               ent.setObjectId(linkid);
+                               ent.setLength(NORMALIZED_BYTES.length);
+                       }
+               });
+               assertTrue(dce.commit());
+               new Git(db).commit().setMessage("Adding link").call();
+               new Git(db).reset().setMode(ResetType.HARD).call();
+
+               FileUtils.delete(new File(trash, "link"), FileUtils.NONE);
+               FS.DETECTED.createSymLink(new File(trash, "link"), "newtarget");
+               DirCacheIterator dci = new DirCacheIterator(db.readDirCache());
+               FileTreeIterator fti = new FileTreeIterator(db);
+
+               // self-check
+               assertEquals("link", fti.getEntryPathString());
+               assertEquals("link", dci.getEntryPathString());
+
+               // test
+               assertTrue(fti.isModified(dci.getDirCacheEntry(), true,
+                               db.newObjectReader()));
+       }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java
new file mode 100644 (file)
index 0000000..bb1f2a6
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.treewalk;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.util.FS;
+import org.junit.Test;
+
+public class TreeWalkJava7Test extends RepositoryTestCase {
+       @Test
+       public void testSymlinkToDirNotRecursingViaSymlink() throws Exception {
+               FS fs = db.getFS();
+               assertTrue(fs.supportsSymlinks());
+               writeTrashFile("target/data", "targetdata");
+               fs.createSymLink(new File(trash, "link"), "target");
+               TreeWalk tw = new TreeWalk(db);
+               tw.setRecursive(true);
+               tw.addTree(new FileTreeIterator(db));
+               assertTrue(tw.next());
+               assertEquals("link", tw.getPathString());
+               assertTrue(tw.next());
+               assertEquals("target/data", tw.getPathString());
+               assertFalse(tw.next());
+       }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java
new file mode 100644 (file)
index 0000000..9fba374
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2012-2013, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
+import static org.junit.Assume.assumeNotNull;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.attribute.PosixFileAttributeView;
+import java.nio.file.attribute.PosixFilePermission;
+import java.util.Set;
+
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FSJava7Test {
+       private File trash;
+
+       @Before
+       public void setUp() throws Exception {
+               trash = File.createTempFile("tmp_", "");
+               trash.delete();
+               assertTrue("mkdir " + trash, trash.mkdir());
+       }
+
+       @After
+       public void tearDown() throws Exception {
+               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY);
+       }
+
+       /**
+        * The old File methods traverse symbolic links and look at the targets.
+        * With symbolic links we usually want to modify/look at the link. For some
+        * reason the executable attribute seems to always look at the target, but
+        * for the other attributes like lastModified, hidden and exists we must
+        * differ between the link and the target.
+        *
+        * @throws IOException
+        * @throws InterruptedException
+        */
+       @Test
+       public void testSymlinkAttributes() throws IOException, InterruptedException {
+               FS fs = FS.DETECTED;
+               File link = new File(trash, "ä");
+               File target = new File(trash, "Ã¥");
+               fs.createSymLink(link, "Ã¥");
+               assertTrue(fs.exists(link));
+               String targetName = fs.readSymLink(link);
+               assertEquals("Ã¥", targetName);
+               assertTrue(fs.lastModified(link) > 0);
+               assertTrue(fs.exists(link));
+               assertFalse(fs.canExecute(link));
+               assertEquals(2, fs.length(link));
+               assertFalse(fs.exists(target));
+               assertFalse(fs.isFile(target));
+               assertFalse(fs.isDirectory(target));
+               assertFalse(fs.canExecute(target));
+
+               RepositoryTestCase.fsTick(link);
+               // Now create the link target
+               FileUtils.createNewFile(target);
+               assertTrue(fs.exists(link));
+               assertTrue(fs.lastModified(link) > 0);
+               assertTrue(fs.lastModified(target) > fs.lastModified(link));
+               assertFalse(fs.canExecute(link));
+               fs.setExecute(target, true);
+               assertFalse(fs.canExecute(link));
+               assumeTrue(fs.supportsExecute());
+               assertTrue(fs.canExecute(target));
+       }
+
+       @Test
+       public void testExecutableAttributes() throws Exception {
+               FS fs = FS.DETECTED;
+               // If this assumption fails the test is halted and ignored.
+               assumeTrue(fs instanceof FS_POSIX);
+
+               File f = new File(trash, "bla");
+               assertTrue(f.createNewFile());
+               assertFalse(fs.canExecute(f));
+
+               String umask = readUmask();
+               assumeNotNull(umask);
+
+               char others = umask.charAt(umask.length() - 1);
+
+               boolean badUmask;
+               if (others != '0' && others != '2' && others != '4' && others != '6') {
+                       // umask is set in the way that "others" can not "execute" => git
+                       // CLI will not set "execute" attribute for "others", so we also
+                       // don't care
+                       badUmask = true;
+               } else {
+                       badUmask = false;
+               }
+
+               Set<PosixFilePermission> permissions = readPermissions(f);
+               assertTrue(!permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
+               assertTrue(!permissions.contains(PosixFilePermission.GROUP_EXECUTE));
+               assertTrue(!permissions.contains(PosixFilePermission.OWNER_EXECUTE));
+
+               fs.setExecute(f, true);
+
+               permissions = readPermissions(f);
+               assertTrue("'owner' execute permission not set",
+                               permissions.contains(PosixFilePermission.OWNER_EXECUTE));
+               assertTrue("'group' execute permission not set",
+                               permissions.contains(PosixFilePermission.GROUP_EXECUTE));
+               if (badUmask) {
+                       assertFalse("'others' execute permission set",
+                                       permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
+                       System.err.println("WARNING: your system's umask: \"" + umask
+                                       + "\" doesn't allow FSJava7Test to test if setting posix"
+                                       + "  permissions for \"others\" works properly");
+                       assumeFalse(badUmask);
+               } else {
+                       assertTrue("'others' execute permission not set",
+                                       permissions.contains(PosixFilePermission.OTHERS_EXECUTE));
+               }
+       }
+
+       private String readUmask() throws Exception {
+               Process p = Runtime.getRuntime().exec(
+                               new String[] { "sh", "-c", "umask" }, null, null);
+               final BufferedReader lineRead = new BufferedReader(
+                               new InputStreamReader(p.getInputStream(), Charset
+                                               .defaultCharset().name()));
+               p.waitFor();
+               return lineRead.readLine();
+       }
+
+       private Set<PosixFilePermission> readPermissions(File f) throws IOException {
+               return Files
+                               .getFileAttributeView(f.toPath(), PosixFileAttributeView.class)
+                               .readAttributes().permissions();
+       }
+
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java
new file mode 100644 (file)
index 0000000..9dc5fac
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2013, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.util;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FileUtils7Test {
+
+       private final File trash = new File(new File("target"), "trash");
+
+       @Before
+       public void setUp() throws Exception {
+               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY | FileUtils.SKIP_MISSING);
+               assertTrue(trash.mkdirs());
+       }
+
+       @After
+       public void tearDown() throws Exception {
+               FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.RETRY);
+       }
+
+       @Test
+       public void testDeleteSymlinkToDirectoryDoesNotDeleteTarget()
+                       throws IOException {
+               FS fs = FS.DETECTED;
+               File dir = new File(trash, "dir");
+               File file = new File(dir, "file");
+               File link = new File(trash, "link");
+               FileUtils.mkdirs(dir);
+               FileUtils.createNewFile(file);
+               fs.createSymLink(link, "dir");
+               FileUtils.delete(link, FileUtils.RECURSIVE);
+               assertFalse(link.exists());
+               assertTrue(dir.exists());
+               assertTrue(file.exists());
+       }
+}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java
new file mode 100644 (file)
index 0000000..b14a9bf
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2014 Matthias Sohn <matthias.sohn@sap.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.eclipse.jgit.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.eclipse.jgit.api.Git;
+import org.eclipse.jgit.api.errors.AbortedByHookException;
+import org.eclipse.jgit.hooks.CommitMsgHook;
+import org.eclipse.jgit.hooks.PreCommitHook;
+import org.eclipse.jgit.junit.JGitTestUtil;
+import org.eclipse.jgit.junit.RepositoryTestCase;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Assume;
+import org.junit.Test;
+
+public class HookTest extends RepositoryTestCase {
+
+       @Test
+       public void testFindHook() throws Exception {
+               assumeSupportedPlatform();
+
+               assertNull("no hook should be installed",
+                               FS.DETECTED.findHook(db, PreCommitHook.NAME));
+               File hookFile = writeHookFile(PreCommitHook.NAME,
+                               "#!/bin/bash\necho \"test $1 $2\"");
+               assertEquals("expected to find pre-commit hook", hookFile,
+                               FS.DETECTED.findHook(db, PreCommitHook.NAME));
+       }
+
+       @Test
+       public void testFailedCommitMsgHookBlocksCommit() throws Exception {
+               assumeSupportedPlatform();
+
+               writeHookFile(CommitMsgHook.NAME,
+                               "#!/bin/sh\necho \"test\"\n\necho 1>&2 \"stderr\"\nexit 1");
+               Git git = Git.wrap(db);
+               String path = "a.txt";
+               writeTrashFile(path, "content");
+               git.add().addFilepattern(path).call();
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               try {
+                       git.commit().setMessage("commit")
+                                       .setHookOutputStream(new PrintStream(out)).call();
+                       fail("expected commit-msg hook to abort commit");
+               } catch (AbortedByHookException e) {
+                       assertEquals("unexpected error message from commit-msg hook",
+                                       "Rejected by \"commit-msg\" hook.\nstderr\n",
+                                       e.getMessage());
+                       assertEquals("unexpected output from commit-msg hook", "test\n",
+                                       out.toString());
+               }
+       }
+
+       @Test
+       public void testCommitMsgHookReceivesCorrectParameter() throws Exception {
+               assumeSupportedPlatform();
+
+               writeHookFile(CommitMsgHook.NAME,
+                               "#!/bin/sh\necho $1\n\necho 1>&2 \"stderr\"\nexit 0");
+               Git git = Git.wrap(db);
+               String path = "a.txt";
+               writeTrashFile(path, "content");
+               git.add().addFilepattern(path).call();
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               git.commit().setMessage("commit")
+                               .setHookOutputStream(new PrintStream(out)).call();
+               assertEquals(".git/COMMIT_EDITMSG\n", out.toString("UTF-8"));
+       }
+
+       @Test
+       public void testCommitMsgHookCanModifyCommitMessage() throws Exception {
+               assumeSupportedPlatform();
+
+               writeHookFile(CommitMsgHook.NAME,
+                               "#!/bin/sh\necho \"new message\" > $1\nexit 0");
+               Git git = Git.wrap(db);
+               String path = "a.txt";
+               writeTrashFile(path, "content");
+               git.add().addFilepattern(path).call();
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               RevCommit revCommit = git.commit().setMessage("commit")
+                               .setHookOutputStream(new PrintStream(out)).call();
+               assertEquals("new message\n", revCommit.getFullMessage());
+       }
+
+       @Test
+       public void testRunHook() throws Exception {
+               assumeSupportedPlatform();
+
+               writeHookFile(PreCommitHook.NAME,
+                               "#!/bin/sh\necho \"test $1 $2\"\nread INPUT\necho $INPUT\necho 1>&2 \"stderr\"");
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               ByteArrayOutputStream err = new ByteArrayOutputStream();
+               ProcessResult res = FS.DETECTED.runHookIfPresent(db,
+                               PreCommitHook.NAME,
+                               new String[] {
+                               "arg1", "arg2" },
+                               new PrintStream(out), new PrintStream(err), "stdin");
+               assertEquals("unexpected hook output", "test arg1 arg2\nstdin\n",
+                               out.toString("UTF-8"));
+               assertEquals("unexpected output on stderr stream", "stderr\n",
+                               err.toString("UTF-8"));
+               assertEquals("unexpected exit code", 0, res.getExitCode());
+               assertEquals("unexpected process status", ProcessResult.Status.OK,
+                               res.getStatus());
+       }
+
+       @Test
+       public void testFailedPreCommitHookBlockCommit() throws Exception {
+               assumeSupportedPlatform();
+
+               writeHookFile(PreCommitHook.NAME,
+                               "#!/bin/sh\necho \"test\"\n\necho 1>&2 \"stderr\"\nexit 1");
+               Git git = Git.wrap(db);
+               String path = "a.txt";
+               writeTrashFile(path, "content");
+               git.add().addFilepattern(path).call();
+               ByteArrayOutputStream out = new ByteArrayOutputStream();
+               try {
+                       git.commit().setMessage("commit")
+                                       .setHookOutputStream(new PrintStream(out)).call();
+                       fail("expected pre-commit hook to abort commit");
+               } catch (AbortedByHookException e) {
+                       assertEquals("unexpected error message from pre-commit hook",
+                                       "Rejected by \"pre-commit\" hook.\nstderr\n",
+                                       e.getMessage());
+                       assertEquals("unexpected output from pre-commit hook", "test\n",
+                                       out.toString());
+               }
+       }
+
+       private File writeHookFile(final String name, final String data)
+                       throws IOException {
+               File path = new File(db.getWorkTree() + "/.git/hooks/", name);
+               JGitTestUtil.write(path, data);
+               FS.DETECTED.setExecute(path, true);
+               return path;
+       }
+
+       private void assumeSupportedPlatform() {
+               Assume.assumeTrue(FS.DETECTED instanceof FS_POSIX
+                               || FS.DETECTED instanceof FS_Win32_Cygwin);
+       }
+}
index 20449febc9ed0e62e1c1233d4e49c4c0cabb5766..3dfa7b45213cccfac3722c5c9d5e52a7dcb12de6 100644 (file)
             </message_arguments>
         </filter>
     </resource>
+    <resource path="src/org/eclipse/jgit/util/FileUtil.java" type="org.eclipse.jgit.util.FileUtil">
+        <filter comment="moved into another bundle keeping original package" id="1110441988">
+            <message_arguments>
+                <message_argument value="org.eclipse.jgit.util.FileUtil"/>
+            </message_arguments>
+        </filter>
+    </resource>
 </component>
index de09ad4f7c829f22ab9849d0c9203498ff1a73e2..706b54e16714868b582fb015a247858936081519 100644 (file)
@@ -102,10 +102,9 @@ public abstract class FS {
                                        return new FS_Win32_Cygwin();
                                else
                                        return new FS_Win32();
-                       } else if (FS_POSIX_Java6.hasExecute())
-                               return new FS_POSIX_Java6();
-                       else
-                               return new FS_POSIX_Java5();
+                       } else {
+                               return new FS_POSIX();
+                       }
                }
        }
 
@@ -148,22 +147,7 @@ public abstract class FS {
         */
        public static FS detect(Boolean cygwinUsed) {
                if (factory == null) {
-                       try {
-                               Class<?> activatorClass = Class
-                                               .forName("org.eclipse.jgit.util.Java7FSFactory"); //$NON-NLS-1$
-                               // found Java7
-                               factory = (FSFactory) activatorClass.newInstance();
-                       } catch (ClassNotFoundException e) {
-                               // Java7 module not found
-                               // Silently ignore failure to find Java7 FS factory
-                               factory = new FS.FSFactory();
-                       } catch (UnsupportedClassVersionError e) {
-                               factory = new FS.FSFactory();
-                       } catch (InstantiationException e) {
-                               factory = new FS.FSFactory();
-                       } catch (IllegalAccessException e) {
-                               factory = new FS.FSFactory();
-                       }
+                       factory = new FS.FSFactory();
                }
                return factory.detect(cygwinUsed);
        }
index a6984baa37813dc85dfd1e989c506f24229c5d0c..47760f6618a4d7806bfff7e7b526c3be0b444785 100644 (file)
  */
 package org.eclipse.jgit.util;
 
+import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.PrintStream;
 import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.PosixFilePermission;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.Repository;
 
 /**
@@ -58,7 +65,144 @@ import org.eclipse.jgit.lib.Repository;
  *
  * @since 3.0
  */
-public abstract class FS_POSIX extends FS {
+public class FS_POSIX extends FS {
+
+       static {
+               String umask = readUmask();
+
+               // umask return value consists of 3 or 4 digits, like "002" or "0002"
+               if (umask != null && umask.length() > 0 && umask.matches("\\d{3,4}")) { //$NON-NLS-1$
+                       EXECUTE_FOR_OTHERS = isGranted(PosixFilePermission.OTHERS_EXECUTE,
+                                       umask);
+                       EXECUTE_FOR_GROUP = isGranted(PosixFilePermission.GROUP_EXECUTE,
+                                       umask);
+               } else {
+                       EXECUTE_FOR_OTHERS = null;
+                       EXECUTE_FOR_GROUP = null;
+               }
+       }
+
+       /**
+        * @since 4.0
+        */
+       protected static final Boolean EXECUTE_FOR_OTHERS;
+
+       /**
+        * @since 4.0
+        */
+       protected static final Boolean EXECUTE_FOR_GROUP;
+
+       @Override
+       public FS newInstance() {
+               return new FS_POSIX();
+       }
+
+       /**
+        * Derives requested permission from given octal umask value as defined e.g.
+        * in <a href="http://linux.die.net/man/2/umask">http://linux.die.net/man/2/
+        * umask</a>.
+        * <p>
+        * The umask expected here must consist of 3 or 4 digits. Last three digits
+        * are significant here because they represent file permissions granted to
+        * the "owner", "group" and "others" (in this order).
+        * <p>
+        * Each single digit from the umask represents 3 bits of the mask standing
+        * for "<b>r</b>ead, <b>w</b>rite, e<b>x</b>ecute" permissions (in this
+        * order).
+        * <p>
+        * The possible umask values table:
+        *
+        * <pre>
+        * Value : Bits:Abbr.: Permission
+        *     0 : 000 :rwx  : read, write and execute
+        *     1 : 001 :rw   : read and write
+        *     2 : 010 :rx   : read and execute
+        *     3 : 011 :r    : read only
+        *     4 : 100 :wx   : write and execute
+        *     5 : 101 :w    : write only
+        *     6 : 110 :x    : execute only
+        *     7 : 111 :     : no permissions
+        * </pre>
+        * <p>
+        * Note, that umask value is used to "mask" the requested permissions on
+        * file creation by combining the requested permission bit with the
+        * <b>negated</b> value of the umask bit.
+        * <p>
+        * Simply speaking, if a bit is <b>not</b> set in the umask, then the
+        * appropriate right <b>will</b> be granted <b>if</b> requested. If a bit is
+        * set in the umask value, then the appropriate permission will be not
+        * granted.
+        * <p>
+        * Example:
+        * <li>umask 023 ("000 010 011" or rwx rx r) combined with the request to
+        * create an executable file with full set of permissions for everyone (777)
+        * results in the file with permissions 754 (rwx rx r).
+        * <li>umask 002 ("000 000 010" or rwx rwx rx) combined with the request to
+        * create an executable file with full set of permissions for everyone (777)
+        * results in the file with permissions 775 (rwx rwx rx).
+        * <li>umask 002 ("000 000 010" or rwx rwx rx) combined with the request to
+        * create a file without executable rights for everyone (666) results in the
+        * file with permissions 664 (rw rw r).
+        *
+        * @param p
+        *            non null permission
+        * @param umask
+        *            octal umask value represented by at least three digits. The
+        *            digits (read from the end to beginning of the umask) represent
+        *            permissions for "others", "group" and "owner".
+        *
+        * @return true if the requested permission is set according to given umask
+        * @since 4.0
+        */
+       protected static Boolean isGranted(PosixFilePermission p, String umask) {
+               char val;
+               switch (p) {
+               case OTHERS_EXECUTE:
+                       // Read last digit, because umask is ordered as: User/Group/Others.
+                       val = umask.charAt(umask.length() - 1);
+                       return isExecuteGranted(val);
+               case GROUP_EXECUTE:
+                       val = umask.charAt(umask.length() - 2);
+                       return isExecuteGranted(val);
+               default:
+                       throw new UnsupportedOperationException(
+                                       "isGranted() for " + p + " is not implemented!"); //$NON-NLS-1$ //$NON-NLS-2$
+               }
+       }
+
+       /**
+        * @param c
+        *            character representing octal permission value from the table
+        *            in {@link #isGranted(PosixFilePermission, String)}
+        * @return true if the "execute" permission is granted according to given
+        *         character
+        */
+       private static Boolean isExecuteGranted(char c) {
+               if (c == '0' || c == '2' || c == '4' || c == '6')
+                       return Boolean.TRUE;
+               return Boolean.FALSE;
+       }
+
+       /**
+        * @return umask returned from running umask command in a shell
+        * @since 4.0
+        */
+       protected static String readUmask() {
+               Process p;
+               try {
+                       p = Runtime.getRuntime().exec(
+                                       new String[] { "sh", "-c", "umask" }, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                       try (BufferedReader lineRead = new BufferedReader(
+                                       new InputStreamReader(p.getInputStream(), Charset
+                                                       .defaultCharset().name()))) {
+                               p.waitFor();
+                               return lineRead.readLine();
+                       }
+               } catch (Exception e) {
+                       return null;
+               }
+       }
+
        @Override
        protected File discoverGitPrefix() {
                String path = SystemReader.getInstance().getenv("PATH"); //$NON-NLS-1$
@@ -108,8 +252,48 @@ public abstract class FS_POSIX extends FS {
        }
 
        @Override
-       public void setHidden(File path, boolean hidden) throws IOException {
-               // Do nothing
+       public boolean supportsExecute() {
+               return true;
+       }
+
+       @Override
+       public boolean canExecute(File f) {
+               return FileUtil.canExecute(f);
+       }
+
+       @Override
+       public boolean setExecute(File f, boolean canExecute) {
+               if (!isFile(f))
+                       return false;
+               // only if the execute has to be set, and we know the umask
+               if (canExecute && EXECUTE_FOR_OTHERS != null) {
+                       try {
+                               Path path = f.toPath();
+                               Set<PosixFilePermission> pset = Files
+                                               .getPosixFilePermissions(path);
+                               // user is always allowed to set execute
+                               pset.add(PosixFilePermission.OWNER_EXECUTE);
+
+                               if (EXECUTE_FOR_GROUP.booleanValue())
+                                       pset.add(PosixFilePermission.GROUP_EXECUTE);
+
+                               if (EXECUTE_FOR_OTHERS.booleanValue())
+                                       pset.add(PosixFilePermission.OTHERS_EXECUTE);
+
+                               Files.setPosixFilePermissions(path, pset);
+                               return true;
+                       } catch (IOException e) {
+                               // The interface doesn't allow to throw IOException
+                               final boolean debug = Boolean.parseBoolean(SystemReader
+                                               .getInstance().getProperty("jgit.fs.debug")); //$NON-NLS-1$
+                               if (debug)
+                                       System.err.println(e);
+                               return false;
+                       }
+               }
+               // if umask is not working for some reason: fall back to default (buggy)
+               // implementation which does not consider umask: see bug 424395
+               return f.setExecutable(canExecute);
        }
 
        @Override
@@ -135,4 +319,111 @@ public abstract class FS_POSIX extends FS {
                return internalRunHookIfPresent(repository, hookName, args, outRedirect,
                                errRedirect, stdinArgs);
        }
+
+       @Override
+       public boolean retryFailedLockFileCommit() {
+               return false;
+       }
+
+       @Override
+       public boolean supportsSymlinks() {
+               return true;
+       }
+
+       @Override
+       public boolean isSymLink(File path) throws IOException {
+               return FileUtil.isSymlink(path);
+       }
+
+       @Override
+       public long lastModified(File path) throws IOException {
+               return FileUtil.lastModified(path);
+       }
+
+       @Override
+       public void setLastModified(File path, long time) throws IOException {
+               FileUtil.setLastModified(path, time);
+       }
+
+       @Override
+       public void delete(File path) throws IOException {
+               FileUtil.delete(path);
+       }
+
+       @Override
+       public long length(File f) throws IOException {
+               return FileUtil.getLength(f);
+       }
+
+       @Override
+       public boolean exists(File path) {
+               return FileUtil.exists(path);
+       }
+
+       @Override
+       public boolean isDirectory(File path) {
+               return FileUtil.isDirectory(path);
+       }
+
+       @Override
+       public boolean isFile(File path) {
+               return FileUtil.isFile(path);
+       }
+
+       @Override
+       public boolean isHidden(File path) throws IOException {
+               return FileUtil.isHidden(path);
+       }
+
+       @Override
+       public void setHidden(File path, boolean hidden) throws IOException {
+               // no action on POSIX
+       }
+
+       @Override
+       public String readSymLink(File path) throws IOException {
+               return FileUtil.readSymlink(path);
+       }
+
+       @Override
+       public void createSymLink(File path, String target) throws IOException {
+               FileUtil.createSymLink(path, target);
+       }
+
+       /**
+        * @since 3.3
+        */
+       @Override
+       public Attributes getAttributes(File path) {
+               return FileUtil.getFileAttributesPosix(this, path);
+       }
+
+       /**
+        * @since 3.3
+        */
+       @Override
+       public File normalize(File file) {
+               return FileUtil.normalize(file);
+       }
+
+       /**
+        * @since 3.3
+        */
+       @Override
+       public String normalize(String name) {
+               return FileUtil.normalize(name);
+       }
+
+       /**
+        * @since 3.7
+        */
+       @Override
+       public File findHook(Repository repository, String hookName) {
+               final File gitdir = repository.getDirectory();
+               final Path hookPath = gitdir.toPath().resolve(Constants.HOOKS)
+                               .resolve(hookName);
+               if (Files.isExecutable(hookPath))
+                       return hookPath.toFile();
+               return null;
+       }
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java5.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java5.java
deleted file mode 100644 (file)
index 46ea2aa..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.File;
-
-
-/**
- * FS implementaton for Java5
- *
- * @since 3.0
- */
-public class FS_POSIX_Java5 extends FS_POSIX {
-       /**
-        * Constructor
-        */
-       public FS_POSIX_Java5() {
-               super();
-       }
-
-       /**
-        * Constructor
-        *
-        * @param src
-        *            instance whose attributes to copy
-        */
-       public FS_POSIX_Java5(FS src) {
-               super(src);
-       }
-
-       @Override
-       public FS newInstance() {
-               return new FS_POSIX_Java5(this);
-       }
-
-       public boolean supportsExecute() {
-               return false;
-       }
-
-       public boolean canExecute(final File f) {
-               return false;
-       }
-
-       public boolean setExecute(final File f, final boolean canExec) {
-               return false;
-       }
-
-       @Override
-       public boolean retryFailedLockFileCommit() {
-               return false;
-       }
-}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java6.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX_Java6.java
deleted file mode 100644 (file)
index 47a7a68..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2007, Robin Rosenberg <me@lathund.dewire.com>
- * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- * and other copyright owners as documented in the project's IP log.
- *
- * This program and the accompanying materials are made available
- * under the terms of the Eclipse Distribution License v1.0 which
- * accompanies this distribution, is reproduced below, and is
- * available at http://www.eclipse.org/org/documents/edl-v10.php
- *
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- *   copyright notice, this list of conditions and the following
- *   disclaimer in the documentation and/or other materials provided
- *   with the distribution.
- *
- * - Neither the name of the Eclipse Foundation, Inc. nor the
- *   names of its contributors may be used to endorse or promote
- *   products derived from this software without specific prior
- *   written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
- * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package org.eclipse.jgit.util;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-
-/**
- * FS implementation for POSIX systems using Java6
- *
- * @since 3.0
- */
-public class FS_POSIX_Java6 extends FS_POSIX {
-       private static final Method canExecute;
-
-       private static final Method setExecute;
-
-       static {
-               canExecute = needMethod(File.class, "canExecute"); //$NON-NLS-1$
-               setExecute = needMethod(File.class, "setExecutable", Boolean.TYPE); //$NON-NLS-1$
-       }
-
-       /**
-        * @return true if Java has the ability to set and get the executable flag
-        *         on files
-        */
-       public static boolean hasExecute() {
-               return canExecute != null && setExecute != null;
-       }
-
-       private static Method needMethod(final Class<?> on, final String name,
-                       final Class<?>... args) {
-               try {
-                       return on.getMethod(name, args);
-               } catch (SecurityException e) {
-                       return null;
-               } catch (NoSuchMethodException e) {
-                       return null;
-               }
-       }
-
-       /**
-        * Constructor
-        */
-       public FS_POSIX_Java6() {
-               super();
-       }
-
-       /**
-        * Constructor
-        *
-        * @param src
-        *            instance whose attributes to copy
-        */
-       public FS_POSIX_Java6(FS src) {
-               super(src);
-       }
-
-       @Override
-       public FS newInstance() {
-               return new FS_POSIX_Java6(this);
-       }
-
-       public boolean supportsExecute() {
-               return true;
-       }
-
-       public boolean canExecute(final File f) {
-               try {
-                       final Object r = canExecute.invoke(f, (Object[]) null);
-                       return ((Boolean) r).booleanValue();
-               } catch (IllegalArgumentException e) {
-                       throw new Error(e);
-               } catch (IllegalAccessException e) {
-                       throw new Error(e);
-               } catch (InvocationTargetException e) {
-                       throw new Error(e);
-               }
-       }
-
-       public boolean setExecute(final File f, final boolean canExec) {
-               try {
-                       final Object r;
-                       r = setExecute.invoke(f, new Object[] { Boolean.valueOf(canExec) });
-                       return ((Boolean) r).booleanValue();
-               } catch (IllegalArgumentException e) {
-                       throw new Error(e);
-               } catch (IllegalAccessException e) {
-                       throw new Error(e);
-               } catch (InvocationTargetException e) {
-                       throw new Error(e);
-               }
-       }
-
-       @Override
-       public boolean retryFailedLockFileCommit() {
-               return false;
-       }
-}
index 5822dcfae1dcb3f801ebe003f99b0f71d2f334cf..6f553ccfa6467cc2e843332ae26dca9268f94106 100644 (file)
@@ -45,6 +45,7 @@
 package org.eclipse.jgit.util;
 
 import java.io.File;
+import java.io.IOException;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -57,6 +58,9 @@ import java.util.List;
  * @since 3.0
  */
 public class FS_Win32 extends FS {
+
+       private volatile Boolean supportSymlinks;
+
        /**
         * Constructor
         */
@@ -161,4 +165,99 @@ public class FS_Win32 extends FS {
                proc.command(argv);
                return proc;
        }
+
+       @Override
+       public boolean supportsSymlinks() {
+               if (supportSymlinks == null)
+                       detectSymlinkSupport();
+               return Boolean.TRUE.equals(supportSymlinks);
+       }
+
+       private void detectSymlinkSupport() {
+               File tempFile = null;
+               try {
+                       tempFile = File.createTempFile("tempsymlinktarget", ""); //$NON-NLS-1$ //$NON-NLS-2$
+                       File linkName = new File(tempFile.getParentFile(), "tempsymlink"); //$NON-NLS-1$
+                       FileUtil.createSymLink(linkName, tempFile.getPath());
+                       supportSymlinks = Boolean.TRUE;
+                       linkName.delete();
+               } catch (IOException | UnsupportedOperationException e) {
+                       supportSymlinks = Boolean.FALSE;
+               } finally {
+                       if (tempFile != null)
+                               try {
+                                       FileUtils.delete(tempFile);
+                               } catch (IOException e) {
+                                       throw new RuntimeException(e); // panic
+                               }
+               }
+       }
+
+       @Override
+       public boolean isSymLink(File path) throws IOException {
+               return FileUtil.isSymlink(path);
+       }
+
+       @Override
+       public long lastModified(File path) throws IOException {
+               return FileUtil.lastModified(path);
+       }
+
+       @Override
+       public void setLastModified(File path, long time) throws IOException {
+               FileUtil.setLastModified(path, time);
+       }
+
+       @Override
+       public void delete(File path) throws IOException {
+               FileUtil.delete(path);
+       }
+
+       @Override
+       public long length(File f) throws IOException {
+               return FileUtil.getLength(f);
+       }
+
+       @Override
+       public boolean exists(File path) {
+               return FileUtil.exists(path);
+       }
+
+       @Override
+       public boolean isDirectory(File path) {
+               return FileUtil.isDirectory(path);
+       }
+
+       @Override
+       public boolean isFile(File path) {
+               return FileUtil.isFile(path);
+       }
+
+       @Override
+       public boolean isHidden(File path) throws IOException {
+               return FileUtil.isHidden(path);
+       }
+
+       @Override
+       public void setHidden(File path, boolean hidden) throws IOException {
+               FileUtil.setHidden(path, hidden);
+       }
+
+       @Override
+       public String readSymLink(File path) throws IOException {
+               return FileUtil.readSymlink(path);
+       }
+
+       @Override
+       public void createSymLink(File path, String target) throws IOException {
+               FileUtil.createSymLink(path, target);
+       }
+
+       /**
+        * @since 3.3
+        */
+       @Override
+       public Attributes getAttributes(File path) {
+               return FileUtil.getFileAttributesBasic(this, path);
+       }
 }
index 000bdcef5c53d07333567ecc9f5db52bfd923930..3c3b2ebd9770524894e0577c137d184562ad1bea 100644 (file)
 package org.eclipse.jgit.util;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.PrintStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.ArrayList;
@@ -52,6 +55,7 @@ import java.util.Arrays;
 import java.util.List;
 
 import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.Repository;
 
 /**
@@ -158,4 +162,90 @@ public class FS_Win32_Cygwin extends FS_Win32 {
                return internalRunHookIfPresent(repository, hookName, args, outRedirect,
                                errRedirect, stdinArgs);
        }
+
+       @Override
+       public boolean supportsSymlinks() {
+               return true;
+       }
+
+       @Override
+       public boolean isSymLink(File path) throws IOException {
+               return FileUtil.isSymlink(path);
+       }
+
+       @Override
+       public long lastModified(File path) throws IOException {
+               return FileUtil.lastModified(path);
+       }
+
+       @Override
+       public void setLastModified(File path, long time) throws IOException {
+               FileUtil.setLastModified(path, time);
+       }
+
+       @Override
+       public void delete(File path) throws IOException {
+               FileUtil.delete(path);
+       }
+
+       @Override
+       public long length(File f) throws IOException {
+               return FileUtil.getLength(f);
+       }
+
+       @Override
+       public boolean exists(File path) {
+               return FileUtil.exists(path);
+       }
+
+       @Override
+       public boolean isDirectory(File path) {
+               return FileUtil.isDirectory(path);
+       }
+
+       @Override
+       public boolean isFile(File path) {
+               return FileUtil.isFile(path);
+       }
+
+       @Override
+       public boolean isHidden(File path) throws IOException {
+               return FileUtil.isHidden(path);
+       }
+
+       @Override
+       public void setHidden(File path, boolean hidden) throws IOException {
+               FileUtil.setHidden(path, hidden);
+       }
+
+       @Override
+       public String readSymLink(File path) throws IOException {
+               return FileUtil.readSymlink(path);
+       }
+
+       @Override
+       public void createSymLink(File path, String target) throws IOException {
+               FileUtil.createSymLink(path, target);
+       }
+
+       /**
+        * @since 3.3
+        */
+       @Override
+       public Attributes getAttributes(File path) {
+               return FileUtil.getFileAttributesBasic(this, path);
+       }
+
+       /**
+        * @since 3.7
+        */
+       @Override
+       public File findHook(Repository repository, String hookName) {
+               final File gitdir = repository.getDirectory();
+               final Path hookPath = gitdir.toPath().resolve(Constants.HOOKS)
+                               .resolve(hookName);
+               if (Files.isExecutable(hookPath))
+                       return hookPath.toFile();
+               return null;
+       }
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtil.java
new file mode 100644 (file)
index 0000000..bd38b14
--- /dev/null
@@ -0,0 +1,330 @@
+/*
+ * Copyright (C) 2012, Robin Rosenberg <robin.rosenberg@dewire.com>
+ * and other copyright owners as documented in the project's IP log.
+ *
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Distribution License v1.0 which
+ * accompanies this distribution, is reproduced below, and is
+ * available at http://www.eclipse.org/org/documents/edl-v10.php
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials provided
+ *   with the distribution.
+ *
+ * - Neither the name of the Eclipse Foundation, Inc. nor the
+ *   names of its contributors may be used to endorse or promote
+ *   products derived from this software without specific prior
+ *   written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.eclipse.jgit.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.LinkOption;
+import java.nio.file.NoSuchFileException;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributeView;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.nio.file.attribute.FileTime;
+import java.nio.file.attribute.PosixFileAttributeView;
+import java.nio.file.attribute.PosixFileAttributes;
+import java.nio.file.attribute.PosixFilePermission;
+import java.text.Normalizer;
+import java.text.Normalizer.Form;
+
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.util.FS.Attributes;
+
+/**
+ * File utilities using Java 7 NIO2
+ */
+public class FileUtil {
+
+       static class Java7BasicAttributes extends Attributes {
+
+               Java7BasicAttributes(FS fs, File fPath, boolean exists,
+                               boolean isDirectory, boolean isExecutable,
+                               boolean isSymbolicLink, boolean isRegularFile,
+                               long creationTime, long lastModifiedTime, long length) {
+                       super(fs, fPath, exists, isDirectory, isExecutable, isSymbolicLink,
+                                       isRegularFile, creationTime, lastModifiedTime, length);
+               }
+       }
+
+       /**
+        * @param path
+        * @return target path of the symlink
+        * @throws IOException
+        */
+       public static String readSymlink(File path) throws IOException {
+               Path nioPath = path.toPath();
+               Path target = Files.readSymbolicLink(nioPath);
+               String targetString = target.toString();
+               if (SystemReader.getInstance().isWindows())
+                       targetString = targetString.replace('\\', '/');
+               else if (SystemReader.getInstance().isMacOS())
+                       targetString = Normalizer.normalize(targetString, Form.NFC);
+               return targetString;
+       }
+
+       /**
+        * @param path
+        *            path of the symlink to be created
+        * @param target
+        *            target of the symlink to be created
+        * @throws IOException
+        */
+       public static void createSymLink(File path, String target)
+                       throws IOException {
+               Path nioPath = path.toPath();
+               if (Files.exists(nioPath, LinkOption.NOFOLLOW_LINKS))
+                       Files.delete(nioPath);
+               if (SystemReader.getInstance().isWindows())
+                       target = target.replace('/', '\\');
+               Path nioTarget = new File(target).toPath();
+               Files.createSymbolicLink(nioPath, nioTarget);
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the passed path is a symlink
+        */
+       public static boolean isSymlink(File path) {
+               Path nioPath = path.toPath();
+               return Files.isSymbolicLink(nioPath);
+       }
+
+       /**
+        * @param path
+        * @return lastModified attribute for given path
+        * @throws IOException
+        */
+       public static long lastModified(File path) throws IOException {
+               Path nioPath = path.toPath();
+               return Files.getLastModifiedTime(nioPath, LinkOption.NOFOLLOW_LINKS)
+                               .toMillis();
+       }
+
+       /**
+        * @param path
+        * @param time
+        * @throws IOException
+        */
+       public static void setLastModified(File path, long time) throws IOException {
+               Path nioPath = path.toPath();
+               Files.setLastModifiedTime(nioPath, FileTime.fromMillis(time));
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the given path exists
+        */
+       public static boolean exists(File path) {
+               Path nioPath = path.toPath();
+               return Files.exists(nioPath, LinkOption.NOFOLLOW_LINKS);
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the given path is hidden
+        * @throws IOException
+        */
+       public static boolean isHidden(File path) throws IOException {
+               Path nioPath = path.toPath();
+               return Files.isHidden(nioPath);
+       }
+
+       /**
+        * @param path
+        * @param hidden
+        * @throws IOException
+        */
+       public static void setHidden(File path, boolean hidden) throws IOException {
+               Path nioPath = path.toPath();
+               Files.setAttribute(nioPath, "dos:hidden", Boolean.valueOf(hidden), //$NON-NLS-1$
+                               LinkOption.NOFOLLOW_LINKS);
+       }
+
+       /**
+        * @param path
+        * @return length of the given file
+        * @throws IOException
+        */
+       public static long getLength(File path) throws IOException {
+               Path nioPath = path.toPath();
+               if (Files.isSymbolicLink(nioPath))
+                       return Files.readSymbolicLink(nioPath).toString()
+                                       .getBytes(Constants.CHARSET).length;
+               return Files.size(nioPath);
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the given file a directory
+        */
+       public static boolean isDirectory(File path) {
+               Path nioPath = path.toPath();
+               return Files.isDirectory(nioPath, LinkOption.NOFOLLOW_LINKS);
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the given file is a file
+        */
+       public static boolean isFile(File path) {
+               Path nioPath = path.toPath();
+               return Files.isRegularFile(nioPath, LinkOption.NOFOLLOW_LINKS);
+       }
+
+       /**
+        * @param path
+        * @return {@code true} if the given file can be executed
+        */
+       public static boolean canExecute(File path) {
+               if (!isFile(path))
+                       return false;
+               return path.canExecute();
+       }
+
+       /**
+        * @param path
+        * @param executable
+        * @return true if succeeded, false if not supported or failed
+        * @deprecated the implementation is highly platform dependent, consider
+        *             using {@link FS#setExecute(File, boolean)} instead
+        */
+       @Deprecated
+       public static boolean setExecute(File path, boolean executable) {
+               if (!isFile(path))
+                       return false;
+               return path.setExecutable(executable);
+       }
+
+       /**
+        * @param path
+        * @throws IOException
+        */
+       public static void delete(File path) throws IOException {
+               Path nioPath = path.toPath();
+               Files.delete(nioPath);
+       }
+
+       static Attributes getFileAttributesBasic(FS fs, File path) {
+               try {
+                       Path nioPath = path.toPath();
+                       BasicFileAttributes readAttributes = nioPath
+                                       .getFileSystem()
+                                       .provider()
+                                       .getFileAttributeView(nioPath,
+                                                       BasicFileAttributeView.class,
+                                                       LinkOption.NOFOLLOW_LINKS).readAttributes();
+                       Attributes attributes = new FileUtil.Java7BasicAttributes(fs, path,
+                                       true,
+                                       readAttributes.isDirectory(),
+                                       fs.supportsExecute() ? path.canExecute() : false,
+                                       readAttributes.isSymbolicLink(),
+                                       readAttributes.isRegularFile(), //
+                                       readAttributes.creationTime().toMillis(), //
+                                       readAttributes.lastModifiedTime().toMillis(),
+                                       readAttributes.isSymbolicLink() ? Constants
+                                                       .encode(FileUtils.readSymLink(path)).length
+                                                       : readAttributes.size());
+                       return attributes;
+               } catch (NoSuchFileException e) {
+                       return new FileUtil.Java7BasicAttributes(fs, path, false, false,
+                                       false, false, false, 0L, 0L, 0L);
+               } catch (IOException e) {
+                       return new Attributes(path, fs);
+               }
+       }
+
+       /**
+        * @param fs
+        * @param path
+        * @return file system attributes for the given file
+        */
+       public static Attributes getFileAttributesPosix(FS fs, File path) {
+               try {
+                       Path nioPath = path.toPath();
+                       PosixFileAttributes readAttributes = nioPath
+                                       .getFileSystem()
+                                       .provider()
+                                       .getFileAttributeView(nioPath,
+                                                       PosixFileAttributeView.class,
+                                                       LinkOption.NOFOLLOW_LINKS).readAttributes();
+                       Attributes attributes = new FileUtil.Java7BasicAttributes(
+                                       fs,
+                                       path,
+                                       true, //
+                                       readAttributes.isDirectory(), //
+                                       readAttributes.permissions().contains(
+                                                       PosixFilePermission.OWNER_EXECUTE),
+                                       readAttributes.isSymbolicLink(),
+                                       readAttributes.isRegularFile(), //
+                                       readAttributes.creationTime().toMillis(), //
+                                       readAttributes.lastModifiedTime().toMillis(),
+                                       readAttributes.size());
+                       return attributes;
+               } catch (NoSuchFileException e) {
+                       return new FileUtil.Java7BasicAttributes(fs, path, false, false,
+                                       false, false, false, 0L, 0L, 0L);
+               } catch (IOException e) {
+                       return new Attributes(path, fs);
+               }
+       }
+
+       /**
+        * @param file
+        * @return on Mac: NFC normalized {@link File}, otherwise the passed file
+        */
+       public static File normalize(File file) {
+               if (SystemReader.getInstance().isMacOS()) {
+                       // TODO: Would it be faster to check with isNormalized first
+                       // assuming normalized paths are much more common
+                       String normalized = Normalizer.normalize(file.getPath(),
+                                       Normalizer.Form.NFC);
+                       return new File(normalized);
+               }
+               return file;
+       }
+
+       /**
+        * @param name
+        * @return on Mac: NFC normalized form of given name
+        */
+       public static String normalize(String name) {
+               if (SystemReader.getInstance().isMacOS()) {
+                       if (name == null)
+                               return null;
+                       return Normalizer.normalize(name, Normalizer.Form.NFC);
+               }
+               return name;
+       }
+
+}
diff --git a/pom.xml b/pom.xml
index 254934dd0c6f582cee0eb04a910e5e1ed4505363..78af6fe4418dffc3c01fd5097f0b8cbfa639d7e4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>org.eclipse.jgit.http.apache</module>
     <module>org.eclipse.jgit.http.server</module>
     <module>org.eclipse.jgit.pgm</module>
-    <module>org.eclipse.jgit.java7</module>
     <module>org.eclipse.jgit.junit</module>
     <module>org.eclipse.jgit.junit.http</module>
 
-    <module>org.eclipse.jgit.java7.test</module>
     <module>org.eclipse.jgit.test</module>
     <module>org.eclipse.jgit.ant.test</module>
     <module>org.eclipse.jgit.http.test</module>