Skip to content

Commit

Permalink
[#306] Fix generics and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
erwan committed Oct 19, 2010
1 parent d467bce commit f78ad2e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions framework/src/play/utils/OrderSafeProperties.java
Expand Up @@ -16,8 +16,8 @@
*/
package play.utils;

import java.io.BufferedReader;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -55,6 +55,7 @@ public OrderSafeProperties(OrderSafeProperties properties) {
defaults = properties;
}

@SuppressWarnings("unused")
private void dumpString(StringBuilder buffer, String string, boolean key) {
int i = 0;
if (!key && i < string.length() && string.charAt(i) == ' ') {
Expand Down Expand Up @@ -394,6 +395,7 @@ public Set<String> stringPropertyNames() {
return Collections.unmodifiableSet(stringProperties.keySet());
}

@SuppressWarnings("unchecked")
private void selectProperties(Hashtable selectProperties, final boolean isStringOnly) {
if (defaults != null) {
defaults.selectProperties(selectProperties, isStringOnly);
Expand Down Expand Up @@ -475,7 +477,7 @@ public boolean containsValue(Object value) {
}

@Override
public Set entrySet() {
public Set<Map.Entry<Object, Object>> entrySet() {
return _data.entrySet();
}

Expand All @@ -485,12 +487,12 @@ public boolean isEmpty() {
}

@Override
public Enumeration keys() {
public Enumeration<Object> keys() {
return new Hashtable<Object, Object>(_data).keys();
}

@Override
public Set keySet() {
public Set<Object> keySet() {
return _data.keySet();
}

Expand All @@ -505,6 +507,7 @@ public Object put(Object key, Object value) {
}

@Override
@SuppressWarnings("unchecked")
public void putAll(Map t) {
_data.putAll(t);
}
Expand All @@ -515,7 +518,7 @@ public int size() {
}

@Override
public Collection values() {
public Collection<Object> values() {
return _data.values();
}
}

0 comments on commit f78ad2e

Please sign in to comment.