-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: master
Are you sure you want to change the base?
Conversation
This PR is ready for code review. The failed test group is due to a recent update of annotated jdk at typetools. |
There was a problem hiding this 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?
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueQualifierHierarchy.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueQualifierHierarchy.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueTreeAnnotator.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/PropertyFileHandler.java
Outdated
Show resolved
Hide resolved
} catch (Exception e) { | ||
checker.message( | ||
Kind.WARNING, "Exception in PropertyFileHandler.readPropertyFromFile: " + e); | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the shorter reportWarning
?
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueAnnotatedTypeFactory.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueChecker.java
Outdated
Show resolved
Hide resolved
framework/src/main/java/org/checkerframework/common/value/ValueQualifierHierarchy.java
Outdated
Show resolved
Hide resolved
@wmdietl This pull request is ready for another round of code review. |
No description provided.