You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "dk2k (via GitHub)" <gi...@apache.org> on 2023/08/29 10:54:29 UTC

[GitHub] [camel] dk2k opened a new pull request, #11229: CAMEL-19731 AS2: Fixed null pointer exception

dk2k opened a new pull request, #11229:
URL: https://github.com/apache/camel/pull/11229

   ... when request's header dispositionNotificationTo isn't set
   
   Added a unit test for this case. The existing tests are green
   
   


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] davsclaus merged pull request #11229: CAMEL-19731 AS2: Fixed null pointer exception

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #11229:
URL: https://github.com/apache/camel/pull/11229


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] github-actions[bot] commented on pull request #11229: CAMEL-19731 AS2: Fixed null pointer exception

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11229:
URL: https://github.com/apache/camel/pull/11229#issuecomment-1697214011

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :camel: Maintainers, please note that first-time contributors *require manual approval* for the GitHub Actions to run.
   
   :warning: Please note that the changes on this PR may be **tested automatically** if they change components.
   
   :robot: Use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] essobedo commented on a diff in pull request #11229: CAMEL-19731 AS2: Fixed null pointer exception

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on code in PR #11229:
URL: https://github.com/apache/camel/pull/11229#discussion_r1308650011


##########
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java:
##########
@@ -444,52 +444,56 @@ public static void parseAS2MessageEntity(HttpMessage message) throws HttpExcepti
             try {
                 // Determine Content Type of Message
                 String contentTypeStr = HttpMessageUtils.getHeaderValue(message, AS2Header.CONTENT_TYPE);
-                ContentType contentType = ContentType.parse(contentTypeStr);
-
-                // Determine Charset
-                String charsetName = StandardCharsets.US_ASCII.name();
-                Charset charset = contentType.getCharset();
-                if (charset != null) {
-                    charsetName = charset.name();
-                }
+                if (contentTypeStr != null) {

Review Comment:
   Will it work too if we simply add `if (contentTypeStr == null) { return; }`?



-- 
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: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel] dk2k commented on a diff in pull request #11229: CAMEL-19731 AS2: Fixed null pointer exception

Posted by "dk2k (via GitHub)" <gi...@apache.org>.
dk2k commented on code in PR #11229:
URL: https://github.com/apache/camel/pull/11229#discussion_r1308758281


##########
components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/entity/EntityParser.java:
##########
@@ -444,52 +444,56 @@ public static void parseAS2MessageEntity(HttpMessage message) throws HttpExcepti
             try {
                 // Determine Content Type of Message
                 String contentTypeStr = HttpMessageUtils.getHeaderValue(message, AS2Header.CONTENT_TYPE);
-                ContentType contentType = ContentType.parse(contentTypeStr);
-
-                // Determine Charset
-                String charsetName = StandardCharsets.US_ASCII.name();
-                Charset charset = contentType.getCharset();
-                if (charset != null) {
-                    charsetName = charset.name();
-                }
+                if (contentTypeStr != null) {

Review Comment:
   it works, I will add a commit with this change



-- 
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: commits-unsubscribe@camel.apache.org

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