J2K: convert protected member used outside of inheritors as public

This commit is contained in:
Natalia Ukhorskaya
2016-02-19 13:58:40 +03:00
parent 52be775f28
commit 7d594970ff
27 changed files with 503 additions and 3 deletions
+35
View File
@@ -0,0 +1,35 @@
package test;
public class BaseProtectedConstructor {
protected void usageInConstructor() {
}
protected int usageInPropertyInitializer() {
return 1;
}
protected void usageInStaticInit() {
}
protected void usageInMethod() {
}
}
class DerivedSamePackage {
DerivedSamePackage() {
new BaseProtectedConstructor().usageInConstructor();
}
private int i = new BaseProtectedConstructor().usageInPropertyInitializer();
static {
new BaseProtectedConstructor().usageInStaticInit();
}
void usage() {
new BaseProtectedConstructor().usageInMethod();
}
}