EdColeman commented on code in PR #2569:
URL: https://github.com/apache/accumulo/pull/2569#discussion_r850781465


##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/PrepBulkImport.java:
##########
@@ -183,8 +183,14 @@ private void checkForMerge(final long tid, final Manager 
manager) throws Excepti
     VolumeManager fs = manager.getVolumeManager();
     final Path bulkDir = new Path(bulkInfo.sourceDir);
 
-    int maxTablets = 
Integer.parseInt(manager.getContext().getTableConfiguration(bulkInfo.tableId)
-        .get(Property.TABLE_BULK_MAX_TABLETS));
+    String value = manager.getContext().getTableConfiguration(bulkInfo.tableId)
+        .get(Property.TABLE_BULK_MAX_TABLETS);
+    if (value == null) {
+      throw new IllegalStateException("The property: " + 
Property.TABLE_BULK_MAX_TABLETS.getKey()

Review Comment:
   while the default value should always be present - with the current code, 
spotbugs does not seem convienced.
   ```
   [ERROR] Medium: Possible null pointer dereference in 
org.apache.accumulo.manager.tableOps.bulkVer2.PrepBulkImport.checkForMerge(long,
 Manager) due to return value of called method 
[org.apache.accumulo.manager.tableOps.bulkVer2.PrepBulkImport, 
org.apache.accumulo.manager.tableOps.bulkVer2.PrepBulkImport] Method invoked at 
PrepBulkImport.java:[line 189]Known null at PrepBulkImport.java:[line 187] 
NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
   ```



-- 
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]

Reply via email to