J2K: convert protected member used outside of inheritors as public
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package test;
|
||||
|
||||
class BaseSuperSamePackage {
|
||||
public void usage1() {
|
||||
DerivedSuperSamePackage derived = new DerivedSuperSamePackage();
|
||||
derived.foo();
|
||||
int i = derived.i;
|
||||
}
|
||||
}
|
||||
|
||||
class DerivedSuperSamePackage extends BaseSuperSamePackage {
|
||||
protected DerivedSuperSamePackage() {
|
||||
|
||||
}
|
||||
|
||||
protected void foo() {
|
||||
|
||||
}
|
||||
|
||||
protected int i = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user