You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Anthony Baker <ab...@apache.org> on 2015/08/22 18:01:55 UTC

Review Request 37702: GEODE-264: Fix varargs compiler warnings

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/
-----------------------------------------------------------

Review request for geode and Kirk Lund.


Repository: geode


Description
-------

Add casts where needed so that invoke(null, null) is now
invoke(null, (Ojbect[]) null).


Diffs
-----

  gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
  gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 

Diff: https://reviews.apache.org/r/37702/diff/


Testing
-------


Thanks,

Anthony Baker


Re: Review Request 37702: GEODE-264: Fix varargs compiler warnings

Posted by Kirk Lund <ki...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/#review97333
-----------------------------------------------------------

Ship it!


Ship It!

- Kirk Lund


On Aug. 22, 2015, 4:03 p.m., Anthony Baker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37702/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2015, 4:03 p.m.)
> 
> 
> Review request for geode and Kirk Lund.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Add casts where needed so that invoke(null, null) is now
> invoke(null, (Ojbect[]) null).
> 
> 
> Diffs
> -----
> 
>   gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
>   gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 
> 
> Diff: https://reviews.apache.org/r/37702/diff/
> 
> 
> Testing
> -------
> 
> Ran SnappyCompressorJUnitTest and a DUnit test.
> 
> 
> Thanks,
> 
> Anthony Baker
> 
>


Re: Review Request 37702: GEODE-264: Fix varargs compiler warnings

Posted by Anthony Baker <ab...@apache.org>.

> On Aug. 22, 2015, 4:39 p.m., Jacob Barrett wrote:
> > You can leave off the vararg argument completely as well. The null will be implied.
> > ```java
> > method.invoke(null);
> > ```
> > is the same as
> > ```java
> > method.invoke(null, (Object[]) null);
> > ```
> > but in my opinion a little more readable.

The JLS (http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.4.2) notes that the above forms will actually be different--either a null array or an array containing a null element.  In this case it shouldn't matter.


- Anthony


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/#review96120
-----------------------------------------------------------


On Aug. 22, 2015, 4:03 p.m., Anthony Baker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37702/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2015, 4:03 p.m.)
> 
> 
> Review request for geode and Kirk Lund.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Add casts where needed so that invoke(null, null) is now
> invoke(null, (Ojbect[]) null).
> 
> 
> Diffs
> -----
> 
>   gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
>   gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 
> 
> Diff: https://reviews.apache.org/r/37702/diff/
> 
> 
> Testing
> -------
> 
> Ran SnappyCompressorJUnitTest and a DUnit test.
> 
> 
> Thanks,
> 
> Anthony Baker
> 
>


Re: Review Request 37702: GEODE-264: Fix varargs compiler warnings

Posted by Jacob Barrett <jb...@amduat.net>.

> On Aug. 22, 2015, 9:39 a.m., Jacob Barrett wrote:
> > You can leave off the vararg argument completely as well. The null will be implied.
> > ```java
> > method.invoke(null);
> > ```
> > is the same as
> > ```java
> > method.invoke(null, (Object[]) null);
> > ```
> > but in my opinion a little more readable.
> 
> Anthony Baker wrote:
>     The JLS (http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.4.2) notes that the above forms will actually be different--either a null array or an array containing a null element.  In this case it shouldn't matter.

Ok, great distinction. Thanks.


- Jacob


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/#review96120
-----------------------------------------------------------


On Aug. 22, 2015, 9:03 a.m., Anthony Baker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37702/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2015, 9:03 a.m.)
> 
> 
> Review request for geode and Kirk Lund.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Add casts where needed so that invoke(null, null) is now
> invoke(null, (Ojbect[]) null).
> 
> 
> Diffs
> -----
> 
>   gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
>   gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 
> 
> Diff: https://reviews.apache.org/r/37702/diff/
> 
> 
> Testing
> -------
> 
> Ran SnappyCompressorJUnitTest and a DUnit test.
> 
> 
> Thanks,
> 
> Anthony Baker
> 
>


Re: Review Request 37702: GEODE-264: Fix varargs compiler warnings

Posted by Jacob Barrett <jb...@amduat.net>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/#review96120
-----------------------------------------------------------


You can leave off the vararg argument completely as well. The null will be implied.
```java
method.invoke(null);
```
is the same as
```java
method.invoke(null, (Object[]) null);
```
but in my opinion a little more readable.

- Jacob Barrett


On Aug. 22, 2015, 9:03 a.m., Anthony Baker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37702/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2015, 9:03 a.m.)
> 
> 
> Review request for geode and Kirk Lund.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Add casts where needed so that invoke(null, null) is now
> invoke(null, (Ojbect[]) null).
> 
> 
> Diffs
> -----
> 
>   gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
>   gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 
> 
> Diff: https://reviews.apache.org/r/37702/diff/
> 
> 
> Testing
> -------
> 
> Ran SnappyCompressorJUnitTest and a DUnit test.
> 
> 
> Thanks,
> 
> Anthony Baker
> 
>


Re: Review Request 37702: GEODE-264: Fix varargs compiler warnings

Posted by Anthony Baker <ab...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37702/
-----------------------------------------------------------

(Updated Aug. 22, 2015, 4:03 p.m.)


Review request for geode and Kirk Lund.


Repository: geode


Description
-------

Add casts where needed so that invoke(null, null) is now
invoke(null, (Ojbect[]) null).


Diffs
-----

  gemfire-core/src/test/java/com/gemstone/gemfire/internal/compression/SnappyCompressorJUnitTest.java 56d647af99178bdb71f6969277cfe3c3f6769ea9 
  gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java 0f2eebcfc4e17501038f4e5300ea653ebc904b4d 

Diff: https://reviews.apache.org/r/37702/diff/


Testing (updated)
-------

Ran SnappyCompressorJUnitTest and a DUnit test.


Thanks,

Anthony Baker