New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Fixes and Improvements #300

Merged
merged 9 commits into from May 31, 2016

Conversation

Projects
None yet
2 participants
@RobertBColton
Collaborator

RobertBColton commented May 30, 2016

The GMX reader was not handling potentially null ResourceReferences properly. This solution follows the same solution as the GMK Reader/Writer by using a static helper method to dereference the resource and then obtain its name or id and return it. In the future this could be replaced with a functional interface that would take a lambda.

Path's were also saving the background room reference incorrectly, GMS saves the id of the background room, not the name of the background room.

This fully addresses #297

GMX Reader/Writer Fixes
The GMX reader was not handling potentially null ResourceReferences
properly. This solution follows the same solution as the GMK Reader/Writer
by using a static helper method to dereference the resource and then
obtain its name or id and return it. In the future this could be replaced
with a functional interface that would take a lambda.
@@ -863,28 +863,32 @@ else if (cname.equals("path"))
Integer.parseInt(pthdoc.getElementsByTagName("precision").item(0).getTextContent()));
pth.put(PPath.CLOSED,
Integer.parseInt(pthdoc.getElementsByTagName("closed").item(0).getTextContent()) != 0);
final String proptext = pthdoc.getElementsByTagName("backroom").item(0).getTextContent();
final int backroom = Integer.parseInt(pthdoc.getElementsByTagName("backroom").item(0).getTextContent());

This comment has been minimized.

@rpjohnst

rpjohnst May 30, 2016

Contributor

Should probably handle the case of non-integer garbage in the file here.

@rpjohnst

rpjohnst May 30, 2016

Contributor

Should probably handle the case of non-integer garbage in the file here.

RobertBColton added some commits May 30, 2016

Cleanup readers/writers
Remove excess whitespace and newlines. Also set the ProjectFileContext
back to private in the reader as it originally was in 16b4, there was
never a need for it to be public. Increments revision number for existing
fixes in branch.
Extract version number to a static string
This way it will be easier to replace.

@RobertBColton RobertBColton changed the title from GMX Reader/Writer Fixes to General Fixes and Improvements May 31, 2016

@RobertBColton RobertBColton merged commit b4b114d into IsmAvatar:master May 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment