15 Commits

Author SHA1 Message Date
Bernd Ahlers
28a7b6691d Remove WithBeanGetter annotation (#23551)
* Replace WithBeanGetterTest with AutoValueValidatorTest

We want to ensure that auto-value adds the validation annotations to the
generated class fields.

* Remove all WithBeanGetter annotation usages

- Fix classes where the constructor became private because of the
  builder usage
- Fix wrong "$AutoValue" references

* Remove auto-value-javabean dependency

* Restore InputCreateRequest#create method

* Revert some JsonSeserialize conversions

The changes introduced a breaking change in InputCreateRequest, so we
play safe for now.

* Remove JsonDeserialize from ShardRouting

* Convert CreateEntityRequest to a POJO to fix validation issues

* Check that CreateEntityRequest#title is not null

* Fix botched merge

* Explicitly set JsonProperty names to fix parsing issue

* Remove unused files

* Use explicit values for JsonProperty annotations

Removing the WithBeanGetter annotation resulted in some de/serialization
errors. We prevent those by using explicit annotation values.

* Fix wrong property name

* Add PMD rule to check for missing values in JsonProperty annotations

* Remove newly introduced WithBeanGetter usages

* Add missing license header

* Fix "$AutoValue_*" usage
2025-09-18 18:03:52 +02:00
Othello Maurer
3b8b4d2f76 Add com.mongodb.DuplicateKeyException to forbidden APIs (#21678)
* Add com.mongodb.DuplicateKeyException to forbidden APIs

* Add custom PMD rule to find usages in catch clauses

* Fix wording & typo

* Execute PMD in the validate phase
2025-02-19 14:16:13 +01:00
Bernd Ahlers
03d7c5faa0 Update forbiddenapis to 3.5.1 and move to parent pom.xml (#16575)
* Update forbiddenapis to 3.5.1 and move to parent pom.xml

* Fix forbiddenapis errors

* Manage awaitility dependency in parent pom.xml

* Remove unused signature files

* Manage hamcrest version and update awaitility to 4.2.0

* Extend block list of shaded utils

* Fix wrong util usage

* Allow net.fortuna.ical4j.util.Strings again

We currently don't have a good replacement.

* Be less strict with org.apache.logging.log4j.util

* Add missing charset

* Add toUpperCase and toLowerCase methods to our StringUtils class

* Use StringUtils helper for upper/lower case conversion

---------

Co-authored-by: Othello Maurer <othello@graylog.com>
2023-09-21 14:58:18 +02:00
Marco Pfatschbacher
e9d1acd292 Add known erroneous shaded imports to forbidden api (#15498)
Add a list of known imports from shaded or other "known to be wrong"
imports to our forbidden-apis check.

* Fix a few wrong Strings imports
* Use javax instead of guice Inject annotation
  The guice one does not work with HK2
2023-06-05 13:34:09 +02:00
Jochen Schalanda
6762727721 Migrate to Netty 4.1 (#4397)
* Migrate to Netty 4.1

* Revert changes to vendor-module-ids.json and yarn.lock

Ceterum censeo JavaScript esse delendam.

* Add support for native SSL (OpenSSL) bindings

* Wait for transport being started completely in UdpTransportTest

* Refactor getBaseChannelHandlers/getFinalChannelHandlers

* Upgrade to Netty 4.1.18.Final

* Fix throughput and connection counters for Netty-based transports

* Use read bytes for CodecAggregator.Result in GelfChunkAggregator

* Refactor NettyTransport#getLocalAddress()

* Upgrade to Netty 4.1.19.Final

* Allow configuring the number of worker threads per Netty transport

* Remove support for Netty OIO (old I/O) transports

* Remove outdated TODOs

* Use locale metric registry for transport-specific metrics
2018-01-18 11:18:55 +01:00
Jochen Schalanda
bbaacbcb7f Migrate from FindBugs to SpotBugs
https://spotbugs.github.io/
2017-11-13 11:20:43 +01:00
Jochen Schalanda
1aefec0aba Fix PMD and FindBugs warnings (#3493)
* Fix PMD warnings

* Remove anonymous statically initialized collections

* Optimize imports

* Fix FindBugs warnings with level "HIGH"

* Delete unused declarations and classes
2017-02-15 14:18:53 +01:00
Jochen Schalanda
1ad8a2fb37 Exclude generated sources from FindBugs and PMD (#3490) 2017-02-15 11:56:09 +01:00
Jochen Schalanda
d29bc0af38 Remove Checkstyle from Maven build (#3489)
The warnings emitted by Checkstyle weren't useful at all and only
made the build run longer.
2017-02-15 11:52:33 +01:00
Jochen Schalanda
043fa60e72 Check for Forbidden APIs in default build profile (#2574)
* Move Forbidden API checks into default profile

* Update Forbidden API signatures

* Add @SuppressForbidden to suppress Forbidden APIs warnings

* Add edu.emory.mathcs.backport.java.util.* to Forbidden APIs

* Allow java.io.File and java.io.File{Input,Output}Stream

* Ensure to check test classes with Forbidden APIs

* Allow java.util.{jar.JarFile,zip.ZipFile}

* Remove bogus Forbidden APIs signatures

* Fix Forbidden APIs violations

* Fail on Forbidden APIs violations

* Add com.google.common.base.Charsets to Forbidden APIs
2016-08-03 12:06:06 +02:00
Jochen Schalanda
d70a99ad75 Add some useful FindBugs plugins (#2447)
* https://find-sec-bugs.github.io/
* http://fb-contrib.sourceforge.net/
2016-07-04 15:39:45 +02:00
Jochen Schalanda
d86102e8a4 Add additional forbidden APIs 2015-10-13 11:36:08 +02:00
Jochen Schalanda
2c79d129a9 Add forbidden-apis checker to (P)edantic build profile 2015-10-13 11:01:29 +02:00
Bernd Ahlers
7dca245d3a Move checkstyle.xml into config/ directory. 2014-11-04 19:36:02 +01:00
Bernd Ahlers
1dd7237616 Remove obsolete build scripts. Use maven assembly. 2014-11-04 19:29:16 +01:00