---
title: "[反例]超短代码,意义不明"
author: "抛出异常的爱"
date: "2010-08-19T17:49:14Z"
tags: []
categories: ["企业架构"]
slug: "untitled"
draft: false
lastmod: "2010-08-20T09:33:05Z"
id: 741472
url: "https://loveexception.iteye.com/blog/741472"
---

```java
	public String logout(HttpServletRequest request, HttpServletResponse response) throws Exception {
		String ticket = getTicket(request);
		if (ticket == null || ticket.equals("")) {
			return "success";
		}
		setCookie(response, "", -1);
		setSecure(response, "", -1);
		return "success";
	}
```


这种代码短到吐血
但可看价值真的不高