GitHub user hiroakiy opened a pull request:
https://github.com/apache/camel/pull/2472
CAMEL-12730: Fix FindBugs warnings: Suspicious reference comparison
FindBugs-3.0.1
([http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/)) reported
2 RC_REF_COMPARISON warnings on master:
```
H C RC: Suspicious comparison of Integer references in
org.apache.camel.processor.Throttler.calculateAndSetMaxRequestsPerPeriod(Exchange)
At Throttler.java:[line 312]
H C RC: Suspicious comparison of Integer references in
org.apache.camel.processor.Throttler.calculateAndSetMaxRequestsPerPeriod(DelayQueue,
Exchange, Integer) At Throttler.java:[line 360]
```
The description of the bug is as follows:
> **RC: Suspicious reference comparison (RC_REF_COMPARISON)**
> This method compares two reference values using the == or != operator,
where the correct way to compare instances of this type is generally with the
equals() method. It is possible to create distinct instances that are equal but
do not compare as == since they are different objects. Examples of classes
which should generally not be compared by reference are java.lang.Integer,
java.lang.Float, etc.
>
[http://findbugs.sourceforge.net/bugDescriptions.html#RC_REF_COMPARISON](http://findbugs.sourceforge.net/bugDescriptions.html#RC_REF_COMPARISON)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hiroakiy/camel CAMEL-12730
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/2472.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2472
----
commit 3488de67e5fbf2874e48839b356c7425516f66d2
Author: Hiroaki Yoshida <hyoshida@...>
Date: 2018-08-15T00:13:33Z
CAMEL-12730: Fix FindBugs warnings: Suspicious reference comparison
----
---