1. 06 10月, 2018 1 次提交
    • S
      Micro-optimizations to Plugin data to reduce minimum memory for Jenkins (#3654) · e0ed9a86
      Sam Van Oort 提交于
      * Reduce memory footprint for the plugin info by presizing hashmaps to reduce waste for small maps and interning commonly duplicated plugin strings
      
      * Replace duplicated empty string arrays with the one in MemoryReductionUtil
      
      * Fix interning where strings are null
      
      * Fix to deal with the fact that we directly mutate dependency fields for UpdateSite, sigh
      
      * Reduce starting HashMap size for some hashmaps likely to be empty or tiny
      
      * Cleanup per review comments
      
      * Trim some extra waste out of the UpdateSite warnings
      
      * Fix count of optional dependencies
      
      * Move predicates for dependency matching to top-level static final field so they are not duplicated
      e0ed9a86
  2. 02 10月, 2018 3 次提交
  3. 30 9月, 2018 1 次提交
  4. 28 9月, 2018 1 次提交
  5. 22 9月, 2018 1 次提交
  6. 26 6月, 2018 3 次提交
  7. 26 3月, 2018 1 次提交
  8. 08 3月, 2018 1 次提交
  9. 03 3月, 2018 1 次提交
    • D
      hudson.Util improvements (#3226) · 8f512603
      Daniel Trebbien 提交于
      * Organize imports
      
      * Use StandardCharsets
      
      * Delete a redundant cast
      
      * Replace use of _ as an identifier
      
      _ is a keyword in Java 9.
      
      * Use Logger message formatting
      
      * Use fileToPath()
      
      * Switch to using Files.createTempDirectory()
      
      * Document that Util.touch() will truncate an existing file
      
      * Replace an unnecessary use of Throwable.initCause()
      
      * Implement deprecated copyStream() using IOUtils
      
      * Copy to NULL_OUTPUT_STREAM
      
      Also, closing source is moved to a finally block, to guarantee that it
      will be closed per the documentation; it was technically possible for
      the input stream to not be closed if construction of the MessageDigest,
      DigestInputStream, or byte[] buffer failed for some reason (e.g. out of
      memory).
      
      * Delete an unnecessary try-with-resources
      
      * Throw an IllegalArgumentException if data has odd length
      
      Previously, a StringIndexOutOfBoundsException would be thrown, which is
      less clear.
      
      * Specify expanded POSIX file permissions
      8f512603
  10. 22 2月, 2018 1 次提交
  11. 06 2月, 2018 1 次提交
  12. 27 1月, 2018 1 次提交
  13. 10 1月, 2018 1 次提交
  14. 28 12月, 2017 1 次提交
  15. 16 12月, 2017 1 次提交
    • D
      [JENKINS-48405] Use NIO in tryOnceDeleteFile and makeWritable (#3169) · 1270ba3b
      Devin Nusbaum 提交于
      * Use NIO in tryOnceDeleteFile and makeWritable
      
      * Don't try to set PosixFileAttributes on Windows
      
      * Do not create arbitrary exceptions in makeWritable to fix test failures on Windows
      
      * Remove unhelpful layer of exception wrapping
      
      * Add test exercising Util#makeWritable in Util#tryOnceDeleteFile
      
      * Add test for deleting a non-existant file
      
      * Return early if changing permissions with NIO succeeds
      1270ba3b
  16. 01 12月, 2017 1 次提交
    • D
      [JENKINS-36088] Use NIO implementations of chmod and mode by default (#3135) · fdccc0e8
      Devin Nusbaum 提交于
      * Use NIO for FilePath#chmod and IOUtils#mode
      
      * Add tests for NIO mode and chmod implementations
      
      * Add test, remove new method, and update JavaDoc
      
      * Provide system property to use native implementations of chmod and mode
      
      * Revert unrelated whitespace modification
      
      * Don't remove exception from throws and put imports in original location
      
      * Fix broken JavaDoc links
      
      * Ignore file type bits (above 0o7777) in Util#modeToPermission
      
      * Use octal for constants and don't include file type bits
      
      * Revert unnecessary changes to TarArchiverTest
      
      * Add assertion that non-permission bits are ignored by chmod
      
      * Use NIO copy with StandardCopyOption.COPY_ATTRIBUTES in copyToWithPermissions where possible
      
      * Catch InvalidPathException and convert it to IOException
      
      * Create utility method for File#toPath and use File#createDirectories after review
      
      * Remove useless calls to toAbsolutePath and getAbsoluteFile
      
      * Fix typos and use octal for constant after review
      
      * Add test for behavior of copyToWithPermission with special bits
      fdccc0e8
  17. 17 11月, 2017 1 次提交
    • D
      [JENKINS-39179] [JENKINS-36088] Always use NIO to create and detect symbolic... · 52fa4d90
      Devin Nusbaum 提交于
      [JENKINS-39179] [JENKINS-36088] Always use NIO to create and detect symbolic links and Windows junctions (#3133)
      
      * Always use NIO to detect symlinks
      
      * Make assertion failure message consistent
      
      * Catch NoSuchFileException to keep tests passing
      
      * Make method name more specific and simlify assumption
      
      * Remove obsolete comment and reword the main comment in isSymlink
      
      * Deprecate Kernel32Util#isJunctionOrSymlink
      
      * Use assumptions for junction creation and add messages to assumptions
      
      * Replace deprecated code with recommended alternative
      
      * Add comment explaining call to DosFileAttributes#isOther
      
      * Do not fall back to native code when creating symlinks
      
      * Log FileSystemExceptions when creating symbolic links
      
      * Catch InvalidPathException and rethrow as IOException
      
      * Deprecate Kernel32Utils#createSymbolicLink and #getWin32FileAttributes
      
      * Preserve original logging behavior on Windows and remove useless call to Util#displayIOException
      52fa4d90
  18. 28 9月, 2017 1 次提交
  19. 24 9月, 2017 1 次提交
    • R
      [JENKINS-44657] Move sub-job's buildsdir when outside of itemrootdir (#2932) · 3adfed4b
      Robert Sandell 提交于
      * A test to verify JENKINS-44657 is working in core
      
      * [JENKINS-44657] Move sub-job's buildsdir when outside of itemrootdir.
      
      * [JENKINS-44657] Fix UsageStatisticsTest
      
      Because we've added a test dependency that affects it.
      
      * [JENKINS-44657] Normalize the path before comparing
      
      * [JENKINS-44657] Use MockFolder instead of folders-plugin
      
      for tests
      
      * [JENKINS-44657] Document and annotate isDefaultBuildDir
      
      * [JENKINS-44657] isDescendant doesn't throw IOException any more
      
      * [JENKINS-44657] catch InvalidPathException and rethrow as IOException
      3adfed4b
  20. 19 4月, 2017 1 次提交
  21. 08 4月, 2017 1 次提交
  22. 20 3月, 2017 1 次提交
  23. 07 3月, 2017 1 次提交
  24. 13 12月, 2016 2 次提交
  25. 09 11月, 2016 1 次提交
  26. 16 10月, 2016 2 次提交
  27. 03 10月, 2016 1 次提交
  28. 09 9月, 2016 1 次提交
    • D
      [JENKINS-29956] Test Windows junctions before Java 7 symlink (#1787) · 349380aa
      dbroady1 提交于
      * Test Windows junctions before Java 7 symlink
      
      Apparently Java 7 (and later) do not count Windows junctions as
      symlinks.  When you drill down into the BasicFileAttributes structure,
      reparse points are only counted under isOther.  So, since we already
      have code that properly detects Windows Junctions, let's use that first
      and then fallback to the Java 7 code.
      
      * Add comment for change & link bug.
      
      * Add test case
      
      * Switch to Functions.isWindows().
      
      * Use non-deprecated APIs for tmp file/dir mgmt
      
      * Add better debugging.
      
      * Allow spaces in junction name & dir name.
      
      To do that, it was easier to use ProcessBuilder vs building up the correct
      string in code to send to cmd.exe.
      
      Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
      mklink is in internal cmd.exe command.  So, it must be invoked through
      "cmd.exe /c" for it to work.
      
      * Remove comment mentioning bug number.
      
      * Remove debugging output, per Baptiste's request
      
      * Add newline at end of file.
      
      * Make sure that the junction was removed.
      
      * Use assertEquals to show retcode of Process.waitFor.
      
      * Fix compilation errors by importing functions
      
      (cherry picked from commit f4edf917)
      349380aa
  29. 06 9月, 2016 1 次提交
    • O
      [FIXED JENKINS-37332] - Prevent File descriptor leaks when reading manifests from JARs (#2516) · 37edc1a3
      Oleg Nenashev 提交于
      * [JENKINS-37332] - Improve diagnostics of non-closed streams during reading of the manifests in PluginManager
      
      * [JENKINS-37332] - Leakless processing of JarUrlConnection during Manifest parsing
      
      * [JENKINS-37332] - Also implement leak-safe method for retrieving file modification date
      
      * [JENKINS-37332] - Add spotcheck methods for manifest file access + Javadoc
      
      * [JENKINS-37332] - Also test multi-line and empty attributes in the test
      
      (cherry picked from commit 96c97860)
      37edc1a3
  30. 22 8月, 2016 1 次提交
    • D
      [JENKINS-29956] Test Windows junctions before Java 7 symlink (#1787) · f4edf917
      dbroady1 提交于
      * Test Windows junctions before Java 7 symlink
      
      Apparently Java 7 (and later) do not count Windows junctions as
      symlinks.  When you drill down into the BasicFileAttributes structure,
      reparse points are only counted under isOther.  So, since we already
      have code that properly detects Windows Junctions, let's use that first
      and then fallback to the Java 7 code.
      
      * Add comment for change & link bug.
      
      * Add test case
      
      * Switch to Functions.isWindows().
      
      * Use non-deprecated APIs for tmp file/dir mgmt
      
      * Add better debugging.
      
      * Allow spaces in junction name & dir name.
      
      To do that, it was easier to use ProcessBuilder vs building up the correct
      string in code to send to cmd.exe.
      
      Also, I'll note that according to http://ss64.com/nt/syntax-internal.html,
      mklink is in internal cmd.exe command.  So, it must be invoked through
      "cmd.exe /c" for it to work.
      
      * Remove comment mentioning bug number.
      
      * Remove debugging output, per Baptiste's request
      
      * Add newline at end of file.
      
      * Make sure that the junction was removed.
      
      * Use assertEquals to show retcode of Process.waitFor.
      
      * Fix compilation errors by importing functions
      f4edf917
  31. 21 8月, 2016 1 次提交
    • O
      [FIXED JENKINS-37332] - Prevent File descriptor leaks when reading manifests from JARs (#2516) · 96c97860
      Oleg Nenashev 提交于
      * [JENKINS-37332] - Improve diagnostics of non-closed streams during reading of the manifests in PluginManager
      
      * [JENKINS-37332] - Leakless processing of JarUrlConnection during Manifest parsing
      
      * [JENKINS-37332] - Also implement leak-safe method for retrieving file modification date
      
      * [JENKINS-37332] - Add spotcheck methods for manifest file access + Javadoc
      
      * [JENKINS-37332] - Also test multi-line and empty attributes in the test
      96c97860
  32. 16 7月, 2016 1 次提交
  33. 12 7月, 2016 1 次提交
  34. 21 5月, 2016 1 次提交
    • O
      [JENKINS-34854] - Migrate missing settings to SystemProperties (#2362) · 1d2b1517
      Oleg Nenashev 提交于
      * [JENKINS-34854] - Migrate missing Integer and Boolean properties to SystemProperties
      
      * [JENKINS-34854] - API methods for Long variables
      
      * [JENKINS-34854] - Migrate Long settings to SystemProperties
      
      * [JENKINS-34854] - Leftover change (I should use Save All)
      
      * [JENKINS-34854] - Some fixes in Long methods Javadoc and log messages
      1d2b1517