Skip to content

Commit

Permalink
Public Reference To Private Type Check sevntu-checkstyle#195 Compilab…
Browse files Browse the repository at this point in the history
…le UT inputs
  • Loading branch information
alexkravin committed Sep 3, 2014
1 parent 38513f0 commit 1e85e32
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.puppycrawl.tools.checkstyle.design;
package com.github.sevntu.checkstyle.checks.design;

public class InputPublicReferenceToPrivateTypeCheck1 {
private class PrivateInner{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

public class InputPublicReferenceToPrivateTypeCheck16 {
public Inner.Inner2.Inner3 getLopByAnonymous() { //WARNING
return new Inner.Inner2.Inner3().data;
return (com.github.sevntu.checkstyle.checks.design.InputPublicReferenceToPrivateTypeCheck16.Inner.Inner2.Inner3)
new Inner.Inner2.Inner3().data;
}

private static class Inner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ private class InnerClass extends Inner implements InnerInterface, AnotherInnerIn
private interface InnerInterface {}
private interface AnotherInnerInterface {}
private class Inner {}
private class InnerClass1 extends InputPublicAccessToPrivateTypeCheck1
private class InnerClass1 extends InputPublicReferenceToPrivateTypeCheck1
implements InnerInterface, Comparable {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.github.sevntu.checkstyle.checks.design;

import java.util.Map;
public class InputPublicReferenceToPrivateTypeCheck19 {
public void render(int c, C1 d) {} // WARNING

public int render(C1 c) {} //WARNING
public int render(C1 c) { return 0; } //WARNING

protected void someMethod(List<String, C1> s) {} //WARNING
protected void someMethod(Map<String, C1> s) {} //WARNING

private class C1{}
}

0 comments on commit 1e85e32

Please sign in to comment.