From: Julien HENRY Date: Tue, 8 Apr 2014 14:07:58 +0000 (+0200) Subject: Deprecate some constants that should have been deprecated in 4.2 X-Git-Tag: 4.3~97 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=109d87e6481cd92cf65dfd274ef5a63800c6f72e;p=sonarqube.git Deprecate some constants that should have been deprecated in 4.2 --- diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java index 1df626a3862..7f20c86647a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Scopes.java @@ -57,17 +57,20 @@ public final class Scopes { /** * Types like Java classes/interfaces. Not persisted in database. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static final String PROGRAM_UNIT = "PGU"; /** * Block units like methods, functions or Cobol paragraphs. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static final String BLOCK_UNIT = "BLU"; public static final String[] SORTED_SCOPES = {PROJECT, DIRECTORY, FILE, PROGRAM_UNIT, BLOCK_UNIT}; - public static boolean isProject(final Resource resource) { return StringUtils.equals(PROJECT, resource.getScope()); } @@ -85,11 +88,17 @@ public final class Scopes { /** * A program unit can be a Java class. + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. */ + @Deprecated public static boolean isProgramUnit(final Resource resource) { return StringUtils.equals(PROGRAM_UNIT, resource.getScope()); } + /** + * @deprecated since 4.3 resources under FILE level are no more be supported since 4.2. + */ + @Deprecated public static boolean isBlockUnit(final Resource resource) { return StringUtils.equals(BLOCK_UNIT, resource.getScope()); }