Skip to content

AutoValue does not handle names beginning with double capitals well #565

@alpeshvas

Description

@alpeshvas
package com.alpesh.Test
 public abstract class Test implements ITest {

        public static Builder builder() {
		return new AutoValue_Test.Builder();
	}

	AutoValue.Builder
	public abstract static class Builder {
		public abstract Builder xIdentityContext(String xIdentityContext);
		public abstract TnCredentials build();
	}

}


public interface ITest {
	String getApiKey();
	boolean isDebug();
	String getUrl();
	String getXIdentityContext();
}

Consider the above code at first. Note the method name in ITest interface for method getXIdentityContext

Build failed with

Method does not correspond to a property of  com.alpesh.Test
   	public abstract Builder xIdentityContext(String xIdentityContext);

Now, comes the interesting part, when changed that method name in ITest Interface with getXidentityContext ( I -> i ) and did same in AutoValue.Builder( I -> i ). Build succeeded. Have any one experienced this before . Is Autovalue unable to detect property when there is two Capital letters at the beginnig ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions