Commit 5dd8795a authored by Teemu Andersén's avatar Teemu Andersén

Add @SuppressWarnings("unused") to generated Java classes

Usually generators add @SuppressWarnings("all") to generated Java
classes to prevent IDEs from complaining about unused imports, etc.
Solving used imports seems pretty hard with current generator logic so
IMO this is the next best thing.

Yes, it’s appended to import block but that is the block that gives
these warnings in the first place.
parent 01e06b69
...@@ -118,7 +118,7 @@ LanguageParameters language_parameters[] = { ...@@ -118,7 +118,7 @@ LanguageParameters language_parameters[] = {
"position()", "position()",
"offset()", "offset()",
"import java.nio.*;\nimport java.lang.*;\nimport java.util.*;\n" "import java.nio.*;\nimport java.lang.*;\nimport java.util.*;\n"
"import com.google.flatbuffers.*;\n\n", "import com.google.flatbuffers.*;\n\n@SuppressWarnings(\"unused\")\n",
{ {
"/**", "/**",
" *", " *",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment