Skip to content

Commit

Permalink
Issue checkstyle#3616: Fix/suppress TC "Deprecated member is still us…
Browse files Browse the repository at this point in the history
…ed" errors
  • Loading branch information
Vladlis committed Mar 30, 2017
1 parent e9f6521 commit 2985372
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/intellij-idea-inspections.xml
Expand Up @@ -501,6 +501,7 @@
<inspection_tool class="Dependency" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="DeprecatedCallableAddReplaceWith" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="DeprecatedClassUsageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DeprecatedIsStillUsed" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="Deprecation" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="DeserializableClassInSecureContext" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="DesignForExtension" enabled="false" level="ERROR" enabled_by_default="false" />
Expand Down
Expand Up @@ -92,7 +92,7 @@ public FileContents(FileText text) {
@Override
public void reportSingleLineComment(String type, int startLineNo,
int startColNo) {
reportCppComment(startLineNo, startColNo);
reportSingleLineComment(startLineNo, startColNo);
}

/**
Expand All @@ -111,7 +111,7 @@ public void reportSingleLineComment(int startLineNo, int startColNo) {
@Override
public void reportBlockComment(String type, int startLineNo,
int startColNo, int endLineNo, int endColNo) {
reportCComment(startLineNo, startColNo, endLineNo, endColNo);
reportBlockComment(startLineNo, startColNo, endLineNo, endColNo);
}

/**
Expand Down
Expand Up @@ -41,6 +41,7 @@
* @author Oliver Burn
* @deprecated Checkstyle is not type aware tool and all Checks derived from this
* class are potentially unstable.
* @noinspection DeprecatedIsStillUsed
*/
@Deprecated
public abstract class AbstractTypeAwareCheck extends AbstractCheck {
Expand Down
Expand Up @@ -41,9 +41,11 @@ public void testDeprecatedCtor() {
@SuppressWarnings("deprecation")
public void testDeprecatedAbbreviatedMethod() {
// just to make UT coverage 100%
final FileContents o = new FileContents("filename", "1", "2");
final FileContents o = new FileContents("filename", "123", "456");
o.getCppComments();
o.getCComments();
o.reportCppComment(1, 1);
o.reportCComment(1, 1, 1, 1);
}

@Test
Expand Down

0 comments on commit 2985372

Please sign in to comment.