Comments (3)
Original comment by [email protected]
on 6 Nov 2012 at 9:31
from sfntly.
Issue is because of a change in the javac tool between Java 6 and 7.
http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#behavior
al
Area: Tools
Synopsis: Compiler No Longer Allows Access to Private Members of Type Variables
Description: In JDK 5.0 and JDK 6, javac erroneously allowed access to private
members of type-variables. This is wrong, as the JLS, Java SE 7 Edition,
section 4.4, states that the members of a type-variable are the members of an
intersection types whose components are the type-variable bounds (intersection
types are defined in section 4.9) - and intersection types do not inherit
private members from their components. As a result, the following program
should get a compilation error:
class A {
private int val = 42;
}
class Test<X extends A> {
void test(X x) {
int i = x.val; //error in JDK 7
}
}
The above program compiles in JDK 6. Note that accepting this program is
inherently unsound; there is no guarantee that X will be instantiated to a type
that inherits val. For instance, if we called test() on an instance whose type
is Test<B>, where B is a subclass of A, val should not be accessible there.
Since javac cannot guarantee the well-formedness of this program for all
possible instantiations of X this program must be rejected.
Nature of Incompatibility: behavioral and source
RFE: 6246814
Original comment by [email protected]
on 17 Jan 2013 at 7:45
from sfntly.
Fixed with r149
Original comment by [email protected]
on 17 Jan 2013 at 7:47
- Changed state: Fixed
from sfntly.
Related Issues (20)
- Index OO Bounds when adding/changing the last written name in the name table to a zero length name HOT 1
- Inconsistent behaviour in reading a font from a byte array vs input stream HOT 3
- C++ Tables (font and cmap) in wrong order HOT 1
- add maven support and deploy 2 central HOT 2
- javadoc fails on LocaTable.java HOT 1
- FontInfo tool is broken with Java 7 HOT 3
- NameTable iteration breaks on some fonts
- Function OS2Table.setUsWinDescent() sets usWinAscent instead HOT 1
- Function Fontinfo.listGlyphDimensionBounds() can fail with an ArrayIndexOutOfBoundsException on some fonts
- Missing utility function to compute OS-2 unicode range bits from unicode values HOT 1
- Renumbering subsetter should support more cmap formats HOT 1
- Fix sfntly compilation on VS2013 HOT 1
- QNX build is broken HOT 2
- Incorrect encoding name for Windows Shift JIS HOT 1
- UnicodeRange enum missing entries HOT 2
- Incorrect data type for maxp table version number HOT 1
- Index attempted to be read from is out of bounds: 4e HOT 1
- Build on OpenJDK 7 is broken HOT 4
- Proposed build instructions not working on Mac OS X 10.10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfntly.