Skip to content
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

zilla crash while using model-json and schema is not found #889

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

ankitk-me
Copy link
Contributor

Fixes #817

Comment on lines 79 to 87
if (provider != null)
{
in.wrap(buffer, index, length);
provider.createReader(in).readValue();
}
else
{
status = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to avoid using else clauses to assign boolean variables like this.

Instead, aim to take an approach that would also work for multiple conditions discovered incrementally.

Suggested change
if (provider != null)
{
in.wrap(buffer, index, length);
provider.createReader(in).readValue();
}
else
{
status = false;
}
status &= provider != null;
if (status)
{
in.wrap(buffer, index, length);
provider.createReader(in).readValue();
}

Comment on lines 78 to 88
if (provider != null)
{
parser.next();
parser = provider.createParser(in);
while (parser.hasNext())
{
parser.next();
}
}
else
{
status = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (provider != null)
{
parser.next();
parser = provider.createParser(in);
while (parser.hasNext())
{
parser.next();
}
}
else
{
status = false;
status &= provider != null;
if (status)
{
in.wrap(buffer, index, length);
provider.createReader(in).readValue();
}

@jfallows jfallows merged commit e34c809 into aklivity:develop Apr 4, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in JsonValidatorHandler when the remote registry can't be accessed
2 participants