GetterSetter generation bug when variable name starts with "is"

Issue #2566 open
Eric Kintzer created an issue

Given the simple class with two instance variables isSuccess and issuedToName, the Generate > Getter/Setter strips the “is” from the String variable

public with sharing class ExampleApexType {
    Boolean isSuccess;
    String issuedToName;

    public Boolean isSuccess() { return isSuccess; }

    public ExampleApexType withSuccess(Boolean success) {
        this.isSuccess = success;
        return this;
    }

    public String getSuedToName() { return issuedToName; }  <== oops! method name is wrong

    public ExampleApexType withSuedToName(String suedToName) { <== oops, method & arg name are wrong
        this.issuedToName = suedToName;
        return this;
    }
}

Comments (2)

  1. Scott Wells repo owner
    • changed status to open

    I like that. It sounds like flippant legislation!

    Thanks for reporting. Should be pretty simple to address.

  2. Log in to comment