usage constrains fixes and optimizations for 'added' fields; more tests added

This commit is contained in:
Eugene Zhuravlev
2018-01-15 10:44:31 +01:00
parent 035a4a1331
commit c022771c55
56 changed files with 436 additions and 24 deletions
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/HidePackagePrivateWithPackagePrivate/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePackagePrivateWithPackagePrivate/ppp/ClientInside.class
End of files
Compiling files:
src/ppp/ClientInside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
String x = "derived";
}
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/HidePackagePrivateWithProtected/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePackagePrivateWithProtected/ppp/ClientInside.class
End of files
Compiling files:
src/ppp/ClientInside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
protected String x = "derived";
}
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/HidePackagePrivateWithPublic/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePackagePrivateWithPublic/ppp/ClientInside.class
End of files
Compiling files:
src/ppp/ClientInside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
public String x = "derived";
}
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/HideProtectedWithPackagePrivate/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HideProtectedWithPackagePrivate/qqq/DerivedOutside.class
End of files
Compiling files:
src/qqq/DerivedOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
protected String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}
@@ -0,0 +1,14 @@
Cleaning output files:
out/production/HideProtectedWithProtected/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HideProtectedWithProtected/ppp/ClientInside.class
out/production/HideProtectedWithProtected/qqq/DerivedOutside.class
End of files
Compiling files:
src/ppp/ClientInside.java
src/qqq/DerivedOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
protected String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
protected String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}
@@ -0,0 +1,14 @@
Cleaning output files:
out/production/HideProtectedWithPublic/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HideProtectedWithPublic/ppp/ClientInside.class
out/production/HideProtectedWithPublic/qqq/DerivedOutside.class
End of files
Compiling files:
src/ppp/ClientInside.java
src/qqq/DerivedOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
protected String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
public String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}
@@ -0,0 +1,14 @@
Cleaning output files:
out/production/HidePublicWithPackagePrivate/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePublicWithPackagePrivate/qqq/ClientOutside.class
out/production/HidePublicWithPackagePrivate/qqq/DerivedOutside.class
End of files
Compiling files:
src/qqq/ClientOutside.java
src/qqq/DerivedOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
public String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class ClientOutside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}
@@ -0,0 +1,12 @@
Cleaning output files:
out/production/HidePublicWithProtected/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePublicWithProtected/qqq/ClientOutside.class
End of files
Compiling files:
src/qqq/ClientOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
public String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
protected String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class ClientOutside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}
@@ -0,0 +1,16 @@
Cleaning output files:
out/production/HidePublicWithPublic/ppp/Derived.class
End of files
Compiling files:
src/ppp/Derived.java
End of files
Cleaning output files:
out/production/HidePublicWithPublic/ppp/ClientInside.class
out/production/HidePublicWithPublic/qqq/ClientOutside.class
out/production/HidePublicWithPublic/qqq/DerivedOutside.class
End of files
Compiling files:
src/ppp/ClientInside.java
src/qqq/ClientOutside.java
src/qqq/DerivedOutside.java
End of files
@@ -0,0 +1,5 @@
package ppp;
public class Base {
public String x = "base";
}
@@ -0,0 +1,7 @@
package ppp;
public class ClientInside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,4 @@
package ppp;
public class Derived extends Base{
}
@@ -0,0 +1,5 @@
package ppp;
public class Derived extends Base{
public String x = "derived";
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class ClientOutside {
void foo(Derived d) {
String str = d.x;
}
}
@@ -0,0 +1,8 @@
package qqq;
import ppp.*;
public class DerivedOutside extends Derived{
void foo() {
String str = x;
}
}