Menu

Unable to compile TaskElement.java

Sergey
2012-11-09
2012-11-26
  • Sergey

    Sergey - 2012-11-09

    The following fragment of code gives error in netbeans IDE:
    protected static <T extends TaskElement> T create(T taskElement,
                TaskSource taskSource) {
            taskElement.taskSource = taskSource;
    error - "taskSource has private access in TaskElement"
    and several errors of the same type  "private access"  in other three classes

     
  • Sergey

    Sergey - 2012-11-15

    Thanks! This commit fix all my compile errors.
    For information: I use jdk 1.7 from Sun in windows (not OpenJDK as specified in commit)  (and have this errors, with jdk 1.6 too)
    and problem was not that the private member was accessed from static context but the fact  that it was accessed from probably descendant ( T extend TaskElement). In my opinion…?
           Sergey.

     

Log in to post a comment.