pivotal-jbarrett commented on code in PR #7569:
URL: https://github.com/apache/geode/pull/7569#discussion_r846322418


##########
geode-core/src/main/java/org/apache/geode/internal/cache/versions/DiskVersionTag.java:
##########
@@ -44,7 +44,7 @@ public void setMemberID(DiskStoreID memberID) {
   @Override
   public void replaceNullIDs(VersionSource memberID) {
     if (getMemberID() == null) {
-      throw new AssertionError("Member id should not be null for persistent 
version tags");
+      throw new IllegalStateException("Member id should not be null for 
persistent version tags");

Review Comment:
   Conservation of well defined strongly named `Exception` classes is an 
anti-pattern. It cost us nothing to create new exceptions but cost us dearly if 
we don't. See [GEODE-10066](https://issues.apache.org/jira/browse/GEODE-10066) 
for a really good example of how throwing the inappropriate unchecked exception 
can cause all sorts of ugly.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to