<commit_before>package com.tw.tradeaway.controller;

import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import com.tw.tradeaway.dto.OrderItemDto;

import java.net.URI;

@RestController
public class OrderController {

    @CrossOrigin(origins = "*")
    @RequestMapping(value = "order", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)

    public ResponseEntity<?> checkoutToPlaceOrder(@RequestBody OrderItemDto orderItem) {


        //validation
        if(orderItem == null || orderItem.ProductId == 0){
            throw new NullPointerException("Parameter Type [Order ID] cannot be null");
        }



        // response
        URI location = ServletUriComponentsBuilder<commit_msg>build issue resolved in Order Controller<commit_after>package com.tw.tradeaway.controller;

import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import com.tw.tradeaway.dto.OrderItemDto;

import java.net.URI;

@RestController
public class OrderController {

    @CrossOrigin(origins = "*")
    @RequestMapping(value = "order", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)

    public ResponseEntity<?> checkoutToPlaceOrder(@RequestBody OrderItemDto orderItem) {


        //validation
        if(orderItem == null || orderItem.getProductId() == 0){
            throw new NullPointerException("Parameter Type [Order ID] cannot be null");
        }



        // response
        URI location = ServletUriComponentsBuilder
{'fraction_non_alphanumeric': 0.09821428571428571, 'fraction_numerical': 0.0011160714285714285, 'mean_word_length': 4.336309523809524, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6438935', 'n_tokens_mistral': 480, 'n_tokens_neox': 461, 'n_words': 100}