Opened 10 years ago

Closed 6 years ago

Last modified 6 years ago

#2480 closed defect (fixed)

MgReader.GetPropertyIndex() on an invalid property name should return -1

Reported by: jng Owned by: jng
Priority: low Milestone: 3.1.1
Component: Web API Version: 2.6.0
Severity: trivial Keywords:
Cc: External ID:

Description

Currently, calling MgReader.GetPropertyIndex() on an invalid property name will throw a MgObjectNotFoundException.

In such cases, returning -1 is sufficient to indicate an invalid property.

Change History (3)

comment:1 by jng, 6 years ago

Milestone: 3.1.1

comment:2 by jng, 6 years ago

Resolution: fixed
Status: newclosed

In 9369:

Don't throw on bad property name in GetPropertyIndex, just return -1. This is the expected contract that other reader types already fulfil. Why should MgFeatureReader be an exception?

Fixes #2480

comment:3 by jng, 6 years ago

In 9370:

Merged revision(s) 9369 from trunk/MgDev:
Don't throw on bad property name in GetPropertyIndex, just return -1. This is the expected contract that other reader types already fulfil. Why should MgFeatureReader be an exception?

Fixes #2480
........

Note: See TracTickets for help on using tickets.