@SuppressWarnings({ "rawtypes", "unchecked", "cast" }) @Test void getMap() { Map unsafe = new LinkedHashMap(5); unsafe.put("1", "1"); unsafe.put("2", "2"); unsafe.put("3", "3"); unsafe.put("4", "4"); unsafe.put("5", "5"); Map safe = (Map) this.scriptSafeProvider.get(unsafe); assertNotSame(unsafe, safe); assertTrue(safe instanceof Map); assertEquals(unsafe, safe); assertEquals(unsafe.toString(), safe.toString()); }
@Override public Object get(Object unsafe) { if (unsafe == null) { return null; } Object safe = get(unsafe, Arrays.<Type>asList(unsafe.getClass())); if (safe == null) { safe = unsafe; } return safe; }
DefaultScriptSafeProvider implements ScriptSafeProvider { @Override public Object get(Object unsafe) { if (unsafe == null) { return null; } Object safe = get(unsafe, Arrays.<Type>asList(unsafe.getClass())); if (safe == null) { safe = unsafe; } return safe; } }
DefaultScriptSafeProvider implements ScriptSafeProvider { @Override public Object get(Object unsafe) { if (unsafe == null) { return null; } Object safe = get(unsafe, Arrays.<Type>asList(unsafe.getClass())); if (safe == null) { safe = unsafe; } return safe; }  }
DefaultScriptSafeProvider implements ScriptSafeProvider { @Override public Object get(Object unsafe) { if (unsafe == null) { return null; } Object safe = get(unsafe, Arrays.<Type>asList(unsafe.getClass())); if (safe == null) { safe = unsafe; } return safe; }  @Override Object get(Object unsafe); }
DefaultScriptSafeProvider implements ScriptSafeProvider { @Override public Object get(Object unsafe) { if (unsafe == null) { return null; } Object safe = get(unsafe, Arrays.<Type>asList(unsafe.getClass())); if (safe == null) { safe = unsafe; } return safe; }  @Override Object get(Object unsafe);  }