diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-27 13:37:22 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-02-27 13:38:19 +0100 |
commit | bf78055b3e3d021782a727a8072682d64f1e2a4a (patch) | |
tree | cc402792322b9cd75038a533c89b65a3b40742c0 /sonar-plugin-api/src/main/java/org/sonar | |
parent | 462f3c3a33e6f2f85b068ce4c164a14d2569ed5d (diff) | |
download | sonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.tar.gz sonarqube-bf78055b3e3d021782a727a8072682d64f1e2a4a.zip |
Deprecate remaining Java-specific stuff
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java | 6 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java | 79 |
2 files changed, 6 insertions, 79 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index 8d9bacef6f5..414097c0798 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -47,17 +47,23 @@ public class RulesProfile implements Cloneable { /** * Name of the default profile "Sonar Way" + * @deprecated in 4.2. Use your own constant. */ + @Deprecated public static final String SONAR_WAY_NAME = "Sonar way"; /** * Name of the default java profile "Sonar way with Findbugs" + * @deprecated in 4.2. Use your own constant. */ + @Deprecated public static final String SONAR_WAY_FINDBUGS_NAME = "Sonar way with Findbugs"; /** * Name of the default java profile "Sun checks" + * @deprecated in 4.2. Use your own constant. */ + @Deprecated public static final String SUN_CONVENTIONS_NAME = "Sun checks"; @Id diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java deleted file mode 100644 index 917c0ad7dc5..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Java.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2013 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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. - */ - -package org.sonar.api.resources; - -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; - -/** - * Java language implementation - * This class have been moved in the plugin sonar-java - * - * @since 1.10 - * @deprecated in 3.6 - */ -@Deprecated -public class Java extends AbstractLanguage { - - public static final Java INSTANCE = new Java(); - - /** - * Java key - */ - public static final String KEY = "java"; - - /** - * Java name - */ - public static final String NAME = "Java"; - - /** - * Default package name for classes without package def - */ - public static final String DEFAULT_PACKAGE_NAME = "[default]"; - - /** - * Java files knows suffixes - */ - public static final String[] SUFFIXES = {".java", ".jav"}; - - /** - * Default constructor - */ - public Java() { - super(KEY, NAME); - } - - /** - * {@inheritDoc} - * - * @see AbstractLanguage#getFileSuffixes() - */ - public String[] getFileSuffixes() { - return SUFFIXES; - } - - public static boolean isJavaFile(java.io.File file) { - String suffix = "." + StringUtils.lowerCase(StringUtils.substringAfterLast(file.getName(), ".")); - return ArrayUtils.contains(SUFFIXES, suffix); - } - -} |