jacek-lewandowski commented on a change in pull request #1276:
URL: https://github.com/apache/cassandra/pull/1276#discussion_r767637542
##########
File path: src/java/org/apache/cassandra/io/sstable/Descriptor.java
##########
@@ -260,14 +263,14 @@ public static Descriptor fromFilename(File file)
if (!Version.validate(versionString))
throw invalidSSTable(name, "invalid version %s", versionString);
- int generation;
+ SSTableUniqueIdentifier generation;
try
{
- generation = Integer.parseInt(tokens.get(1));
+ generation =
SSTableUniqueIdentifierFactory.instance.fromString(tokens.get(1));
}
- catch (NumberFormatException e)
+ catch (RuntimeException e)
Review comment:
well, there is no way to enforce that IAE will be the only possible
exception thrown by that method. I think we should interpret all runtime
exceptions the same way and provide the appropriate message when re-throwing
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]