Skip to content

School occupancy and capacity appear mixed up in SchoolReaderImpl #362

@carlhiggs

Description

@carlhiggs

In the Schools extension SchoolReaderImpl, when occupancy and capacity statistics are read, these appear mixed up:

int capacity = Integer.parseInt(lineElements[posOccupancy]);
int occupancy = Integer.parseInt(lineElements[posCapacity]);

This looks like it might be a typo; if so, I expect the consequences would be pretty minimal. Not surprising such an inconsequential switch hadn't been picked up.

But perhaps I'm misunderstanding how this works, in which case I'd love to know for my own use case, and please feel welcome to close this issue.

I previously raised this as an issue in the project I am working on for one of our use cases, but checking just now realised this pattern is on the master branch here.

So thought best to raise it here, and either get clarification that I have interpreted this in the wrong way, or perhaps someone can make the easy fix and switch them around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions