• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • core-libs
    • b26
    • generic
    • generic

      https://bugs.openjdk.org/browse/JDK-8341789 missed 4 occurrences where `ExceptionCheck` should have been used over `ExceptionOccurred`. Note that while the 9 NULL checks are not a glaring issue (and were intentionally skipped in the original java.base patch), they will be fixed here for better readability and consistency with the JNI ExceptionCheck cleanup in the other modules.

      java.base (13 usages found)
                          share (9 usages found)
                              native (9 usages found)
                                  libjli (1 usage found)
                                      java.c (1 usage found)
                                          653 if (ret && (*env)->ExceptionOccurred(env) == NULL) {
                                  libzip (8 usages found)
                                      Deflater.c (4 usages found)
                                          200 if (inputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          207 if (outputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          234 if (inputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          260 if (outputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                      Inflater.c (4 usages found)
                                          197 if (inputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          204 if (outputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          230 if (inputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                                          255 if (outputLen != 0 && (*env)->ExceptionOccurred(env) == NULL)
                          windows (4 usages found)
                              native (4 usages found)
                                  libjava (2 usages found)
                                      io_util_md.c (2 usages found)
                                          540 if ((*env)->ExceptionOccurred(env)) {
                                          555 if ((*env)->ExceptionOccurred(env)) {
                                  libnet (1 usage found)
                                      net_util_md.c (1 usage found)
                                          146 if ((*env)->ExceptionOccurred(env)) {
                                  libnio (1 usage found)
                                      ch (1 usage found)
                                          UnixDomainSockets.c (1 usage found)
                                              51 if ((*env)->ExceptionOccurred(env)) {

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: