Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
af3
kernel
Commits
9a60f474
Commit
9a60f474
authored
8 years ago
by
Vincent Aravantinos
Browse files
Options
Downloads
Patches
Plain Diff
improves handling of checksum in case a verification triggers itself falsly
refs 2553
parent
c676b75a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintVerificationService.java
+10
-10
10 additions, 10 deletions
...ooling/kernel/internal/ConstraintVerificationService.java
with
10 additions
and
10 deletions
org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintVerificationService.java
+
10
−
10
View file @
9a60f474
...
...
@@ -43,7 +43,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils;
* @author aravantinos
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash:
3B0A06C0FED81082CCDD8AC5F8C593B1
* @ConQAT.Rating YELLOW Hash:
7BEACA97ADA94E9730616EAB079DED86
*/
public
final
class
ConstraintVerificationService
extends
EObjectAwareServiceBase
<
IConstraintVerifier
<
IConstraint
>>
implements
...
...
@@ -95,9 +95,12 @@ public final class ConstraintVerificationService extends
modelContext
.
runAsCommand
(
new
Runnable
()
{
@Override
public
void
run
()
{
// We update the checksums before verification to avoid detecting some fake
// changes during the verification.
updateChecksums
(
constraint
);
verifier
.
verify
(
constraint
);
//
Updating checksums must be done *after* verification be
ca
u
se the verification
//
can have side
effects.
//
And we also update the checksums after in
case the verification
had some side
// effects.
..
updateChecksums
(
constraint
);
constraint
.
getVerificationStatus
().
setConstraint
(
constraint
);
}
...
...
@@ -118,11 +121,7 @@ public final class ConstraintVerificationService extends
return
fixes
!=
null
?
fixes
:
new
ArrayList
<
IFix
>();
}
/**
* @param constraint
* @return <code>true</code> if <code>constraint</code> is up to date, <code>false</code>
* otherwise.
*/
/** {@inheritDoc} */
@Override
public
boolean
isUpToDate
(
IConstraint
constraint
)
{
for
(
ConstrainedWithChecksum
cwc
:
constraint
.
getConstrainedsWithChecksum
())
{
...
...
@@ -154,8 +153,9 @@ public final class ConstraintVerificationService extends
}
/**
* Flag to print the object which is actually checksummed in a file.
* TODO: remove when the experimental phase for constraints is over.
* Flag to print objects which are actually checksummed in various files.
* This is useful since it is essential to control very precisely how checksums are computed.
* Should however only be set to <code>true</code> on a local machine, not commited!
*/
private
final
boolean
DEBUG
=
false
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment