Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
7852ea8b
Commit
7852ea8b
authored
Apr 16, 2015
by
yannick legoc
Browse files
corrected bug with SpyPropertyDescriptorComparator
parent
e650f3ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/fr/ill/ics/nscclient/dataprovider/PropertyDatabase.java
View file @
7852ea8b
...
...
@@ -110,13 +110,11 @@ public class PropertyDatabase {
Set
<
SpyPropertyDescriptor
>
set
=
new
TreeSet
<
SpyPropertyDescriptor
>(
new
SpyPropertyDescriptorComparator
());
spyPropertiesByServant
.
put
(
servantId
,
set
);
}
spyPropertiesByServant
.
get
(
servantId
).
add
(
descriptor
);
// if (descriptor.getSetpointID() != 0) {
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
// }
// System.out.println("spy property for servant " + servantId);
// System.out.println(descriptor);
}
/**
...
...
src/fr/ill/ics/nscclient/servant/SpyPropertyDescriptorComparator.java
View file @
7852ea8b
...
...
@@ -28,9 +28,9 @@ public class SpyPropertyDescriptorComparator implements Comparator<SpyPropertyDe
// first comparing set point ID before actual ID
if
(
d1
.
getSetpointID
()
==
d2
.
getSetpointID
())
{
return
Integer
.
compare
(
d1
.
getActualID
(),
d
1
.
getActualID
());
return
Integer
.
compare
(
d1
.
getActualID
(),
d
2
.
getActualID
());
}
return
Integer
.
compare
(
d1
.
getSetpointID
(),
d2
.
getSetpointID
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment