Issue #2870 log product id when generic packet fails to find

corresponding packet class

Change-Id: I839e622b063eae4e707f9abc31f010ef795bc9f1

Former-commit-id: 6818ea9c23 [formerly 0d01b387e454f276d0ebdecfb14ad294b67a55b7]
Former-commit-id: a1caeae552
This commit is contained in:
Nate Jensen 2014-03-04 11:52:34 -06:00
parent 59434c8a60
commit ef05ddc408

View file

@ -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) {