[ONOS-3203] Remove final keyword from method arguements
Removing as requested by Thomas Vachuska so to be consistent with rest of ONOS code.
Note : ./tools/build/conf/src/main/resources/onos/pmd.xml deliberately excludes MethodArgumentCouldBeFinal from optimizations.xml
Change-Id: Ib1468d5ac39876797b79bd1f6dabd779bfe337bd
diff --git a/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmCodec.java b/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmCodec.java
index a764c90..60587bd 100644
--- a/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmCodec.java
+++ b/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmCodec.java
@@ -38,7 +38,7 @@
private final Logger log = getLogger(getClass());
@Override
- public ObjectNode encode(final Alarm alarm, final CodecContext context) {
+ public ObjectNode encode(Alarm alarm, CodecContext context) {
checkNotNull(alarm, "Alarm cannot be null");
return context.mapper().createObjectNode()
@@ -60,7 +60,7 @@
}
@Override
- public Alarm decode(final ObjectNode json, final CodecContext context) {
+ public Alarm decode(ObjectNode json, CodecContext context) {
if (json == null || !json.isObject()) {
return null;
}
@@ -76,8 +76,7 @@
final JsonNode jsonTimeCleared = json.get("timeCleared");
final Long timeCleared = jsonTimeCleared == null || jsonTimeCleared.isNull() ? null : jsonTimeCleared.asLong();
- final Alarm.SeverityLevel severity
- = Alarm.SeverityLevel.valueOf(json.get("severity").asText().toUpperCase());
+ final Alarm.SeverityLevel severity = Alarm.SeverityLevel.valueOf(json.get("severity").asText().toUpperCase());
final Boolean serviceAffecting = json.get("serviceAffecting").asBoolean();
final Boolean acknowledged = json.get("acknowledged").asBoolean();
diff --git a/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmsWebResource.java b/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmsWebResource.java
index d61d3e2..d62fa76 100644
--- a/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmsWebResource.java
+++ b/apps/faultmanagement/fmweb/src/main/java/org/onosproject/faultmanagement/web/AlarmsWebResource.java
@@ -59,7 +59,7 @@
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
- public Response getAlarms(@DefaultValue("false") @QueryParam("includeCleared") final boolean includeCleared
+ public Response getAlarms(@DefaultValue("false") @QueryParam("includeCleared") boolean includeCleared
) {
log.info("Requesting all alarms, includeCleared={}", includeCleared);
@@ -86,7 +86,7 @@
@GET
@Path("{id}")
@Produces(MediaType.APPLICATION_JSON)
- public Response getAlarm(@PathParam("id") final String id) {
+ public Response getAlarm(@PathParam("id") String id) {
log.info("HTTP GET alarm for id={}", id);
final AlarmId alarmId = toAlarmId(id);
@@ -109,7 +109,7 @@
@Path("{alarm_id}")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
- public Response update(@PathParam("alarm_id") final String alarmIdPath, final InputStream stream) {
+ public Response update(@PathParam("alarm_id") String alarmIdPath, InputStream stream) {
log.info("PUT NEW ALARM at /{}", alarmIdPath);
try {
@@ -134,7 +134,7 @@
}
}
- private static AlarmId toAlarmId(final String id) {
+ private static AlarmId toAlarmId(String id) {
try {
return AlarmId.valueOf(Long.parseLong(id));
} catch (NumberFormatException ex) {