Commit 5e8127ff authored by Oussama El kourri's avatar Oussama El kourri
Browse files

Correction du helper finalizeShouldBeProtected; j'ai remarqué que m.modifier...

Correction du helper finalizeShouldBeProtected; j'ai remarqué que  m.modifier <> 'protected' déclanche l'erreur même si la méthode est protected, il faut ajouter la visibility
parent bd429a49
......@@ -177,7 +177,8 @@ helper def: dontImportSun() : Set(smm!Measure) =
-- Rule for metrics FinalizeShouldBeProtected
helper def: finalizeShouldBeProtected() : Set(smm!Measure) =
java!MethodDeclaration.allInstances()
->select(m | m.name = 'finalize' and m.modifier <> 'protected')
->select(m | m.modifier <> OclUndefined)
->select(m | m.name = 'finalize' and m.modifier.visibility.toString() <> 'protected')
->collect(m | thisModule.MesureFinalizeShouldBeProtected(m));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment