thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Meier" <ro...@bufferoverflow.ch>
Subject AW: Compiling generated .java code with -Xlint shows some warnings
Date Fri, 27 Sep 2013 19:07:11 GMT
Hi
> Von: Keith Turner [mailto:keith@deenlo.com]
> Gesendet: Montag, 23. September 2013 21:40
> An: user@thrift.apache.org
> Betreff: Re: Compiling generated .java code with -Xlint shows some
warnings
> 
> On Mon, Sep 23, 2013 at 2:53 PM, Andrew Pennebaker
> <apennebaker@42six.com>wrote:
> 
> > Could we clean up the Java code Thrift generates? I like my code to
> > pass
> >
> 
> Could submit a patch to thrift for this.
Yes, please

;-r

> 
> In Accumulo, you could look at the following script.
> 
> ./core/src/main/scripts/generate-thrift.sh
> 
> 
> > 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/jsou
> > px/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/jsou
> > px/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/jsou
> > px/crawler/jsoupcrawler/CrawledResource.java:[760,32]
> > getScheme() in
> >
> >
> org.jsoupx.crawler.jsoupcrawler.CrawledResource.JsoupcrawlertandardSch
> > emeFactory implements <S>getScheme() in
> > org.apache.thrift.scheme.SchemeFactory; return type requires unchecked
> > conversion
> > found   :
> >
> org.jsoupx.crawler.jsoupcrawler.CrawledResource.JsoupcrawlertandardSch
> > eme
> >


Mime
View raw message