Skip to content

Add PropertyFileHandler to ValueChecker.#120

Open
xingweitian wants to merge 14 commits intomasterfrom
PropertyFileHandler
Open

Add PropertyFileHandler to ValueChecker.#120
xingweitian wants to merge 14 commits intomasterfrom
PropertyFileHandler

Conversation

@xingweitian
Copy link
Copy Markdown

No description provided.

@xingweitian
Copy link
Copy Markdown
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
Copy Markdown
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
@xingweitian xingweitian requested a review from wmdietl April 27, 2020 14:28
} catch (Exception e) {
checker.message(
Kind.WARNING, "Exception in PropertyFileHandler.readPropertyFromFile: " + e);
e.printStackTrace();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove.

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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