Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package testit;
- import java.util.Map;
- import java.util.Map.Entry;
- import com.google.common.base.Optional;
- public class Test {
- private static final Object NO_VALUE = new Object();
- public void method(Map<String, ?> map) {
- for (Entry<String, ?> entry : map.entrySet()) {
- Optional.fromNullable(entry.getValue()).or(NO_VALUE);
- // ^^ error here
- }
- }
- }
- Optional.fromNullable((Object)entry.getValue()).or(NO_VALUE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement