You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2011/07/19 18:24:59 UTC

svn commit: r1148432 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Author: ay
Date: Tue Jul 19 16:24:58 2011
New Revision: 1148432

URL: http://svn.apache.org/viewvc?rev=1148432&view=rev
Log:
Merged revisions 1148257 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1148257 | ay | 2011-07-19 11:39:56 +0200 (Tue, 19 Jul 2011) | 1 line
  
  build fix for jaxrs/ext/codegen/SourceGenerator
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 19 16:24:58 2011
@@ -1 +1 @@
-/cxf/trunk:1144977,1145682,1146773,1147504,1148067,1148077
+/cxf/trunk:1144977,1145682,1146773,1147504,1148067,1148077,1148257

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1148432&r1=1148431&r2=1148432&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java (original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java Tue Jul 19 16:24:58 2011
@@ -583,7 +583,7 @@ public class SourceGenerator {
                 for (int i = 0; i < responseEls.size(); i++) {
                     String statusValue = responseEls.get(0).getAttribute("status");
                     try {
-                        int status = statusValue.isEmpty() ? 200 : Integer.valueOf(statusValue);
+                        int status = statusValue.length() == 0 ? 200 : Integer.valueOf(statusValue);
                         if (status == 200) {
                             okResponse = responseEls.get(i);
                             break;



Re: svn commit: r1148432 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Glen
>> @@ -583,7 +583,7 @@ public class SourceGenerator {
>>                   for (int i = 0; i<  responseEls.size(); i++) {
>>                       String statusValue = 
>> responseEls.get(0).getAttribute("status");
>>                       try {
>> -                        int status = statusValue.isEmpty() ? 200 : 
>> Integer.valueOf(statusValue);
>> +                        int status = statusValue.length() == 0 ? 200 
>> : Integer.valueOf(statusValue);
>
> Unsure of the need for this change, according to the JavaDoc, the 
> above two statements are equivalent:
> http://download.oracle.com/javase/6/docs/api/java/lang/String.html#isEmpty%28%29 
>
>

That was a fix for Java 5 compilation error, where String.length() does 
not exist

Cheers, Sergey

> Glen
>
>
>>                           if (status == 200) {
>>                               okResponse = responseEls.get(i);
>>                               break;
>>
>>
>
>


Re: svn commit: r1148432 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java

Posted by Glen Mazza <gm...@talend.com>.
On 07/19/2011 12:24 PM, ay@apache.org wrote:
> Author: ay
> Date: Tue Jul 19 16:24:58 2011
> New Revision: 1148432
>
> ........
>    r1148257 | ay | 2011-07-19 11:39:56 +0200 (Tue, 19 Jul 2011) | 1 line
>
>    build fix for jaxrs/ext/codegen/SourceGenerator
> ........
>
> Modified:
>      cxf/branches/2.4.x-fixes/   (props changed)
>      cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
>
> Propchange: cxf/branches/2.4.x-fixes/
> ------------------------------------------------------------------------------
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Tue Jul 19 16:24:58 2011
> @@ -1 +1 @@
> -/cxf/trunk:1144977,1145682,1146773,1147504,1148067,1148077
> +/cxf/trunk:1144977,1145682,1146773,1147504,1148067,1148077,1148257
>
> Propchange: cxf/branches/2.4.x-fixes/
> ------------------------------------------------------------------------------
> Binary property 'svnmerge-integrated' - no diff available.
>
> Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java
> URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java?rev=1148432&r1=1148431&r2=1148432&view=diff
> ==============================================================================
> --- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java (original)
> +++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/codegen/SourceGenerator.java Tue Jul 19 16:24:58 2011
> @@ -583,7 +583,7 @@ public class SourceGenerator {
>                   for (int i = 0; i<  responseEls.size(); i++) {
>                       String statusValue = responseEls.get(0).getAttribute("status");
>                       try {
> -                        int status = statusValue.isEmpty() ? 200 : Integer.valueOf(statusValue);
> +                        int status = statusValue.length() == 0 ? 200 : Integer.valueOf(statusValue);

Unsure of the need for this change, according to the JavaDoc, the above 
two statements are equivalent:
http://download.oracle.com/javase/6/docs/api/java/lang/String.html#isEmpty%28%29

Glen


>                           if (status == 200) {
>                               okResponse = responseEls.get(i);
>                               break;
>
>


-- 
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza