Opened 4 years ago

Closed 7 months ago

Last modified 7 months 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 Changed 7 months ago by jng

Milestone: 3.1.1

comment:2 Changed 7 months ago by jng

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 Changed 7 months ago by jng

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.