why is a stack overflow code example

Example 1: stack overflow

{
	if (code != work)
    {
    	GoToStackOverflow()
    }
}

Example 2: stack overflow

@Service
public class EntryTerminalServiceImpl implements EntryTerminalService {

    private final EntryTerminalRepository entryTerminalRepository;

    @Autowired
    public EntryTerminalServiceImpl(EntryTerminalRepository entryTerminalRepository) {
        this.entryTerminalRepository = entryTerminalRepository;
    }

    @Override
    public Page<EntryTerminal> getEntryTerminalEventsLog(Pageable pageable) {
        return entryTerminalRepository.findAllByOrderByIdDesc(pageable);
    }

    @Override
    public void saveEntryTerminalEventToLog(EntryTerminal entryTerminal) {
        entryTerminalRepository.save(entryTerminal);
    }

}

Tags:

Misc Example