From 491644917a5ebb44429ef45ee1885ed9728daf56 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 31 Mar 2016 12:23:32 +0200 Subject: [PATCH] Fix quality flaws --- .../org/sonar/api/internal/package-info.java | 24 +++++++++++++++++++ .../java/org/sonar/api/utils/DateUtils.java | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java new file mode 100644 index 00000000000..24caa2cc413 --- /dev/null +++ b/sonar-plugin-api/src/main/java/org/sonar/api/internal/package-info.java @@ -0,0 +1,24 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.api.internal; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java index 2f31b3f506b..ab8c90fbb52 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/DateUtils.java @@ -175,7 +175,7 @@ public final class DateUtils { } private DateFormat getDateFormat() { - return (DateFormat) ((Reference) cache.get()).get(); + return cache.get().get(); } @Override -- 2.39.5