samples/privilegedcreator/test/accessprotectedmethod/AccessWriteLockTest.java
changeset 71 a9bd40166b60
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/privilegedcreator/test/accessprotectedmethod/AccessWriteLockTest.java	Sat Jun 14 09:53:28 2008 +0200
     1.3 @@ -0,0 +1,17 @@
     1.4 +package accessprotectedmethod;
     1.5 +
     1.6 +
     1.7 +public class AccessWriteLockTest {
     1.8 +    
     1.9 +    @org.junit.Test
    1.10 +    public void testCallToMyDocument() {
    1.11 +        MyDocument doc = new MyDocument();
    1.12 +        
    1.13 +        // following line does not compile as
    1.14 +        // writeLock() has protected access in AbstractDocument
    1.15 +        // doc.writeLock();
    1.16 +        
    1.17 +        doc.writeLockAccess();
    1.18 +    }
    1.19 +    
    1.20 +}