File tree Expand file tree Collapse file tree 4 files changed +2
-16
lines changed Expand file tree Collapse file tree 4 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ class Subtype {
5454 ..namespace = namespace
5555 ..type = resourceType
5656 ..subtype = resourceSubtype
57- ..remotePath.addAll (name.split (':' )..removeLast ())
58- ..name = name
59- ..localName = name.split (':' ).last;
57+ ..name = name;
6058 }
6159
6260 @override
Original file line number Diff line number Diff line change @@ -15,9 +15,7 @@ class ResourceManager {
1515 if (resources.containsKey (name)) {
1616 throw DuplicateResourceException (name);
1717 }
18- final rnWithoutRemote = name.deepCopy ()
19- ..remotePath.clear ()
20- ..name = name.localName;
18+ final rnWithoutRemote = name.deepCopy ()..name = name.name.split (':' ).last;
2119 final names = _resourceNamesWithoutRemotes[rnWithoutRemote] ?? [];
2220 names.add (name);
2321 _resourceNamesWithoutRemotes[rnWithoutRemote] = names;
Original file line number Diff line number Diff line change @@ -115,12 +115,6 @@ class RobotClient {
115115 Future <void > refresh () async {
116116 final rpb.ResourceNamesResponse response = await _client.resourceNames (rpb.ResourceNamesRequest ());
117117 final responseNames = response.resources.map ((rn) {
118- if (rn.remotePath.isEmpty) {
119- rn.remotePath.addAll (rn.name.split (':' )..removeLast ());
120- }
121- if (rn.localName.isEmpty) {
122- rn.localName = rn.name.split (':' ).last;
123- }
124118 return rn;
125119 });
126120 if (setEquals (responseNames.toSet (), resourceNames.toSet ())) {
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ void main() {
1010 expect (localRN.namespace, Sensor .subtype.namespace);
1111 expect (localRN.type, Sensor .subtype.resourceType);
1212 expect (localRN.subtype, Sensor .subtype.resourceSubtype);
13- expect (localRN.remotePath, []);
1413 expect (localRN.name, localName);
15- expect (localRN.localName, localName);
1614
1715 // Remote
1816 final remoteName = 'my-sensor' ;
@@ -22,9 +20,7 @@ void main() {
2220 expect (remoteRN.namespace, Sensor .subtype.namespace);
2321 expect (remoteRN.type, Sensor .subtype.resourceType);
2422 expect (remoteRN.subtype, Sensor .subtype.resourceSubtype);
25- expect (remoteRN.remotePath, remotePath.split (':' ));
2623 expect (remoteRN.name, fullRemoteName);
27- expect (remoteRN.localName, remoteName);
2824 });
2925 });
3026}
You can’t perform that action at this time.
0 commit comments