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

Add PropertyFileHandler to ValueChecker. #120

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

xingweitian
Copy link

No description provided.

@xingweitian
Copy link
Author

This PR is ready for code review. The failed test group is due to a recent update of annotated jdk at typetools.

Copy link
Member

@wmdietl wmdietl left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!
Can you also add documentation of this new feature to the manual?

@wmdietl wmdietl assigned xingweitian and unassigned wmdietl Apr 25, 2020
@xingweitian xingweitian assigned wmdietl and unassigned xingweitian Apr 27, 2020
} catch (Exception e) {
checker.message(
Kind.WARNING, "Exception in PropertyFileHandler.readPropertyFromFile: " + e);
e.printStackTrace();
Copy link
Member

Choose a reason for hiding this comment

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

Remove.

Copy link
Author

Choose a reason for hiding this comment

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

Same reason here. We cannot use reportWarning because there is no AST node to be passed to reportWarning. Same issue in the propkey checker: https://github.com/typetools/checker-framework/blob/master/checker/src/main/java/org/checkerframework/checker/propkey/PropertyKeyAnnotatedTypeFactory.java#L189

res = prop.getProperty(key, defaultValue);
}
} catch (Exception e) {
checker.message(
Copy link
Member

Choose a reason for hiding this comment

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

Use the shorter reportWarning?

Copy link
Author

Choose a reason for hiding this comment

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

Maybe we cannot use reportWarning. There is no such an AST node to be passed to reportWarning.

}

/**
* Get the first value of the {@literal @}StringVal() annotation.
Copy link
Member

Choose a reason for hiding this comment

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

Why only first? Error if more than one?

Copy link
Author

Choose a reason for hiding this comment

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

I decide to return null if there are more than one.

@xingweitian xingweitian requested a review from wmdietl May 29, 2020 02:35
@xingweitian
Copy link
Author

@wmdietl This pull request is ready for another round of code review.

@xingweitian xingweitian assigned xingweitian and unassigned wmdietl Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants