You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2009/11/13 19:38:14 UTC

svn commit: r835951 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java

Author: sebb
Date: Fri Nov 13 18:38:14 2009
New Revision: 835951

URL: http://svn.apache.org/viewvc?rev=835951&view=rev
Log:
Add missing @Override tags and remove unnecessary casts

Modified:
    jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java

Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java?rev=835951&r1=835950&r2=835951&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java Fri Nov 13 18:38:14 2009
@@ -53,7 +53,8 @@
 		super(name);
 	}
 
-	public void setUp() throws Exception {
+	@Override
+    public void setUp() throws Exception {
 		super.setUp();
 		this.cacheManager = new CacheManager();
 		SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
@@ -67,7 +68,8 @@
 		this.httpUrlConnection = new HttpURLConnection(this.httpMethod, this.url);
 	}
 
-	protected void tearDown() throws Exception {
+	@Override
+    protected void tearDown() throws Exception {
 		this.httpUrlConnection = null;
 		this.httpMethod = null;
 		this.urlConnection = null;
@@ -180,16 +182,16 @@
 		return sampleResult;
 	}
 
-	@SuppressWarnings("unchecked")
 	private Map<String, CacheManager.CacheEntry> getThreadCache() throws Exception {
 		Field threadLocalfield = CacheManager.class.getDeclaredField("threadCache");
 		threadLocalfield.setAccessible(true);
+	    @SuppressWarnings("unchecked")
 		ThreadLocal<Map<String, CacheEntry>> threadLocal = (ThreadLocal<Map<String, CacheManager.CacheEntry>>) threadLocalfield.get(this.cacheManager);
-		return (Map<String, CacheManager.CacheEntry>) threadLocal.get();
+		return threadLocal.get();
 	}
 
 	private CacheManager.CacheEntry getThreadCacheEntry(String url) throws Exception {
-		return (CacheManager.CacheEntry) getThreadCache().get(url);
+		return getThreadCache().get(url);
 	}
 
 	private void saveDetailsWithHttpMethodAndSampleResultWithResponseCode(String responseCode) throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org