Skip to content
This repository was archived by the owner on Nov 15, 2022. It is now read-only.

Commit 6b38d52

Browse files
pranjal10yaminikb
authored andcommitted
Fixes #21297. asadmin set command throws NPE on beans with read only properties (#21988)
1 parent bbdd96d commit 6b38d52

File tree

1 file changed

+3
-1
lines changed
  • nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin

1 file changed

+3
-1
lines changed

nucleus/core/kernel/src/main/java/com/sun/enterprise/v3/admin/SetCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ public Object run(ConfigBeanProxy param) throws PropertyVetoException, Transacti
536536
// collection parameter that parameterized with the right type
537537
Class argClasses[] = m.getParameterTypes();
538538
Type argTypes[] = m.getGenericParameterTypes();
539-
if (!bean.model.toProperty(m).xmlName().equals(elementName) ||
539+
ConfigModel.Property prop = bean.model.toProperty(m);
540+
if (prop == null ||
541+
!prop.xmlName().equals(elementName) ||
540542
argClasses.length != 1 ||
541543
!Collection.class.isAssignableFrom(argClasses[0]) ||
542544
argTypes.length != 1 ||

0 commit comments

Comments
 (0)