Commit 43fbfdfd authored by Vladislav Kiselev's avatar Vladislav Kiselev

Исправлена ошибка в аннотациях.

parent 90227692
...@@ -118,12 +118,12 @@ public class Operation { ...@@ -118,12 +118,12 @@ public class Operation {
} }
private static String getTransportName(MovingObject obj) { private static String getTransportName(MovingObject obj) {
if (obj instanceof TransportShip) {
return "судно " + obj.getId();
}
if (obj instanceof Bunker) { if (obj instanceof Bunker) {
return "бункеровщик " + obj.getId(); return "бункеровщик " + obj.getId();
} }
if (obj instanceof TransportShip) {
return "судно " + obj.getId();
}
if (obj instanceof Tow) { if (obj instanceof Tow) {
return "буксир " + obj.getId(); return "буксир " + obj.getId();
} }
...@@ -131,7 +131,7 @@ public class Operation { ...@@ -131,7 +131,7 @@ public class Operation {
} }
private static String getShortTransportName(MovingObject obj) { private static String getShortTransportName(MovingObject obj) {
if ((obj instanceof TransportShip) || (obj instanceof Bunker) || (obj instanceof Tow)) { if ((obj instanceof TransportShip) || (obj instanceof Tow)) {
return Integer.toString(obj.getId()); return Integer.toString(obj.getId());
} }
return (obj.getName().isEmpty()) ? Integer.toString(obj.getId()) : obj.getName(); return (obj.getName().isEmpty()) ? Integer.toString(obj.getId()) : obj.getName();
...@@ -290,9 +290,13 @@ public class Operation { ...@@ -290,9 +290,13 @@ public class Operation {
{ {
String[] items = rStr.substring(0, rStr.indexOf('[')).split(" "); String[] items = rStr.substring(0, rStr.indexOf('[')).split(" ");
MovingObject ex = m_vessel.get(Integer.valueOf(items[0].trim())); int id = Integer.valueOf(items[0].trim());
if (ex == null) { MovingObject ex;
ex = m_bunker.get(Integer.valueOf(items[0].trim()));
if (m_bunker.containsKey(id)) {
ex = m_bunker.get(id);
} else {
ex = m_vessel.get(id);
} }
setExecutor(ex); setExecutor(ex);
if (items.length > 1) { if (items.length > 1) {
......
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