You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/07/08 08:39:33 UTC

DO NOT REPLY [Bug 29967] New: - setValue doesn't support non-void setters

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29967>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29967

setValue doesn't support non-void setters

           Summary: setValue doesn't support non-void setters
           Product: Commons
           Version: 1.1 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: JXPath
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: xdury@hotmail.com


imagine a class like this:

public class User {
  private String userName;
  public String getUserName() {
    return this.userName;
  }
  public User setUserName(String inUserName) {
    this.userName = inUserName;
    return this;
  }
}

JXPathContext.newContext(new User()).setValue("userName", "Mickey");

throws

Exception trying to create xpath /userName; Cannot modify property: 
User.userName; No write method

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org