Skip to content

Is there a way to prohibit usage of var keyword #1051

Answered by hankem
ChristianGmw asked this question in Q&A
Discussion options

You must be logged in to vote

As ArchUnit (currently) only analyzes byte code, it cannot distinguish between var and an explicit type declaration, as the compiler creates the same class file regardless of whether the type was expclitly declared or inferred.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ChristianGmw
Comment options

Answer selected by ChristianGmw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants