author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:53:28 +0200 | |
changeset 71 | a9bd40166b60 |
permissions | -rw-r--r-- |
jtulach@71 | 1 |
package accessprotectedmethod; |
jtulach@71 | 2 |
|
jtulach@71 | 3 |
|
jtulach@71 | 4 |
public class AccessWriteLockTest { |
jtulach@71 | 5 |
|
jtulach@71 | 6 |
@org.junit.Test |
jtulach@71 | 7 |
public void testCallToMyDocument() { |
jtulach@71 | 8 |
MyDocument doc = new MyDocument(); |
jtulach@71 | 9 |
|
jtulach@71 | 10 |
// following line does not compile as |
jtulach@71 | 11 |
// writeLock() has protected access in AbstractDocument |
jtulach@71 | 12 |
// doc.writeLock(); |
jtulach@71 | 13 |
|
jtulach@71 | 14 |
doc.writeLockAccess(); |
jtulach@71 | 15 |
} |
jtulach@71 | 16 |
|
jtulach@71 | 17 |
} |