Skip to content

"Not a setter" exception cannot be be thrown in Property.java [SPR-15507] #20066

@spring-projects-issues

Description

@spring-projects-issues

Phil Webb opened SPR-15507 and commented

Someone from the community raised this to me:

The Property class includes the following:

	int index = this.writeMethod.getName().indexOf("set") + 3;
			if (index == -1) {
				throw new IllegalArgumentException("Not a setter method");
}

Since the index is set with +3 there's no way for the exception to throw.

See

int index = this.writeMethod.getName().indexOf("set") + 3;


Affects: 4.3.8

Referenced from: commits 817e80c, aa8cf19

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions