MCPcopy Create free account
hub / github.com/apache/tomcat / getValue

Method getValue

java/jakarta/el/BeanELResolver.java:76–95  ·  view source on GitHub ↗
(ELContext context, Object base, Object property)

Source from the content-addressed store, hash-verified

74 }
75
76 @Override
77 public Object getValue(ELContext context, Object base, Object property) {
78 Objects.requireNonNull(context);
79 if (base == null || property == null) {
80 return null;
81 }
82
83 context.setPropertyResolved(base, property);
84 Method m = this.property(context, base, property).read(context, base);
85 try {
86 return m.invoke(base, (Object[]) null);
87 } catch (InvocationTargetException e) {
88 Throwable cause = e.getCause();
89 Util.handleThrowable(cause);
90 throw new ELException(
91 Util.message(context, "propertyReadError", base.getClass().getName(), property.toString()), cause);
92 } catch (Exception e) {
93 throw new ELException(e);
94 }
95 }
96
97 @Override
98 public void setValue(ELContext context, Object base, Object property, Object value) {

Callers 11

testGetValue01Method · 0.95
testGetValue03Method · 0.95
testGetValue04Method · 0.95
testGetValue05Method · 0.95
testGetValue06Method · 0.95
testGetValue07Method · 0.95
testSetValue04Method · 0.95
testGetDefaultValueMethod · 0.95
doNegativeTestMethod · 0.95

Calls 9

propertyMethod · 0.95
handleThrowableMethod · 0.95
messageMethod · 0.95
readMethod · 0.65
invokeMethod · 0.65
getNameMethod · 0.65
toStringMethod · 0.65
setPropertyResolvedMethod · 0.45
getCauseMethod · 0.45

Tested by 11

testGetValue01Method · 0.76
testGetValue03Method · 0.76
testGetValue04Method · 0.76
testGetValue05Method · 0.76
testGetValue06Method · 0.76
testGetValue07Method · 0.76
testSetValue04Method · 0.76
testGetDefaultValueMethod · 0.76
doNegativeTestMethod · 0.76