Dhairya-007 opened a new pull request, #29649:
URL: https://github.com/apache/camel/pull/29649

   `ObjectHelper.notNull(value, name)` and `StringHelper.notEmpty(value, name)`
   put `name` straight into the exception: *"name must be specified"*. In seven
   places that name is not the thing being checked, so the failure sends the 
user
   after the wrong option. One commit each.
   
   | Where | Says | Is |
   |---|---|---|
   | `ApplicationPkcs7MimeCompressedDataEntity` | `encryptedData` | 
`compressedData` |
   | `AS2ServerConnection` | `userAgent` | `originServer` |
   | `AbstractThrottler` | `maxConcurrentRequestsExpression` | 
`maxRequestsExpression` |
   | `MetricsComponent` | `MetricsRegistry` | `metricRegistry` |
   | `NettyHttpEndpoint` | `restricted` | `constraint` |
   | `ClusterRoleChangeListener` | `endpoint` | `jgroupsRaftClusterView` |
   | `DefaultPGPPassphraseAccessor` | `userIdPassphrase` | `userId2Passphrase` |
   
   ### How each was established
   
   - **camel-as2 compressed entity** is a copy of
     `ApplicationPkcs7MimeEnvelopedDataEntity`: both files have
     `notNull(..., "encryptedData")` and `new HttpException("Failed to create
     encrypted data")` on the *same line numbers*, and only the enveloped one
     deals with encrypted data. Both strings are corrected.
   - **camel-as2 server connection** — `userAgent` is `AS2ClientConnection`'s
     parameter in the same position. The server takes `originServer`, and its
     neighbouring checks all name their own parameter (`as2Version`,
     `serverFqdn`, `serverPortNumber`).
   - **AbstractThrottler** is the base extracted from
     `ConcurrentRequestsThrottler`, whose option was
     `maxConcurrentRequestsExpression`. The base's parameter is
     `maxRequestsExpression`, which `TotalRequestsThrottler` also uses.
   - **NettyHttpEndpoint** — `NettyHttpSecurityConfiguration` has no
     `restricted` property at all; the value checked is `getConstraint()` and
     the line above already names `getRealm()`'s property as `realm`.
   - **MetricsComponent** — the component option is `metricRegistry` and the
     type is Dropwizard's `MetricRegistry`; nothing is called `MetricsRegistry`.
   - **ClusterRoleChangeListener** and **DefaultPGPPassphraseAccessor** take a
     `JGroupsRaftClusterView` and a `userId2Passphrase` map; neither has an
     `endpoint` or a `userIdPassphrase`.
   
   Message strings only — no option name, signature or behaviour changes.
   
   ### Checked and left alone
   
   `camel-dns` builds its message as `"Header " + DnsConstants.DNS_NAME`, so it
   already names the header. The many cases where the literal is the 
*user-facing
   option* rather than the local variable — `path` vs `resourceUri` in the
   template components, `remaining` vs `channel` in pubnub, `given` vs `host` in
   rest-openapi, `sysId` vs `sys_id` in servicenow — are correct as they are, 
and
   are not touched.
   


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