Uploaded image for project: 'Solder'
  1. Solder
  2. SOLDER-291

ExceptionHandledInterceptor does not treat primitive values consistently

    Details

      Description

      if an method annotated with @ExceptionHandled throws an exception, ExceptionHandledInterceptor catches the exception and forwards it through Solder's exception handling framework for being handled. If the exception is handled, the method returns null for reference types and default values for primitive types. However, out of 8 primitive types that Java has, only 5 are handled this way.

      The missing types are:

      • byte
      • double
      • char

      If a method defining one of the missing types as its return type throws an exception and this exception is handled by the ExceptionHandledInterceptor, the method call always throws NullPointerException.

        Gliffy Diagrams

          Activity

          Hide
          jharting Jozef Hartinger added a comment -

          Added test org.jboss.solder.exception.control.test.common.interceptor.ExceptionHandledInterceptorTest.testDefaultValuesReturnedByHandledMethod()

          Show
          jharting Jozef Hartinger added a comment - Added test org.jboss.solder.exception.control.test.common.interceptor.ExceptionHandledInterceptorTest.testDefaultValuesReturnedByHandledMethod()

            People

            • Assignee:
              lightguard Jason Porter
              Reporter:
              jharting Jozef Hartinger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development