[
https://issues.apache.org/jira/browse/THRIFT-4073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857343#comment-15857343
]
Christopher Tubbs commented on THRIFT-4073:
-------------------------------------------
My current workaround is post-processing. I use the following in conjunction
with my workaround in THRIFT-4074:
{code}
find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public enum ' {} + |
xargs -0 sed -i.orig -e '/^import .*$/d'
{code}
> enum files are still being generated with unused imports
> --------------------------------------------------------
>
> Key: THRIFT-4073
> URL: https://issues.apache.org/jira/browse/THRIFT-4073
> Project: Thrift
> Issue Type: Bug
> Components: Java - Compiler
> Affects Versions: 0.10.0
> Reporter: Christopher Tubbs
>
> I love that import statements are no longer being generated, because it means
> less "unused imports" warnings from my compiler and checkstyle rules.
> However, it appears that the enum generation did not get as much care as
> class file generation. There still remain some import statements in enum
> files. All of them are unused because of the fully-qualified types being used
> instead, so they are safe to delete.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)