Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix generics warning #3027

Merged
merged 2 commits into from
Jul 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions monitor/src/main/java/bisq/monitor/metric/P2PNetworkLoad.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* This file is part of Bisq.
*
* bisq is free software: you can redistribute it and/or modify it
* Bisq is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* bisq is distributed in the hope that it will be useful, but WITHOUT
* Bisq is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with bisq. If not, see <http://www.gnu.org/licenses/>.
* along with Bisq. If not, see <http://www.gnu.org/licenses/>.
*/

package bisq.monitor.metric;
Expand Down Expand Up @@ -93,7 +93,7 @@ public class P2PNetworkLoad extends Metric implements MessageListener, SetupList
* History implementation using a {@link LinkedHashMap} and its
* {@link LinkedHashMap#removeEldestEntry(Map.Entry)} option.
*/
private class FixedSizeHistoryTracker extends LinkedHashMap {
private class FixedSizeHistoryTracker<K, V> extends LinkedHashMap<K, V> {
final int historySize;

FixedSizeHistoryTracker(int historySize) {
Expand Down Expand Up @@ -197,7 +197,7 @@ public P2PNetworkLoad(Reporter reporter) {
public void configure(Properties properties) {
super.configure(properties);

history = Collections.synchronizedMap(new FixedSizeHistoryTracker(Integer.parseInt(configuration.getProperty(HISTORY_SIZE, "200"))));
history = Collections.synchronizedMap(new FixedSizeHistoryTracker<>(Integer.parseInt(configuration.getProperty(HISTORY_SIZE, "200"))));

Capabilities.app.addAll(Capability.DAO_FULL_NODE);
}
Expand Down