Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:09:26+00:00 2026-06-05T22:09:26+00:00

Sometimes I need to modify a third party library for my specific needs. It

  • 0

Sometimes I need to modify a third party library for my specific needs. It can be bug fixes, performance improvements, adding features etc.

For instance I included JSoup and Android Support Library sources into my project and made several changes. I also did the same thing with 2 Java files from Android source code.

How should I document this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:09:27+00:00Added an answer on June 5, 2026 at 10:09 pm

    Rule -1

    Don’t. Maintaining forked versions of libraries is painful, especially when you want to upgrade the library and need to backport your changes over and over again. Not to mention one day someone will forget about your version and use standard one.

    Thus always try to include test case that fails without your change (exposing bug in external library manifesting in your code).

    Rule 0

    Always submit your changes to original authors/maintainers. File an issue and include your patch. If your change was worth violating rule -1, it will probably be included in next release.

    Rule 1

    Commit the original source files of the library without any change. Then commit every single improvement/bugfix with descriptive message. Preferably include issue/ticket id that will point to an explanation in your (or library’s) ticketing system.

    This way when browsing the list of commits of this given directory or project you can easily see what has been changed. If the commit message is not enough to describe the need to fork and modify the external library, you can always browse the issue/ticket. Also in an ideal world such a commit makes an ideal patch (see rule 0).


    Bonus: I once had an idea of automating forking and patching external libraries via maven plugin. Basically we instruct this hypothetical plugin to apply given patch(es) on particular library. Maven can easily download sources, rebuild, install and include modified version automatically instead of the original one in the target artifact.

    No need to maintain forked binaries, easy upgrade providing that the patch still applies cleanly on new version. Anyone having too much free time here?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Because sometimes, I really need a friend. I can think of the following tricks:
I sometimes need a class in C++ which allocates dynamic memory. Since this can
I sometimes need to look for information for a special portion of code. When
I sometimes need to debug JS in other browsers, and it would be really
I sometimes need to run gacutil.exe or installutil.exe, etc. from the command line. Is
In my app I sometimes need to rebuild and repopulate database file. SQLite databse
In the form designer, I sometimes need to see the type of a property,
Sometimes I need to find some strings inside DB usually it is just host-name
Sometimes you need to create a very simple single file application in Qt4. However
Sometimes I need to find out if an object will really be released. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.