Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IllegalType does not seem to handle multidimensional array types #4425
I was expecting it to flag the variable of type Boolean.
While I can imagine uses cases for which type Boolean is appropriate, my use case is a programming assignment in an introductory algorithms class where memory usage is important. Some of our novice Java programmers inadvertently use Boolean instead of boolean.
changed the title from
IllegalType does not seem to handle array types
IllegalType does not seem to handle multidimensional array types
Jun 7, 2017
@romani Thanks for the quick follow up.
I believe IllegalType doesn't really handle 1D array types either. The Boolean x1 declaration is actually flagged by the "Boolean" part of illegalClassNames (not by the "Boolean" part). Another use case for me is to flag the type int (but not int). So, it's not desirable to have int flagged by the illegalClassName "int".
IllegalTypeCheck now do validation only on very basic name of type, so Integer and Integer are the same.
your second issue is moved out to separate issue - #4429 , as it is new feature request , a bit more complicated to do and test.
You are welcome to provide PRs, I could guide on where to fix, logic is simple.