harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r730657 - /harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/
Date Fri, 02 Jan 2009 02:14:41 GMT
Author: ndbeyer
Date: Thu Jan  1 18:14:40 2009
New Revision: 730657

URL: http://svn.apache.org/viewvc?rev=730657&view=rev
Log:
clean up trivial compilation warnings - add missing annotations

Modified:
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/FilePreferencesImplTest.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockAbstractPreferences.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockSecurityManager.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/NodeChangeListenerTest.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferenceChangeListenerTest.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesFactoryTest.java
    harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesTest.java

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Thu Jan  1 18:14:40 2009
@@ -42,8 +42,6 @@
 import org.apache.xpath.XPathAPI;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 
 /**
@@ -87,7 +85,8 @@
 		longName = name.toString();
 	}
 
-	protected void setUp() throws Exception {
+	@Override
+    protected void setUp() throws Exception {
 		super.setUp();
 		root = (AbstractPreferences) Preferences.userRoot();
 		parent = (AbstractPreferences) Preferences
@@ -99,7 +98,8 @@
 		pref = (AbstractPreferences) parent.node("mock");
 	}
 
-	protected void tearDown() throws Exception {
+	@Override
+    protected void tearDown() throws Exception {
 		try {
 			if (pref instanceof MockAbstractPreferences) {
 				((MockAbstractPreferences) pref)
@@ -1159,7 +1159,7 @@
 	}
 
 	public Object invokeNonPublicMethod(AbstractPreferences obj, String name,
-			Class[] params, Object[] paramValues) throws SecurityException,
+			Class<?>[] params, Object[] paramValues) throws SecurityException,
 			NoSuchMethodException, IllegalArgumentException,
 			IllegalAccessException, InvocationTargetException {
 		Method method = obj.getClass().getMethod(name, params);

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/FilePreferencesImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/FilePreferencesImplTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/FilePreferencesImplTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/FilePreferencesImplTest.java
Thu Jan  1 18:14:40 2009
@@ -34,6 +34,7 @@
         super();
     }
     
+    @Override
     protected void setUp() throws Exception {
         prevFactory = System.getProperty("java.util.prefs.PreferencesFactory");
         System.setProperty("java.util.prefs.PreferencesFactory", "java.util.prefs.FilePreferencesFactoryImpl");
@@ -42,6 +43,7 @@
         sroot = Preferences.systemRoot();
     }
     
+    @Override
     protected void tearDown() throws Exception {
         if (prevFactory != null)
             System.setProperty("java.util.prefs.PreferencesFactory", prevFactory);
@@ -205,7 +207,8 @@
 			System.setSecurityManager(dflt);
 		}
 
-		public void checkPermission(Permission perm) {
+		@Override
+        public void checkPermission(Permission perm) {
 			if (perm instanceof FilePermission) {
 				throw new SecurityException();
 			} else if (dflt != null) {
@@ -213,7 +216,8 @@
 			}
 		}
 
-		public void checkPermission(Permission perm, Object ctx) {
+		@Override
+        public void checkPermission(Permission perm, Object ctx) {
 			if (perm instanceof FilePermission) {
 				System.out.println(perm.getActions());
 				throw new SecurityException();

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockAbstractPreferences.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockAbstractPreferences.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockAbstractPreferences.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockAbstractPreferences.java
Thu Jan  1 18:14:40 2009
@@ -84,7 +84,8 @@
 		return lock;
 	}
 
-	protected String[] childrenNamesSpi() throws BackingStoreException {
+	@Override
+    protected String[] childrenNamesSpi() throws BackingStoreException {
 		checkException();
 		if (result == returnNull)
 			return null;
@@ -108,7 +109,8 @@
 		return childSpi(name);
 	}
 
-	protected AbstractPreferences childSpi(String name) {
+	@Override
+    protected AbstractPreferences childSpi(String name) {
 		try {
 			checkException();
 		} catch (BackingStoreException e) {
@@ -123,12 +125,14 @@
 		return r;
 	}
 
-	protected void flushSpi() throws BackingStoreException {
+	@Override
+    protected void flushSpi() throws BackingStoreException {
 		checkException();
 		flushedTimes++;
 	}
 
-	protected String getSpi(String key) {
+	@Override
+    protected String getSpi(String key) {
 		try {
 			checkException();
 		} catch (BackingStoreException e) {
@@ -139,7 +143,8 @@
 		return result == returnNull ? null : attr.getProperty(key);
 	}
 
-	protected String[] keysSpi() throws BackingStoreException {
+	@Override
+    protected String[] keysSpi() throws BackingStoreException {
 		checkException();
 		Set<Object> keys = attr.keySet();
 		String[] results = new String[keys.size()];
@@ -147,7 +152,8 @@
 		return result == returnNull ? null : results;
 	}
 
-	protected void putSpi(String name, String value) {
+	@Override
+    protected void putSpi(String name, String value) {
 		try {
 			checkException();
 		} catch (BackingStoreException e) {
@@ -158,12 +164,14 @@
 		attr.put(name, value);
 	}
 
-	protected void removeNodeSpi() throws BackingStoreException {
+	@Override
+    protected void removeNodeSpi() throws BackingStoreException {
 		checkException();
 		((MockAbstractPreferences) parent()).childs.remove(name());
 	}
 
-	protected void removeSpi(String key) {
+	@Override
+    protected void removeSpi(String key) {
 		try {
 			checkException();
 		} catch (BackingStoreException e) {
@@ -174,7 +182,8 @@
 		attr.remove(key);
 	}
 
-	protected void syncSpi() throws BackingStoreException {
+	@Override
+    protected void syncSpi() throws BackingStoreException {
 		checkException();
 		syncTimes++;
 	}

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockSecurityManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockSecurityManager.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockSecurityManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/MockSecurityManager.java
Thu Jan  1 18:14:40 2009
@@ -39,7 +39,8 @@
 		System.setSecurityManager(dflt);
 	}
 
-	public void checkPermission(Permission perm) {
+	@Override
+    public void checkPermission(Permission perm) {
 		if (perm instanceof RuntimePermission
 				&& perm.getName().equals("preferences")) {
 			throw new SecurityException();
@@ -48,7 +49,8 @@
 		}
 	}
 
-	public void checkPermission(Permission perm, Object ctx) {
+	@Override
+    public void checkPermission(Permission perm, Object ctx) {
 		if (perm instanceof RuntimePermission
 				&& perm.getName().equals("preferences")) {
 			throw new SecurityException();

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/NodeChangeListenerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/NodeChangeListenerTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/NodeChangeListenerTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/NodeChangeListenerTest.java
Thu Jan  1 18:14:40 2009
@@ -32,7 +32,8 @@
 	/*
 	 * @see TestCase#setUp()
 	 */
-	protected void setUp() throws Exception {
+	@Override
+    protected void setUp() throws Exception {
 		super.setUp();
 		l = new NodeChangeListenerImpl();
 	}
@@ -40,7 +41,8 @@
 	/*
 	 * @see TestCase#tearDown()
 	 */
-	protected void tearDown() throws Exception {
+	@Override
+    protected void tearDown() throws Exception {
 		super.tearDown();
 	}
 

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferenceChangeListenerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferenceChangeListenerTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferenceChangeListenerTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferenceChangeListenerTest.java
Thu Jan  1 18:14:40 2009
@@ -32,7 +32,8 @@
 	/*
 	 * @see TestCase#setUp()
 	 */
-	protected void setUp() throws Exception {
+	@Override
+    protected void setUp() throws Exception {
 		super.setUp();
 		l = new PreferenceChangeListenerImpl();
 	}

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesFactoryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesFactoryTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesFactoryTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesFactoryTest.java
Thu Jan  1 18:14:40 2009
@@ -31,7 +31,8 @@
 	/*
 	 * @see TestCase#setUp()
 	 */
-	protected void setUp() throws Exception {
+	@Override
+    protected void setUp() throws Exception {
 		super.setUp();
 		f = new PreferencesFactoryImpl();
 	}

Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesTest.java?rev=730657&r1=730656&r2=730657&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/PreferencesTest.java
Thu Jan  1 18:14:40 2009
@@ -44,7 +44,8 @@
 	/*
 	 * @see TestCase#setUp()
 	 */
-	protected void setUp() throws Exception {
+	@Override
+    protected void setUp() throws Exception {
 		super.setUp();
 		in = new ByteArrayInputStream("<!DOCTYPE preferences SYSTEM \"http://java.sun.com/dtd/preferences.dtd\"><preferences><root
type=\"user\"><map></map></root></preferences>".getBytes("UTF-8"));
 		stream = new MockInputStream(in);
@@ -53,7 +54,8 @@
 	/*
 	 * @see TestCase#tearDown()
 	 */
-	protected void tearDown() throws Exception {
+	@Override
+    protected void tearDown() throws Exception {
 		super.tearDown();
 		stream.close();
 	}
@@ -377,7 +379,8 @@
 			wrapper = in;
 		}
 
-		public int read() throws IOException {
+		@Override
+        public int read() throws IOException {
 			checkException();
 			return wrapper.read();
 		}
@@ -389,137 +392,171 @@
 			super();
 		}
 
-		public String absolutePath() {
+		@Override
+        public String absolutePath() {
 			return null;
 		}
 
-		public String[] childrenNames() throws BackingStoreException {
+		@Override
+        public String[] childrenNames() throws BackingStoreException {
 			return null;
 		}
 
-		public void clear() throws BackingStoreException {
+		@Override
+        public void clear() throws BackingStoreException {
 		}
 
-		public void exportNode(OutputStream ostream) throws IOException,
+		@Override
+        public void exportNode(OutputStream ostream) throws IOException,
 				BackingStoreException {
 		}
 
-		public void exportSubtree(OutputStream ostream) throws IOException,
+		@Override
+        public void exportSubtree(OutputStream ostream) throws IOException,
 				BackingStoreException {
 		}
 
-		public void flush() throws BackingStoreException {
+		@Override
+        public void flush() throws BackingStoreException {
 		}
 
-		public String get(String key, String deflt) {
+		@Override
+        public String get(String key, String deflt) {
 			return null;
 		}
 
-		public boolean getBoolean(String key, boolean deflt) {
+		@Override
+        public boolean getBoolean(String key, boolean deflt) {
 			return false;
 		}
 
-		public byte[] getByteArray(String key, byte[] deflt) {
+		@Override
+        public byte[] getByteArray(String key, byte[] deflt) {
 			return null;
 		}
 
-		public double getDouble(String key, double deflt) {
+		@Override
+        public double getDouble(String key, double deflt) {
 			return 0;
 		}
 
-		public float getFloat(String key, float deflt) {
+		@Override
+        public float getFloat(String key, float deflt) {
 			return 0;
 		}
 
-		public int getInt(String key, int deflt) {
+		@Override
+        public int getInt(String key, int deflt) {
 			return 0;
 		}
 
-		public long getLong(String key, long deflt) {
+		@Override
+        public long getLong(String key, long deflt) {
 			return 0;
 		}
 
-		public boolean isUserNode() {
+		@Override
+        public boolean isUserNode() {
 			return false;
 		}
 
-		public String[] keys() throws BackingStoreException {
+		@Override
+        public String[] keys() throws BackingStoreException {
 			return null;
 		}
 
-		public String name() {
+		@Override
+        public String name() {
 			return null;
 		}
 
-		public Preferences node(String name) {
+		@Override
+        public Preferences node(String name) {
 			return null;
 		}
 
-		public boolean nodeExists(String name) throws BackingStoreException {
+		@Override
+        public boolean nodeExists(String name) throws BackingStoreException {
 			return false;
 		}
 
-		public Preferences parent() {
+		@Override
+        public Preferences parent() {
 			return null;
 		}
 
-		public void put(String key, String value) {
+		@Override
+        public void put(String key, String value) {
 
 		}
 
-		public void putBoolean(String key, boolean value) {
+		@Override
+        public void putBoolean(String key, boolean value) {
 
 		}
 
-		public void putByteArray(String key, byte[] value) {
+		@Override
+        public void putByteArray(String key, byte[] value) {
 
 		}
 
-		public void putDouble(String key, double value) {
+		@Override
+        public void putDouble(String key, double value) {
 
 		}
 
-		public void putFloat(String key, float value) {
+		@Override
+        public void putFloat(String key, float value) {
 
 		}
 
-		public void putInt(String key, int value) {
+		@Override
+        public void putInt(String key, int value) {
 
 		}
 
-		public void putLong(String key, long value) {
+		@Override
+        public void putLong(String key, long value) {
 
 		}
 
-		public void remove(String key) {
+		@Override
+        public void remove(String key) {
 
 		}
 
-		public void removeNode() throws BackingStoreException {
+		@Override
+        public void removeNode() throws BackingStoreException {
 
 		}
 
-		public void addNodeChangeListener(NodeChangeListener ncl) {
+		@Override
+        public void addNodeChangeListener(NodeChangeListener ncl) {
 
 		}
 
-		public void addPreferenceChangeListener(PreferenceChangeListener pcl) {
+		@Override
+        public void addPreferenceChangeListener(PreferenceChangeListener pcl) {
 
 		}
 
-		public void removeNodeChangeListener(NodeChangeListener ncl) {
+		@Override
+        public void removeNodeChangeListener(NodeChangeListener ncl) {
 
 		}
 
-		public void removePreferenceChangeListener(PreferenceChangeListener pcl) {
+		@Override
+        public void removePreferenceChangeListener(PreferenceChangeListener pcl) {
 
 		}
 
-		public void sync() throws BackingStoreException {
+		@Override
+        public void sync() throws BackingStoreException {
 
 		}
 
-		public String toString() {
+		@Override
+        public String toString() {
 			return null;
 		}
 



Mime
View raw message