Issue #2870 log product id when generic packet fails to find
corresponding packet class Change-Id: I839e622b063eae4e707f9abc31f010ef795bc9f1 Former-commit-id: 0d01b387e454f276d0ebdecfb14ad294b67a55b7
This commit is contained in:
parent
cbf8b9249c
commit
6818ea9c23
1 changed files with 10 additions and 1 deletions
|
@ -31,7 +31,8 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* A factory for creating packets based on the packet ID. In the case of generic
|
||||
* packets, it further uses the product ID to determine the packet to create.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
|
@ -39,6 +40,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 03/04/2013 DCS51 zwang Handle GFM product
|
||||
* 07/29/2013 2148 mnash Refactor registering of packets to Spring
|
||||
* 03/04/2014 2870 njensen Log product ID when no class found for generic packet
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -47,6 +49,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
*/
|
||||
|
||||
public class PacketFactory {
|
||||
|
||||
/** The logger */
|
||||
private static final IUFStatusHandler handler = UFStatus
|
||||
.getHandler(PacketFactory.class);
|
||||
|
@ -96,6 +99,12 @@ public class PacketFactory {
|
|||
if (packetClass != null && packetClass.equals(GenericDataPacket.class)) {
|
||||
int productId = GenericUtil.getProductID(in);
|
||||
packetClass = genericClassMap.get(productId);
|
||||
if (packetClass == null) {
|
||||
handler.handle(Priority.ERROR,
|
||||
"No class registered for generic packet ID: "
|
||||
+ packetId + " with product ID: " + productId);
|
||||
return packet;
|
||||
}
|
||||
}
|
||||
|
||||
if (packetClass != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue