0

while running the flex PMD, it is throwing some errors in the below line.

var strHandle:String = ConfigXMLModelLocator.getInstance().handle;

var appHandle:String = ConfigXMLModelLocator.getInstance().handle;

->Error displaying here. var call:Object=service.getEVAInfo(strHandle,appHandle);

Error:- UseObjectType. Do not use Object class. It is a bad practice to use the dynamic class Object. Prefer using strongly typed object, or marker interface in order to avoid silent compilation errors while refactoring.

Dennis Jaamann
  • 3,547
  • 2
  • 23
  • 42
RKCY
  • 4,095
  • 14
  • 61
  • 97

1 Answers1

0

If getEVAInfo returns an Object, there's nothing you can do about the Flex PMD error. Just ignore it as there's nothing wrong with using dynamic objects as long as you know what you are doing.

You can also use the //NOPMD comment to make PMD skip this line.

laurent
  • 88,262
  • 77
  • 290
  • 428
  • If the service is a RemoteObject it returns an `AsyncToken` which is also a dynamic object. But without knowing what `service` is, can't really help. – Jonathan Rowny Nov 29 '11 at 15:33