Jump to content

Suggestion: ResourceDescriptor.getResourceType()


developerdude

Recommended Posts

 should not return a fully qualified class/field name.

For example, in a test, before I call a webservice I set the resource type in the ResourceDescriptor I am sending to the web service using the constant static filed ResourceDescriptor.TYPE_CONTENT_RESOURCE which evaluates to "contentResource".

The web service returns a ResourceDescriptor with its resource type set to "com.jaspersoft.jasperserver.api.metadata.common.domain.ContentResource"

Not the same string. If, as I do, I have an assert on the return type to match what I asked for, it fails (unless I parse the string or call contains()).

Suggestion: either use Java 5+ enums (preferable) or be consistent with the strings used as params and return values when describing the same value.

It will make our life easier.

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...