Skip to content
Snippets Groups Projects
Commit e5986aaf authored by Otmane Mabrouk's avatar Otmane Mabrouk
Browse files

I optimized the code by deleting some lines that were not needed (creating a...

I optimized the code by deleting some lines that were not needed (creating a variable that stocks the result and then returning the variable itself)
parent fefd5df6
No related branches found
No related tags found
No related merge requests found
......@@ -248,17 +248,15 @@ public class PersistableAttributeStore extends AttributeStore implements IPersis
/** {@inheritDoc} */
@Override
public boolean setAttributes(Map<String, Object> values) {
boolean success = super.setAttributes(values);
modified();
return success;
return super.setAttributes(values);
}
/** {@inheritDoc} */
@Override
public boolean setAttributes(IAttributeStore values) {
boolean success = super.setAttributes(values);
modified();
return success;
return super.setAttributes(values);
}
/**
......@@ -270,11 +268,10 @@ public class PersistableAttributeStore extends AttributeStore implements IPersis
*/
@Override
public boolean removeAttribute(String name) {
boolean result = super.removeAttribute(name);
if (result && name != null && !name.startsWith(IPersistable.TRANSIENT_PREFIX)) {
if ((super.removeAttribute(name)) && name != null && !name.startsWith(IPersistable.TRANSIENT_PREFIX)) {
modified();
}
return result;
return (super.removeAttribute(name));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment