LibrePDF / OpenPDF

OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.63k stars 598 forks source link

Improved maintainability and reduced logical complexity #1136

Closed dukbong closed 7 months ago

dukbong commented 7 months ago

Description of the new Feature/Bugfix

Made changes to improve readability and reduce logical complexity, without introducing bug fixes or new features.

Related Issue: #

Unit-Tests for the new Feature/Bugfix

Compatibilities Issues

Since the modification reduces logical complexity, it does not introduce any compatibility issues.

Testing details

Since the modification only addresses reducing logical complexity, there are no additional details regarding testing.

asturio commented 7 months ago

Hi @dukbong , there is a little conflict in the branch and I can't merge this. Can you rebase locally your changes?

First update your master branch:

git checkout master
git pull https://github.com/LibrePDF/OpenPDF.git master

Optional: Squashing all your 15 commits into 1 is also a good idea, to do before you rebase, so rebasing will be less painful. Use your IDE for this.

Rebasing

Then in you reduce branch you can rebase it onto your master-Branch:

git checkout reduce
git rebase master

As you have many commits, each one will be rebased onto master, so conflicts may arise and you must solve them. In this case git will tell, that it is still rebasing, but stop in a given commit. After you resolve the conflict, you may continue rebasing:

git rebase --continue

Do this untill all is rebase. After that you can force-push your branch again to GitHub, and your PR will be updated.

git push --force

Alternatively you may merge master into your reduce branch, which is also ok. Here no need to force-push. Push only will be ok.

dukbong commented 7 months ago

Thank you! @asturio ! I will soon make the changes following the instructions above.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud