You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Glen Mazza <gl...@verizon.net> on 2008/03/27 03:31:21 UTC

Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Thanks...BTW, what do I need to do get the checkstyle errors *before* I
check in the files?  mvn checkstyle:checkstyle none-too-helpfully tells
me there are checkstyle errors, but won't tell me what they are.

Glen


Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
> Author: dkulp
> Date: Wed Mar 26 19:26:43 2008
> New Revision: 641692
> 
> URL: http://svn.apache.org/viewvc?rev=641692&view=rev
> Log:
> More fixes
> 
> Modified:
>     incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
> 
> Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r2=641692&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java (original)
> +++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java Wed Mar 26 19:26:43 2008
> @@ -36,7 +36,7 @@
>      }
>  
>      public static int copy(final InputStream input, final OutputStream output)
> -            throws IOException {
> +        throws IOException {
>          return copy(input, output, DEFAULT_BUFFER_SIZE);
>      }
>  
> @@ -95,7 +95,7 @@
>      }
>  
>      public static String toString(final InputStream input, int bufferSize)
> -            throws IOException {
> +        throws IOException {
>  
>          int avail = input.available();
>          if (avail > bufferSize) {
> @@ -129,7 +129,7 @@
>      }
>  
>      public static String readStringFromStream(InputStream in)
> -            throws IOException {
> +        throws IOException {
>  
>          StringBuilder sb = new StringBuilder(1024);
>  
> @@ -151,7 +151,7 @@
>       * @throws IOException
>       */
>      public static ByteArrayInputStream loadIntoBAIS(InputStream in)
> -            throws IOException {
> +        throws IOException {
>          int i = in.available();
>          if (i < DEFAULT_BUFFER_SIZE) {
>              i = DEFAULT_BUFFER_SIZE;
> 
> 


Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 26 March 2008, Glen Mazza wrote:
> Thanks...BTW, what do I need to do get the checkstyle errors *before*
> I check in the files?  mvn checkstyle:checkstyle none-too-helpfully
> tells me there are checkstyle errors, but won't tell me what they are.

Just "mvn install" without any profiles set should do it.   You actually 
can do "mvn validate" which will run the PMD and checkstyle stuff (since 
we have them configured to run in the validate phase).   Basically, 
don't do -Pfastinstall or -Pnochecks.   There is a -Psourcecheck profile 
which is what invokes it, but that is "activeByDefault" so shouldn't 
need to be specified.


Dan


> Glen
>
> Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
> > Author: dkulp
> > Date: Wed Mar 26 19:26:43 2008
> > New Revision: 641692
> >
> > URL: http://svn.apache.org/viewvc?rev=641692&view=rev
> > Log:
> > More fixes
> >
> > Modified:
> >    
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpe
> >rs/IOUtils.java
> >
> > Modified:
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpe
> >rs/IOUtils.java URL:
> > http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/m
> >ain/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r2=
> >641692&view=diff
> > ====================================================================
> >========== ---
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpe
> >rs/IOUtils.java (original) +++
> > incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpe
> >rs/IOUtils.java Wed Mar 26 19:26:43 2008 @@ -36,7 +36,7 @@
> >      }
> >
> >      public static int copy(final InputStream input, final
> > OutputStream output) -            throws IOException {
> > +        throws IOException {
> >          return copy(input, output, DEFAULT_BUFFER_SIZE);
> >      }
> >
> > @@ -95,7 +95,7 @@
> >      }
> >
> >      public static String toString(final InputStream input, int
> > bufferSize) -            throws IOException {
> > +        throws IOException {
> >
> >          int avail = input.available();
> >          if (avail > bufferSize) {
> > @@ -129,7 +129,7 @@
> >      }
> >
> >      public static String readStringFromStream(InputStream in)
> > -            throws IOException {
> > +        throws IOException {
> >
> >          StringBuilder sb = new StringBuilder(1024);
> >
> > @@ -151,7 +151,7 @@
> >       * @throws IOException
> >       */
> >      public static ByteArrayInputStream loadIntoBAIS(InputStream in)
> > -            throws IOException {
> > +        throws IOException {
> >          int i = in.available();
> >          if (i < DEFAULT_BUFFER_SIZE) {
> >              i = DEFAULT_BUFFER_SIZE;



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Posted by Glen Mazza <gl...@verizon.net>.
OK, thanks, I'll try that.

Glen

Am Mittwoch, den 26.03.2008, 23:08 -0400 schrieb Daniel Kulp:
> 
> That's actually a good point.  If you follow the instructions for setting 
> up eclipse at:
> 
> http://cwiki.apache.org/confluence/display/CXF/Setting+up+Eclipse
> 
> then eclipse will handle all the checkstyle, pmd, compiler warnings, 
> etc...    Basically, if you see any warnings/errors in eclipse, 
> something is wrong.   The CXF projects are 100% warning/error free in 
> eclipse.
> 
> That's pretty much how I work.   Since eclipse will do all the 
> checkstyle/pmd, when I run mvn from the command line, I normally just 
> do -Pnochecks.  
> 
> Dan
> 
> 
> 
> 
> On Wednesday 26 March 2008, Willem Jiang wrote:
> > Hi Glen,
> >
> > If you are using Eclipse to write the Java code , you just need
> > install a Check Style plugin[1].
> > That will be helpful to let you know the error when you save the code.
> > [1] http://eclipse-cs.sourceforge.net/update
> >
> > Willem
> >
> > Glen Mazza wrote:
> > > Thanks...BTW, what do I need to do get the checkstyle errors
> > > *before* I check in the files?  mvn checkstyle:checkstyle
> > > none-too-helpfully tells me there are checkstyle errors, but won't
> > > tell me what they are.
> > >
> > > Glen
> > >
> > > Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
> > >> Author: dkulp
> > >> Date: Wed Mar 26 19:26:43 2008
> > >> New Revision: 641692
> > >>
> > >> URL: http://svn.apache.org/viewvc?rev=641692&view=rev
> > >> Log:
> > >> More fixes
> > >>
> > >> Modified:
> > >>    
> > >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> > >>ers/IOUtils.java
> > >>
> > >> Modified:
> > >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> > >>ers/IOUtils.java URL:
> > >> http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/
> > >>main/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r
> > >>2=641692&view=diff
> > >> ===================================================================
> > >>=========== ---
> > >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> > >>ers/IOUtils.java (original) +++
> > >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> > >>ers/IOUtils.java Wed Mar 26 19:26:43 2008 @@ -36,7 +36,7 @@
> > >>      }
> > >>
> > >>      public static int copy(final InputStream input, final
> > >> OutputStream output) -            throws IOException {
> > >> +        throws IOException {
> > >>          return copy(input, output, DEFAULT_BUFFER_SIZE);
> > >>      }
> > >>
> > >> @@ -95,7 +95,7 @@
> > >>      }
> > >>
> > >>      public static String toString(final InputStream input, int
> > >> bufferSize) -            throws IOException {
> > >> +        throws IOException {
> > >>
> > >>          int avail = input.available();
> > >>          if (avail > bufferSize) {
> > >> @@ -129,7 +129,7 @@
> > >>      }
> > >>
> > >>      public static String readStringFromStream(InputStream in)
> > >> -            throws IOException {
> > >> +        throws IOException {
> > >>
> > >>          StringBuilder sb = new StringBuilder(1024);
> > >>
> > >> @@ -151,7 +151,7 @@
> > >>       * @throws IOException
> > >>       */
> > >>      public static ByteArrayInputStream loadIntoBAIS(InputStream
> > >> in) -            throws IOException {
> > >> +        throws IOException {
> > >>          int i = in.available();
> > >>          if (i < DEFAULT_BUFFER_SIZE) {
> > >>              i = DEFAULT_BUFFER_SIZE;
> 
> 
> 


Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Posted by Daniel Kulp <dk...@apache.org>.

That's actually a good point.  If you follow the instructions for setting 
up eclipse at:

http://cwiki.apache.org/confluence/display/CXF/Setting+up+Eclipse

then eclipse will handle all the checkstyle, pmd, compiler warnings, 
etc...    Basically, if you see any warnings/errors in eclipse, 
something is wrong.   The CXF projects are 100% warning/error free in 
eclipse.

That's pretty much how I work.   Since eclipse will do all the 
checkstyle/pmd, when I run mvn from the command line, I normally just 
do -Pnochecks.  

Dan




On Wednesday 26 March 2008, Willem Jiang wrote:
> Hi Glen,
>
> If you are using Eclipse to write the Java code , you just need
> install a Check Style plugin[1].
> That will be helpful to let you know the error when you save the code.
> [1] http://eclipse-cs.sourceforge.net/update
>
> Willem
>
> Glen Mazza wrote:
> > Thanks...BTW, what do I need to do get the checkstyle errors
> > *before* I check in the files?  mvn checkstyle:checkstyle
> > none-too-helpfully tells me there are checkstyle errors, but won't
> > tell me what they are.
> >
> > Glen
> >
> > Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
> >> Author: dkulp
> >> Date: Wed Mar 26 19:26:43 2008
> >> New Revision: 641692
> >>
> >> URL: http://svn.apache.org/viewvc?rev=641692&view=rev
> >> Log:
> >> More fixes
> >>
> >> Modified:
> >>    
> >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> >>ers/IOUtils.java
> >>
> >> Modified:
> >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> >>ers/IOUtils.java URL:
> >> http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/
> >>main/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r
> >>2=641692&view=diff
> >> ===================================================================
> >>=========== ---
> >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> >>ers/IOUtils.java (original) +++
> >> incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/help
> >>ers/IOUtils.java Wed Mar 26 19:26:43 2008 @@ -36,7 +36,7 @@
> >>      }
> >>
> >>      public static int copy(final InputStream input, final
> >> OutputStream output) -            throws IOException {
> >> +        throws IOException {
> >>          return copy(input, output, DEFAULT_BUFFER_SIZE);
> >>      }
> >>
> >> @@ -95,7 +95,7 @@
> >>      }
> >>
> >>      public static String toString(final InputStream input, int
> >> bufferSize) -            throws IOException {
> >> +        throws IOException {
> >>
> >>          int avail = input.available();
> >>          if (avail > bufferSize) {
> >> @@ -129,7 +129,7 @@
> >>      }
> >>
> >>      public static String readStringFromStream(InputStream in)
> >> -            throws IOException {
> >> +        throws IOException {
> >>
> >>          StringBuilder sb = new StringBuilder(1024);
> >>
> >> @@ -151,7 +151,7 @@
> >>       * @throws IOException
> >>       */
> >>      public static ByteArrayInputStream loadIntoBAIS(InputStream
> >> in) -            throws IOException {
> >> +        throws IOException {
> >>          int i = in.available();
> >>          if (i < DEFAULT_BUFFER_SIZE) {
> >>              i = DEFAULT_BUFFER_SIZE;



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Posted by Glen Mazza <gl...@verizon.net>.
Thanks--I'll look into that.  

Glen

Am Donnerstag, den 27.03.2008, 10:51 +0800 schrieb Willem Jiang:
> Hi Glen,
> 
> If you are using Eclipse to write the Java code , you just need install 
> a Check Style plugin[1].
> That will be helpful to let you know the error when you save the code.
> [1] http://eclipse-cs.sourceforge.net/update
> 
> Willem
> 
> Glen Mazza wrote:
> > Thanks...BTW, what do I need to do get the checkstyle errors *before* I
> > check in the files?  mvn checkstyle:checkstyle none-too-helpfully tells
> > me there are checkstyle errors, but won't tell me what they are.
> >
> > Glen
> >
> >
> > Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
> >   
> >> Author: dkulp
> >> Date: Wed Mar 26 19:26:43 2008
> >> New Revision: 641692
> >>
> >> URL: http://svn.apache.org/viewvc?rev=641692&view=rev
> >> Log:
> >> More fixes
> >>
> >> Modified:
> >>     incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
> >>
> >> Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
> >> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r2=641692&view=diff
> >> ==============================================================================
> >> --- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java (original)
> >> +++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java Wed Mar 26 19:26:43 2008
> >> @@ -36,7 +36,7 @@
> >>      }
> >>  
> >>      public static int copy(final InputStream input, final OutputStream output)
> >> -            throws IOException {
> >> +        throws IOException {
> >>          return copy(input, output, DEFAULT_BUFFER_SIZE);
> >>      }
> >>  
> >> @@ -95,7 +95,7 @@
> >>      }
> >>  
> >>      public static String toString(final InputStream input, int bufferSize)
> >> -            throws IOException {
> >> +        throws IOException {
> >>  
> >>          int avail = input.available();
> >>          if (avail > bufferSize) {
> >> @@ -129,7 +129,7 @@
> >>      }
> >>  
> >>      public static String readStringFromStream(InputStream in)
> >> -            throws IOException {
> >> +        throws IOException {
> >>  
> >>          StringBuilder sb = new StringBuilder(1024);
> >>  
> >> @@ -151,7 +151,7 @@
> >>       * @throws IOException
> >>       */
> >>      public static ByteArrayInputStream loadIntoBAIS(InputStream in)
> >> -            throws IOException {
> >> +        throws IOException {
> >>          int i = in.available();
> >>          if (i < DEFAULT_BUFFER_SIZE) {
> >>              i = DEFAULT_BUFFER_SIZE;
> >>
> >>
> >>     
> >
> >
> >   
> 


Re: svn commit: r641692 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Posted by Willem Jiang <wi...@gmail.com>.
Hi Glen,

If you are using Eclipse to write the Java code , you just need install 
a Check Style plugin[1].
That will be helpful to let you know the error when you save the code.
[1] http://eclipse-cs.sourceforge.net/update

Willem

Glen Mazza wrote:
> Thanks...BTW, what do I need to do get the checkstyle errors *before* I
> check in the files?  mvn checkstyle:checkstyle none-too-helpfully tells
> me there are checkstyle errors, but won't tell me what they are.
>
> Glen
>
>
> Am Donnerstag, den 27.03.2008, 02:26 +0000 schrieb dkulp@apache.org:
>   
>> Author: dkulp
>> Date: Wed Mar 26 19:26:43 2008
>> New Revision: 641692
>>
>> URL: http://svn.apache.org/viewvc?rev=641692&view=rev
>> Log:
>> More fixes
>>
>> Modified:
>>     incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
>>
>> Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
>> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java?rev=641692&r1=641691&r2=641692&view=diff
>> ==============================================================================
>> --- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java (original)
>> +++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java Wed Mar 26 19:26:43 2008
>> @@ -36,7 +36,7 @@
>>      }
>>  
>>      public static int copy(final InputStream input, final OutputStream output)
>> -            throws IOException {
>> +        throws IOException {
>>          return copy(input, output, DEFAULT_BUFFER_SIZE);
>>      }
>>  
>> @@ -95,7 +95,7 @@
>>      }
>>  
>>      public static String toString(final InputStream input, int bufferSize)
>> -            throws IOException {
>> +        throws IOException {
>>  
>>          int avail = input.available();
>>          if (avail > bufferSize) {
>> @@ -129,7 +129,7 @@
>>      }
>>  
>>      public static String readStringFromStream(InputStream in)
>> -            throws IOException {
>> +        throws IOException {
>>  
>>          StringBuilder sb = new StringBuilder(1024);
>>  
>> @@ -151,7 +151,7 @@
>>       * @throws IOException
>>       */
>>      public static ByteArrayInputStream loadIntoBAIS(InputStream in)
>> -            throws IOException {
>> +        throws IOException {
>>          int i = in.available();
>>          if (i < DEFAULT_BUFFER_SIZE) {
>>              i = DEFAULT_BUFFER_SIZE;
>>
>>
>>     
>
>
>