Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize method getProperty and replace the thrown RuntimeException through a null value as return value (#1973) #1974

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -949,14 +949,14 @@ public Object getProperty(Module module, String propName) {
ElementPropertyDefn prop = getPropertyDefn(propName);

// If the property is not found, then the value is null.

if (prop == null) {
return null;
}

if (ODA_PASSWORD.contentEquals(propName) && prop.isEncryptable() && getEncryptionID(prop) != null
&& JavaScriptExecutionStatus.isExecuting()) {
throw new RuntimeException("Invalid operation: Can not access encrypted password from script");
// throw new RuntimeException("Invalid operation: Can not access encrypted password from script");
return null;
}

return getProperty(module, prop);
Expand Down Expand Up @@ -2317,7 +2317,7 @@ public boolean canEdit(Module module) {
public boolean canDrop(Module module) {
// if the root of element is included by report/library. Do not allow
// drop; if module is read-only, forbid drop too


// Can not change the structure of child element or a virtual element(
// inside the child ).
Expand Down Expand Up @@ -3032,7 +3032,7 @@ protected Object baseClone() throws CloneNotSupportedException {
String key = iter.next();
ElementPropertyDefn propDefn = getPropertyDefn(key);
Object value = propValues.get(key);


// if the property is element type, then set-up the container
// relationship
Expand Down
Loading