sonatype-lift[bot] commented on a change in pull request #598:
URL: https://github.com/apache/solr/pull/598#discussion_r800421624
##########
File path:
solr/contrib/analytics/src/java/org/apache/solr/handler/component/AnalyticsComponent.java
##########
@@ -109,7 +108,7 @@ public int distributedProcess(ResponseBuilder rb) throws
IOException {
// Send out a request to each shard and merge the responses into our
AnalyticsRequestManager
reqManager.shardStream.sendRequests(rb.req.getCore().getCoreDescriptor().getCollectionName(),
-
rb.req.getCore().getCoreContainer().getZkController().getZkServerAddress());
+ rb.req.getCoreContainer().getZkController().getZkServerAddress());
Review comment:
*NULL_DEREFERENCE:* object returned by `rb.req.getCoreContainer()`
could be null and is dereferenced at line 111.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/contrib/ltr/src/java/org/apache/solr/ltr/response/transform/LTRFeatureLoggerTransformerFactory.java
##########
@@ -216,7 +210,7 @@ public void setContext(ResultContext context) {
}
leafContexts = searcher.getTopReaderContext().leaves();
if (threadManager != null) {
-
threadManager.setExecutor(context.getRequest().getCore().getCoreContainer().getUpdateShardHandler().getUpdateExecutor());
+
threadManager.setExecutor(context.getRequest().getCoreContainer().getUpdateShardHandler().getUpdateExecutor());
Review comment:
*NULL_DEREFERENCE:* object returned by
`context.getRequest().getCoreContainer()` could be null and is dereferenced at
line 213.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/cloud/api/collections/CategoryRoutedAlias.java
##########
@@ -225,7 +220,7 @@ public String computeInitialCollectionName() {
public CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd) {
Object value = cmd.getSolrInputDocument().getFieldValue(getRouteField());
String targetColName = buildCollectionNameFromValue(String.valueOf(value));
- ZkStateReader zkStateReader =
cmd.getReq().getCore().getCoreContainer().getZkController().zkStateReader;
+ ZkStateReader zkStateReader =
cmd.getReq().getCoreContainer().getZkController().zkStateReader;
Review comment:
*NULL_DEREFERENCE:* object returned by
`cmd.getReq().getCoreContainer()` could be null and is dereferenced at line 223.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/cloud/api/collections/CategoryRoutedAlias.java
##########
@@ -121,7 +116,7 @@ public RoutedAliasTypes getRoutedAliasType() {
@Override
public void validateRouteValue(AddUpdateCommand cmd) throws SolrException {
if (this.aliases == null) {
-
updateParsedCollectionAliases(cmd.getReq().getCore().getCoreContainer().getZkController().zkStateReader,
false);
+
updateParsedCollectionAliases(cmd.getReq().getCoreContainer().getZkController().zkStateReader,
false);
Review comment:
*NULL_DEREFERENCE:* object returned by
`cmd.getReq().getCoreContainer()` could be null and is dereferenced at line 119.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/cloud/api/collections/TimeRoutedAlias.java
##########
@@ -449,7 +437,7 @@ private Instant parseRouteKey(Object routeKey) {
@Override
public CandidateCollection findCandidateGivenValue(AddUpdateCommand cmd) {
Object value = cmd.getSolrInputDocument().getFieldValue(getRouteField());
- ZkStateReader zkStateReader =
cmd.getReq().getCore().getCoreContainer().getZkController().zkStateReader;
+ ZkStateReader zkStateReader =
cmd.getReq().getCoreContainer().getZkController().zkStateReader;
Review comment:
*NULL_DEREFERENCE:* object returned by
`cmd.getReq().getCoreContainer()` could be null and is dereferenced at line 440.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
##########
@@ -138,7 +133,7 @@ public void init(NamedList<?> args) {
public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)
throws InterruptedException, KeeperException, IOException {
- CoreContainer coreContainer = req.getCore().getCoreContainer();
+ CoreContainer coreContainer = req.getCoreContainer();
if (coreContainer.isZooKeeperAware()) {
Review comment:
*NULL_DEREFERENCE:* object `coreContainer` last assigned on line 136
could be null and is dereferenced at line 137.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
##########
@@ -131,7 +130,7 @@ public void handleRequestBody(SolrQueryRequest req,
SolrQueryResponse rsp) throw
addMBean(req, cats, requestedKeys, entry.getKey(),entry.getValue());
}
- for (SolrInfoBean infoMBean :
req.getCore().getCoreContainer().getResourceLoader().getInfoMBeans()) {
+ for (SolrInfoBean infoMBean :
req.getCoreContainer().getResourceLoader().getInfoMBeans()) {
Review comment:
*NULL_DEREFERENCE:* object returned by `req.getCoreContainer()` could
be null and is dereferenced at line 133.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/handler/component/HttpShardHandler.java
##########
@@ -263,11 +262,11 @@ public void prepDistributed(ResponseBuilder rb) {
CoreDescriptor coreDescriptor = req.getCore().getCoreDescriptor();
CloudDescriptor cloudDescriptor = coreDescriptor.getCloudDescriptor();
- ZkController zkController =
req.getCore().getCoreContainer().getZkController();
+ ZkController zkController = req.getCoreContainer().getZkController();
Review comment:
*NULL_DEREFERENCE:* object returned by `req.getCoreContainer()` could
be null and is dereferenced at line 265.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path: solr/core/src/java/org/apache/solr/request/SimpleFacets.java
##########
@@ -167,7 +125,7 @@ public SimpleFacets(SolrQueryRequest req,
this.docsOrig = docs;
this.global = params;
this.rb = rb;
- this.facetExecutor =
req.getCore().getCoreContainer().getUpdateShardHandler().getUpdateExecutor();
+ this.facetExecutor =
req.getCoreContainer().getUpdateShardHandler().getUpdateExecutor();
Review comment:
*NULL_DEREFERENCE:* object returned by `req.getCoreContainer()` could
be null and is dereferenced at line 128.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -137,7 +136,7 @@ JoinParams parseJoin(QParser qparser) throws SyntaxError {
long fromCoreOpenTime = 0;
if (fromIndex != null &&
!fromIndex.equals(qparser.req.getCore().getCoreDescriptor().getName()) ) {
- CoreContainer container = qparser.req.getCore().getCoreContainer();
+ CoreContainer container = qparser.req.getCoreContainer();
// if in SolrCloud mode, fromIndex should be the name of a
single-sharded collection
coreName = ScoreJoinQParserPlugin.getCoreName(fromIndex, container);
Review comment:
*NULL_DEREFERENCE:* object `container` last assigned on line 139 could
be null and is dereferenced by call to `getCoreName(...)` at line 142.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/AtomicUpdateDocumentMerger.java
##########
@@ -320,11 +309,10 @@ public static boolean
isSupportedFieldForInPlaceUpdate(SchemaField schemaField)
private static String getRouteField(AddUpdateCommand cmd) {
String result = null;
- SolrCore core = cmd.getReq().getCore();
- CloudDescriptor cloudDescriptor =
core.getCoreDescriptor().getCloudDescriptor();
+ CloudDescriptor cloudDescriptor = cmd.getReq().getCloudDescriptor();
if (cloudDescriptor != null) {
String collectionName = cloudDescriptor.getCollectionName();
- ZkController zkController = core.getCoreContainer().getZkController();
+ ZkController zkController =
cmd.getReq().getCoreContainer().getZkController();
Review comment:
*NULL_DEREFERENCE:* object returned by
`cmd.getReq().getCoreContainer()` could be null and is dereferenced at line 315.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
##########
@@ -631,7 +618,7 @@ private long doWaitForDependentUpdates(AddUpdateCommand
cmd, long versionOnUpdat
*/
private UpdateCommand fetchFullUpdateFromLeader(AddUpdateCommand inplaceAdd,
long versionOnUpdate) throws IOException {
String id = inplaceAdd.getIndexedIdStr();
- UpdateShardHandler updateShardHandler =
inplaceAdd.getReq().getCore().getCoreContainer().getUpdateShardHandler();
+ UpdateShardHandler updateShardHandler =
inplaceAdd.getReq().getCoreContainer().getUpdateShardHandler();
Review comment:
*NULL_DEREFERENCE:* object returned by
`inplaceAdd.getReq().getCoreContainer()` could be null and is dereferenced at
line 621.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessorFactory.java
##########
@@ -50,7 +49,7 @@ public static void
addParamToDistributedRequestWhitelist(final SolrQueryRequest
public UpdateRequestProcessor getInstance(SolrQueryRequest req,
SolrQueryResponse rsp, UpdateRequestProcessor next) {
- final boolean isZkAware =
req.getCore().getCoreContainer().isZooKeeperAware();
+ final boolean isZkAware = req.getCoreContainer().isZooKeeperAware();
Review comment:
*NULL_DEREFERENCE:* object returned by `req.getCoreContainer()` could
be null and is dereferenced at line 52.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
##########
@@ -111,8 +81,8 @@
public DistributedZkUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next) {
super(req, rsp, next);
- CoreContainer cc = req.getCore().getCoreContainer();
- cloudDesc = req.getCore().getCoreDescriptor().getCloudDescriptor();
+ CoreContainer cc = req.getCoreContainer();
+ cloudDesc = req.getCloudDescriptor();
zkController = cc.getZkController();
Review comment:
*NULL_DEREFERENCE:* object `cc` last assigned on line 84 could be null
and is dereferenced at line 86.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
##########
@@ -1246,7 +1216,7 @@ private void zkCheck() {
// Streaming updates can delay shutdown and cause big update reorderings
(new streams can't be
// initiated, but existing streams carry on). This is why we check if the
CC is shutdown.
// See SOLR-8203 and loop HdfsChaosMonkeyNothingIsSafeTest (and check for
inconsistent shards) to test.
- if (req.getCore().getCoreContainer().isShutDown()) {
+ if (req.getCoreContainer().isShutDown()) {
Review comment:
*NULL_DEREFERENCE:* object returned by
`DistributedUpdateProcessor.req.getCoreContainer()` could be null and is
dereferenced at line 1219.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/RoutedAliasUpdateProcessor.java
##########
@@ -141,8 +135,8 @@ private RoutedAliasUpdateProcessor(SolrQueryRequest req,
UpdateRequestProcessor
this.routedAlias = routedAlias;
assert aliasDistribPhase == DistribPhase.NONE;
final SolrCore core = req.getCore();
- final CoreContainer cc = core.getCoreContainer();
- this.thisCollection =
core.getCoreDescriptor().getCloudDescriptor().getCollectionName();
+ final CoreContainer cc = req.getCoreContainer();
+ this.thisCollection = req.getCloudDescriptor().getCollectionName();
this.req = req;
this.zkController = cc.getZkController();
Review comment:
*NULL_DEREFERENCE:* object `cc` last assigned on line 138 could be null
and is dereferenced at line 141.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/RoutedAliasUpdateProcessor.java
##########
@@ -127,7 +121,7 @@ public static UpdateRequestProcessor wrap(SolrQueryRequest
req, UpdateRequestPro
}
private static Map<String, String> getAliasProps(SolrQueryRequest req,
String aliasName) {
- ZkController zkController =
req.getCore().getCoreContainer().getZkController();
+ ZkController zkController = req.getCoreContainer().getZkController();
Review comment:
*NULL_DEREFERENCE:* object returned by `req.getCoreContainer()` could
be null and is dereferenced at line 124.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/RoutedAliasUpdateProcessor.java
##########
@@ -96,7 +90,7 @@ public static UpdateRequestProcessor wrap(SolrQueryRequest
req, UpdateRequestPro
CloudDescriptor cloudDescriptor = coreDescriptor.getCloudDescriptor();
if (cloudDescriptor != null) {
String collectionName = cloudDescriptor.getCollectionName();
- CoreContainer coreContainer = core.getCoreContainer();
+ CoreContainer coreContainer = req.getCoreContainer();
ZkController zkController = coreContainer.getZkController();
Review comment:
*NULL_DEREFERENCE:* object `coreContainer` last assigned on line 93
could be null and is dereferenced at line 94.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
##########
File path:
solr/core/src/java/org/apache/solr/update/processor/TolerantUpdateProcessor.java
##########
@@ -134,7 +128,7 @@ public TolerantUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp, Upda
this.distribPhase = distribPhase;
assert ! DistribPhase.FROMLEADER.equals(distribPhase);
- this.zkController =
this.req.getCore().getCoreContainer().getZkController();
+ this.zkController = this.req.getCoreContainer().getZkController();
Review comment:
*NULL_DEREFERENCE:* object returned by
`TolerantUpdateProcessor.req.getCoreContainer()` could be null and is
dereferenced at line 131.
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with
`help` or `ignore`)
--
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]