Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-6445

Fix NullPointerException in CEP pattern without condition

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0
    • Component/s: CEP
    • Labels:
      None

      Issue Links

        Activity

        Hide
        kkl0u Kostas Kloudas added a comment - - edited

        Currently a pattern like: Pattern.<Event>begin("st").followedBy("end"); will throw an NPE. Because a null condition with a skip-till-next continuity will be wrapped into a NOT condition which will then try to call filter() on the null condition.

        Show
        kkl0u Kostas Kloudas added a comment - - edited Currently a pattern like: Pattern.<Event>begin("st").followedBy("end"); will throw an NPE . Because a null condition with a skip-till-next continuity will be wrapped into a NOT condition which will then try to call filter() on the null condition.
        Hide
        githubbot ASF GitHub Bot added a comment -

        GitHub user kl0u opened a pull request:

        https://github.com/apache/flink/pull/3825

        FLINK-6445 [cep] Fix NPE in no-condition patterns.

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/kl0u/flink cep-null-filter

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/flink/pull/3825.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #3825


        commit f94db9bf53b242b5473dde46fc9218a61fa2ce3f
        Author: kl0u <kkloudas@gmail.com>
        Date: 2017-05-04T13:33:40Z

        FLINK-6445 [cep] Fix NPE in no-condition patterns.


        Show
        githubbot ASF GitHub Bot added a comment - GitHub user kl0u opened a pull request: https://github.com/apache/flink/pull/3825 FLINK-6445 [cep] Fix NPE in no-condition patterns. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kl0u/flink cep-null-filter Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/3825.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3825 commit f94db9bf53b242b5473dde46fc9218a61fa2ce3f Author: kl0u <kkloudas@gmail.com> Date: 2017-05-04T13:33:40Z FLINK-6445 [cep] Fix NPE in no-condition patterns.
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/flink/pull/3825

        Show
        githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/3825
        Hide
        githubbot ASF GitHub Bot added a comment -

        Github user tedyu commented on a diff in the pull request:

        https://github.com/apache/flink/pull/3825#discussion_r114923660

        — Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/conditions/AndCondition.java —
        @@ -32,8 +34,8 @@
        private final IterativeCondition<T> right;

        public AndCondition(final IterativeCondition<T> left, final IterativeCondition<T> right) {

        • this.left = left;
        • this.right = right;
          + this.left = Preconditions.checkNotNull(left, "The condition cannot be null.");
            • End diff –

        Better indicate whether left or right is null in the message.

        Show
        githubbot ASF GitHub Bot added a comment - Github user tedyu commented on a diff in the pull request: https://github.com/apache/flink/pull/3825#discussion_r114923660 — Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/conditions/AndCondition.java — @@ -32,8 +34,8 @@ private final IterativeCondition<T> right; public AndCondition(final IterativeCondition<T> left, final IterativeCondition<T> right) { this.left = left; this.right = right; + this.left = Preconditions.checkNotNull(left, "The condition cannot be null."); End diff – Better indicate whether left or right is null in the message.

          People

          • Assignee:
            kkl0u Kostas Kloudas
            Reporter:
            kkl0u Kostas Kloudas
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development