Could we clean up the Java code Thrift generates? I like my code to pass
javac's -Xlint option, but the generated Java code shows several -Xlint
warnings.

$ cat pom.xml
...
<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <compilerArgument>-Xlint</compilerArgument>
  </configuration>
</plugin>
...

$ mvn compile
...
[WARNING]
/Users/user/Desktop/src/jsoupcrawler/target/generated-sources/org/jsoupx/crawler/jsoupcrawler/CrawledResource.java:[653,51]
[unchecked] unchecked call to read(org.apache.thrift.protocol.TProtocol,T)
as a member of the raw type org.apache.thrift.scheme.IScheme
[WARNING]
/Users/user/Desktop/src/jsoupcrawler/target/generated-sources/org/jsoupx/crawler/jsoupcrawler/CrawledResource.java:[657,52]
[unchecked] unchecked call to write(org.apache.thrift.protocol.TProtocol,T)
as a member of the raw type org.apache.thrift.scheme.IScheme
[WARNING]
/Users/user/Desktop/src/jsoupcrawler/target/generated-sources/org/jsoupx/crawler/jsoupcrawler/CrawledResource.java:[760,32]
getScheme() in
org.jsoupx.crawler.jsoupcrawler.CrawledResource.JsoupcrawlertandardSchemeFactory
implements <S>getScheme() in org.apache.thrift.scheme.SchemeFactory; return
type requires unchecked conversion
found   :
org.jsoupx.crawler.jsoupcrawler.CrawledResource.JsoupcrawlertandardScheme

Reply via email to