You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <ki...@gmail.com> on 2016/11/02 20:07:45 UTC

Review Request 53402: GEODE-2013: throw IllegalStateException if resource type is missing

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

Review request for geode, Anthony Baker, Darrel Schneider, Jinmei Liao, Jared Stewart, and Kevin Duling.


Bugs: GEODE-2013
    https://issues.apache.org/jira/browse/GEODE-2013


Repository: geode


Description
-------

GEODE-2013: throw IllegalStateException if resource type is missing

The StatArchiveReader was throwing NullPointerException if it found a Resource without a ResourceType. Now it throws IllegalStateException with a message explaining that no ResourceType for the specified resourceTypeId could be found.


Diffs
-----

  geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ca1a6c49269a56600191ac7b0551670ffb0f2c82 
  geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java PRE-CREATION 
  geode-core/src/test/resources/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.gfs PRE-CREATION 

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


Testing
-------

StatArchiveWithMissingResourceTypeRegressionTest
precheckin


Thanks,

Kirk Lund


Re: Review Request 53402: GEODE-2013: throw IllegalStateException if resource type is missing

Posted by Kirk Lund <ki...@gmail.com>.

> On Nov. 2, 2016, 8:26 p.m., Kevin Duling wrote:
> > What is the possibility of an ArrayIndexOutOfBoundsException on that assignment?

The ArrayIndexOutOfBoundsException message already contains the resourceTypeId because the array position is the type id. Still, it's a good idea and I'll add this to do when I overhaul these classes a bit more.


- Kirk


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


On Nov. 2, 2016, 8:07 p.m., Kirk Lund wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53402/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2016, 8:07 p.m.)
> 
> 
> Review request for geode, Anthony Baker, Darrel Schneider, Jinmei Liao, Jared Stewart, and Kevin Duling.
> 
> 
> Bugs: GEODE-2013
>     https://issues.apache.org/jira/browse/GEODE-2013
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-2013: throw IllegalStateException if resource type is missing
> 
> The StatArchiveReader was throwing NullPointerException if it found a Resource without a ResourceType. Now it throws IllegalStateException with a message explaining that no ResourceType for the specified resourceTypeId could be found.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ca1a6c49269a56600191ac7b0551670ffb0f2c82 
>   geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java PRE-CREATION 
>   geode-core/src/test/resources/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.gfs PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53402/diff/
> 
> 
> Testing
> -------
> 
> StatArchiveWithMissingResourceTypeRegressionTest
> precheckin
> 
> 
> Thanks,
> 
> Kirk Lund
> 
>


Re: Review Request 53402: GEODE-2013: throw IllegalStateException if resource type is missing

Posted by Kevin Duling <kd...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53402/#review154628
-----------------------------------------------------------



What is the possibility of an ArrayIndexOutOfBoundsException on that assignment?

- Kevin Duling


On Nov. 2, 2016, 1:07 p.m., Kirk Lund wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53402/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2016, 1:07 p.m.)
> 
> 
> Review request for geode, Anthony Baker, Darrel Schneider, Jinmei Liao, Jared Stewart, and Kevin Duling.
> 
> 
> Bugs: GEODE-2013
>     https://issues.apache.org/jira/browse/GEODE-2013
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-2013: throw IllegalStateException if resource type is missing
> 
> The StatArchiveReader was throwing NullPointerException if it found a Resource without a ResourceType. Now it throws IllegalStateException with a message explaining that no ResourceType for the specified resourceTypeId could be found.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ca1a6c49269a56600191ac7b0551670ffb0f2c82 
>   geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java PRE-CREATION 
>   geode-core/src/test/resources/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.gfs PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53402/diff/
> 
> 
> Testing
> -------
> 
> StatArchiveWithMissingResourceTypeRegressionTest
> precheckin
> 
> 
> Thanks,
> 
> Kirk Lund
> 
>


Re: Review Request 53402: GEODE-2013: throw IllegalStateException if resource type is missing

Posted by Darrel Schneider <ds...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53402/#review154635
-----------------------------------------------------------


Ship it!




Ship It!

- Darrel Schneider


On Nov. 2, 2016, 1:07 p.m., Kirk Lund wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53402/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2016, 1:07 p.m.)
> 
> 
> Review request for geode, Anthony Baker, Darrel Schneider, Jinmei Liao, Jared Stewart, and Kevin Duling.
> 
> 
> Bugs: GEODE-2013
>     https://issues.apache.org/jira/browse/GEODE-2013
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-2013: throw IllegalStateException if resource type is missing
> 
> The StatArchiveReader was throwing NullPointerException if it found a Resource without a ResourceType. Now it throws IllegalStateException with a message explaining that no ResourceType for the specified resourceTypeId could be found.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ca1a6c49269a56600191ac7b0551670ffb0f2c82 
>   geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java PRE-CREATION 
>   geode-core/src/test/resources/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.gfs PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53402/diff/
> 
> 
> Testing
> -------
> 
> StatArchiveWithMissingResourceTypeRegressionTest
> precheckin
> 
> 
> Thanks,
> 
> Kirk Lund
> 
>


Re: Review Request 53402: GEODE-2013: throw IllegalStateException if resource type is missing

Posted by Jinmei Liao <ji...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53402/#review154629
-----------------------------------------------------------


Ship it!




Ship It!

- Jinmei Liao


On Nov. 2, 2016, 8:07 p.m., Kirk Lund wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53402/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2016, 8:07 p.m.)
> 
> 
> Review request for geode, Anthony Baker, Darrel Schneider, Jinmei Liao, Jared Stewart, and Kevin Duling.
> 
> 
> Bugs: GEODE-2013
>     https://issues.apache.org/jira/browse/GEODE-2013
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> GEODE-2013: throw IllegalStateException if resource type is missing
> 
> The StatArchiveReader was throwing NullPointerException if it found a Resource without a ResourceType. Now it throws IllegalStateException with a message explaining that no ResourceType for the specified resourceTypeId could be found.
> 
> 
> Diffs
> -----
> 
>   geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveReader.java ca1a6c49269a56600191ac7b0551670ffb0f2c82 
>   geode-core/src/test/java/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.java PRE-CREATION 
>   geode-core/src/test/resources/org/apache/geode/internal/statistics/StatArchiveWithMissingResourceTypeRegressionTest.gfs PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53402/diff/
> 
> 
> Testing
> -------
> 
> StatArchiveWithMissingResourceTypeRegressionTest
> precheckin
> 
> 
> Thanks,
> 
> Kirk Lund
> 
>