Commit Graph

12 Commits

Author SHA1 Message Date
Aurora Lahtela de9f9ec5b4
Sonar fixes (#3510)
* Remove deprecated code

- RemoveUnsatisfiedConditionalPlayerResultsTransaction.java
- RemoveUnsatisfiedConditionalServerResultsTransaction.java

* Fix apache compress deprecations

- Use org.apache.commons.io.IOUtils instead of org.apache.commons.compress.utils.IOUtils
- Use TarArchiveInputStream#getNextEntry instead of getNextTarEntry

* Rename variable in BukkitPingCounter

* Extract ApiServices from PlanSystem
2024-03-09 14:43:41 +02:00
Aurora Lahtela bc4aef8b2b Add some missing javadocs to not generate warnings 2024-01-06 18:01:50 +02:00
Aurora Lahtela 2bc3f29525 Add support for Player#getPing in Spigot
Affects issues:
- Fixed #3140
2023-09-24 08:51:35 +03:00
Risto Lahtela a7478645bd Reduce the amount of tasks used for upkeep
- Ping gathering now uses a map of timestamps
  - Removes a task that waited for ping data to be reliable (one task / join)
- Cookie expiration now uses a map of timestamps
  - Removes a task that waited for cookie to expire (one task / login cookie)

Affects issues:
- Possibly fixed #1984
2022-01-06 15:43:48 +02:00
Risto Lahtela 78209e99a6
Sonar cleanup for new smells (#1996)
* Rename "byKey" which hides the field declared at line 36.
* Define a constant instead of duplicating this literal "isStopped" 3 times.
* Remove this assignment of "pingMethodAvailable".
* Invoke method(s) only conditionally. Use the built-in formatting to construct this argument.
* Rename "getHandleMethod" which hides the field declared at line 36.

Make the enclosing method "static" or remove this set.
* Refactored some ping method things
* Rename "files" which hides the field declared at line 41.
* Add at least one assertion to this test case.
2021-07-10 14:52:24 +03:00
Risto Lahtela db0d3ff6ac Implemented more ways to get Ping on bukkit
Affects issues:
- Close #1962
2021-07-03 10:05:34 +03:00
Risto Lahtela baab6e5f88 Fixing sonarcloud bugs and smells
Bugs fixed:
- LinkCommands: The return value of "orElseThrow" must be used.
- RegistrationCommands: Optional isPresent not same instance as Optional get

Smells fixed:
- Plan: "logger" is the name of a field in "JavaPlugin"
- PlayersTableJSONCreator: Reduce the total number of break and continue statements in this loop to use at most one.
- BukkitAFKListener, SpongeAFKListener, NukkitAFKListener, PlanAPI, CapabilityService: match the regular expression '^[a-z][a-zA-Z0-9]*$'
- TaskSystem: Reorder the modifiers to comply with the Java Language Specification.
- EntityNameFormatter: StringUtils.removeAll moved to RegExUtils.removeAll
- FiltersJSONResolver: fulfill compareTo contract
- ExportTask: Removed duplicate string literal
- FinishedSession.Id: Rename field "id"
2021-03-16 10:41:17 +02:00
Risto Lahtela e1bffbcc1f
Swap Abstract Plugin Framework for Platform Abstraction Layer library (#1787)
Replaced Abstract Plugin Framework with Platform Abstraction Layer

Large amount of changes due to removal of features from the library,
and change of the way the abstraction is achieved.
Removes features from Plan:

    Removed debug logging (Considered useless when debugging issues)
    Removed /debug page (Considered useless when debugging issues)
    Removed enable timing (Benchmarking utility was removed from the library)
2021-03-09 11:36:07 +02:00
Risto Lahtela c8fb39ada5 Replaced TaskSystem implementations with dagger modules
- Removes the need for duplicate code in 5 places in charge of registering
  the tasks for different platforms, as all the delays were the same too.

Affects issues:
- Close #1387
2021-01-01 10:00:38 +02:00
Risto Lahtela 23b9d79dca Moved bukkit ping method check to enable
This static block was causing compatibility issues with some plugins that
modify classes at runtime.

Affects issues:
- Possibly fixed #1492
- References https://github.com/konsolas/AAC-Issues/issues/1971
2020-08-08 17:02:20 +03:00
Risto Lahtela 93dc1bbb9e
Added more context to errors (#1450)
* Improved Extension errors
* Removed scary reflective operation exception
* Additional context to SQL Exceptions
* Added error context to Listeners
* Added error context to most error logging places
* Ignore cyclomatic complexity of DBOpException

Adds context to almost all error logging situations, except those where it is unknown, or to commands that are being refactored on another branch.

Close #1245
2020-05-15 12:20:29 +03:00
Risto Lahtela 66a19d7de1 Removed system. from packages (#1147)
* system.commands -> commands

* system.delivery -> delivery

* system.gathering -> gathering

* system.identification -> identification

* system.processing -> processing

* system.settings -> settings

* system.storage -> storage

* system.version -> version

* system -> com.djrapitops.plan
2019-09-03 09:32:30 +03:00