Merged
Conversation
Added new Annotation (Unsigned) used to indicate that an integer type or integer type pointer refers to an unsigned value. Used Unsigned-Annotation to mark parameter length in getDokanControlList method in DokanControl and all calls that lead to it Changed getDokanControlList to use an unsigned int instead of a long (matching Dokany that uses ULONG) and finished method (removed TODO) Changed length of array MountPoint to 260 to match Dokany
Updated DokanControl to use WinNT.MAX_PATH and rewrote getDokanControlList
Corrected types of fields in structures to match Dokany FIxed wrong types/usage in Constructor in DokanControl FIxed wrong parameters in Constructor in DokanOptions Fixed wrong parameters and added Unsigned-Annotation in accessors of the constructer
Added Unsigned-Annotation to all accessors of unsigned value Added UnsignedNumbers class with conversion methods between unsigned integer types and String Fixed toString method of DokanFileInfo and DokanOptions
Closed
infeo
requested changes
Jun 22, 2020
Member
infeo
left a comment
There was a problem hiding this comment.
Generally I approve, but the (already previously) discussed changes need to be implemented.
Moved my comment and took out the sass to make it more professional See: dokan-dev#48 (comment)
Replaced usage of "assert" with explicit check to make sure that the check is done, even if assertions are disabled. From the java language guide (linked below): "Do not use assertions for argument checking in public methods. Argument checking is typically part of the published specifications (or contract) of a method, and these specifications must be obeyed whether assertions are enabled or disabled." The next sentence "Another problem with using assertions for argument checking is that erroneous arguments should result in an appropriate runtime exception (such as IllegalArgumentException, IndexOutOfBoundsException, or NullPointerException). An assertion failure will not throw an appropriate exception." doesn't apply in this case as this method isn't part of the API. It's only used internally and this check is implemented solely for the purpose of making sure everything in this library is working fine. See: https://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html or https://web.archive.org/web/20200622193110/https://docs.oracle.com/javase/7/docs/technotes/guides/language/assert.html
Member
Author
|
To document the reasoning for creating MAPPING.md:
|
Added methods to compare, divide and get the remainder of unsigned numbers to UnsignedNumbers. See: dokan-dev#48 (comment)
Added methods for unsigned conversion between integer types
Added constants that were missing from my last commit to UnsignedNumbers to allow compilation/fix compiler errors. Sorry!
Removed all unnecessary values from the @ Targets of @ Unsigned
infeo
previously requested changes
Jun 28, 2020
Member
infeo
left a comment
There was a problem hiding this comment.
Add the Javadoc for the annotation and this PR is ready to be merged.
JaniruTEC
commented
Jun 30, 2020
Comment on lines
+79
to
+80
| * At least the following cases ("minimum usage") should be annotated with <i>@Unsigned</i> to | ||
| * guarantee the best quality of code: |
Member
Author
There was a problem hiding this comment.
In the future it may be useful to check our/foreign source code for compliance to this rule, e.g. with the Checker Framework.
Member
Author
There was a problem hiding this comment.
// Do not resolve or close. //
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added MAPPING.md as common guideline for type-conversions
Added new Annotation (Unsigned) used to indicate that an integer type or integer type pointer refers to an unsigned value.
Corrected types of fields in structures to match Dokany
Added Unsigned-Annotation to all accessors of unsigned values
Added UnsignedNumbers class with conversion methods between unsigned integer types and String
Merging this PR closes issue #46