Uploaded image for project: 'Apache Submarine'
  1. Apache Submarine
  2. SUBMARINE-224 [Umbrella] Submarine Server
  3. SUBMARINE-327

Fix unchecked call 'result<T>' when used JsonResponse.Builder build response

    XMLWordPrintableJSON

Details

    Description

      Problem 1:

      // JobServerRestApi.java
      // Unchecked call to 'result(T)' as a member of raw type 'org.apache.submarine.server.response.JsonResponse.Builder' 
      new JsonResponse.Builder<JobSpec>(Response.Status.OK)
          .success(true).result(id).build()
      

      Problem 2:

      // JsonResponse.java
      // Raw use of parameterized class 'Builder'
      public Builder code(int code) {
        this.code = code;
        return this;
      }
      
      // Raw use of parameterized class 'JsonResponse'
      public javax.ws.rs.core.Response build() {
        JsonResponse jsonResponse = new JsonResponse(this);
        return jsonResponse.build();
      }

       

      Attachments

        Issue Links

          Activity

            People

              jiwq Wanqiang Ji
              jiwq Wanqiang Ji
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m