Re: svn commit: r1792484 - in /pivot/branches/2.0.x: core/test/org/apache/pivot/serialization/test/StringSerializerTest.java examples/src/org/apache/pivot/examples/scripting/README.txt wtk/src/org/apache/pivot/wtk/LocalManifest.java

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: svn commit: r1792484 - in /pivot/branches/2.0.x: core/test/org/apache/pivot/serialization/test/StringSerializerTest.java examples/src/org/apache/pivot/examples/scripting/README.txt wtk/src/org/apache/pivot/wtk/LocalManifest.java

Roger and Beth Whitcomb
I actually think that "((int)b[i]) & 0xFF" part was necessary in there,
even though Eclipse may not like it ..... The issue has to do with sign
extension from byte that I don't want for values > 127.....


~Roger


On 4/24/17 8:13 AM, [hidden email] wrote:

> Author: smartini
> Date: Mon Apr 24 15:13:16 2017
> New Revision: 1792484
>
> URL: http://svn.apache.org/viewvc?rev=1792484&view=rev
> Log:
> fix eclipse warnings and update formatting
>
> Modified:
>      pivot/branches/2.0.x/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java
>      pivot/branches/2.0.x/examples/src/org/apache/pivot/examples/scripting/README.txt
>      pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/LocalManifest.java
>
> Modified: pivot/branches/2.0.x/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java
> URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java?rev=1792484&r1=1792483&r2=1792484&view=diff
> ==============================================================================
> --- pivot/branches/2.0.x/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java (original)
> +++ pivot/branches/2.0.x/core/test/org/apache/pivot/serialization/test/StringSerializerTest.java Mon Apr 24 15:13:16 2017
> @@ -50,7 +50,7 @@ public class StringSerializerTest {
>           for (int i = 0; i < b.length; i++) {
>               if (i > 0)
>                   buf.append(',');
> -            int ib = ((int)b[i]) & 0xFF;
> +            int ib = b[i] & 0xFF;
>               String hex = Integer.toHexString(ib).toUpperCase();
>               if (hex.length() < 2)
>                   buf.append('0');
> @@ -84,7 +84,7 @@ public class StringSerializerTest {
>       @Test
>       public void writeValues() throws IOException, SerializationException {
>           log("writeValues()");
> -log("test string = \"" + testString + "\"");
> +        log("test string = \"" + testString + "\"");
>           // Note: assume the default Charset for StringSerializer is UTF-8, which we are using here
>           Serializer<String> serializer = new StringSerializer();
>  
>
> Modified: pivot/branches/2.0.x/examples/src/org/apache/pivot/examples/scripting/README.txt
> URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/examples/src/org/apache/pivot/examples/scripting/README.txt?rev=1792484&r1=1792483&r2=1792484&view=diff
> ==============================================================================
> --- pivot/branches/2.0.x/examples/src/org/apache/pivot/examples/scripting/README.txt (original)
> +++ pivot/branches/2.0.x/examples/src/org/apache/pivot/examples/scripting/README.txt Mon Apr 24 15:13:16 2017
> @@ -2,8 +2,11 @@
>   // README for org.apache.pivot.examples.scripting Samples
>   //
>  
> -In this package there are some Groovy sources and even some Scala sources, but in our ant builds they are not compiled.
> -To run those examples from an IDE (like Eclipse), you must enable support for those languages for the project containing them (examples).
> +In this package there are some Groovy sources and even some Scala sources,
> +but in our ant builds they are not compiled.
> +To run those examples from an IDE (like Eclipse), you must enable support for those languages
> +for the project containing them (examples).
>  
> -Note that in case of problems, for example a configured Nature for that project but the related Plugin is not installed,
> -it will not be possible to run even Java examples because nothing in that project will be compiled.
> +Note that in case of problems, for example a configured Nature for that project
> +but the related Plugin is not installed, it will not be possible to run even Java examples
> +because nothing in that project will be compiled.
>
> Modified: pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/LocalManifest.java
> URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/LocalManifest.java?rev=1792484&r1=1792483&r2=1792484&view=diff
> ==============================================================================
> --- pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/LocalManifest.java (original)
> +++ pivot/branches/2.0.x/wtk/src/org/apache/pivot/wtk/LocalManifest.java Mon Apr 24 15:13:16 2017
> @@ -16,16 +16,9 @@
>    */
>   package org.apache.pivot.wtk;
>  
> -import java.awt.datatransfer.DataFlavor;
> -import java.awt.datatransfer.Transferable;
> -import java.awt.datatransfer.UnsupportedFlavorException;
> -import java.io.File;
> -
> -import org.apache.pivot.collections.ArrayList;
>   import org.apache.pivot.collections.HashMap;
>   import org.apache.pivot.io.FileList;
>   import org.apache.pivot.wtk.media.Image;
> -import org.apache.pivot.wtk.media.Picture;
>  
>   /**
>    * Manifest class that serves as data source for a clipboard or drag/drop
>
>
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: svn commit: r1792484 - in /pivot/branches/2.0.x: core/test/org/apache/pivot/serialization/test/StringSerializerTest.java examples/src/org/apache/pivot/examples/scripting/README.txt wtk/src/org/apache/pivot/wtk/LocalManifest.java

Sandro Martini
Uh sorry, I did some tests and all seems to work the same ... anyway I
revert this, no problem :-) .


2017-04-24 17:29 GMT+02:00 Roger and Beth Whitcomb
<[hidden email]>:
> I actually think that "((int)b[i]) & 0xFF" part was necessary in there, even
> though Eclipse may not like it ..... The issue has to do with sign extension
> from byte that I don't want for values > 127.....
>
>
> ~Roger
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: svn commit: r1792484 - in /pivot/branches/2.0.x: core/test/org/apache/pivot/serialization/test/StringSerializerTest.java examples/src/org/apache/pivot/examples/scripting/README.txt wtk/src/org/apache/pivot/wtk/LocalManifest.java

Sandro Martini
I just remember now that it's a JUnit test class
(StringSerializerTest.java) so maybe could be save even with that
change, ok ?
I run it and seems to work.

Bye


2017-04-24 17:32 GMT+02:00 Sandro Martini <[hidden email]>:

> Uh sorry, I did some tests and all seems to work the same ... anyway I
> revert this, no problem :-) .
>
>
> 2017-04-24 17:29 GMT+02:00 Roger and Beth Whitcomb
> <[hidden email]>:
>> I actually think that "((int)b[i]) & 0xFF" part was necessary in there, even
>> though Eclipse may not like it ..... The issue has to do with sign extension
>> from byte that I don't want for values > 127.....
>>
>>
>> ~Roger
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: svn commit: r1792484 - in /pivot/branches/2.0.x: core/test/org/apache/pivot/serialization/test/StringSerializerTest.java examples/src/org/apache/pivot/examples/scripting/README.txt wtk/src/org/apache/pivot/wtk/LocalManifest.java

Roger and Beth Whitcomb
Yes, I ran the tests again, and everything was okay .... I just remember
having problems when I first changed the code, but ...

Thanks,

~Roger

On 4/24/17 8:33 AM, Sandro Martini wrote:

> I just remember now that it's a JUnit test class
> (StringSerializerTest.java) so maybe could be save even with that
> change, ok ?
> I run it and seems to work.
>
> Bye
>
>
> 2017-04-24 17:32 GMT+02:00 Sandro Martini <[hidden email]>:
>> Uh sorry, I did some tests and all seems to work the same ... anyway I
>> revert this, no problem :-) .
>>
>>
>> 2017-04-24 17:29 GMT+02:00 Roger and Beth Whitcomb
>> <[hidden email]>:
>>> I actually think that "((int)b[i]) & 0xFF" part was necessary in there, even
>>> though Eclipse may not like it ..... The issue has to do with sign extension
>>> from byte that I don't want for values > 127.....
>>>
>>>
>>> ~Roger
>

Loading...