@Test public void testDecode$null() throws Exception { TestProxy sut = new TestProxy(); Name<?> result = sut.decode(null); assertThat(result,nullValue()); }
@Override public final <T extends Serializable> Name<T> decode(String data) { if(data==null) { return null; } try { byte[] serializedData=BaseEncoding.base64().decode(data); Serializable subject=SerializationUtils.deserialize(serializedData, Serializable.class); return assemble(subject); } catch (IOException e) { throw new AssertionError("Deserialization should not fail",e); } }
AbstractEncoder extends Encoder { @Override public final <T extends Serializable> Name<T> decode(String data) { if(data==null) { return null; } try { byte[] serializedData=BaseEncoding.base64().decode(data); Serializable subject=SerializationUtils.deserialize(serializedData, Serializable.class); return assemble(subject); } catch (IOException e) { throw new AssertionError("Deserialization should not fail",e); } } }
AbstractEncoder extends Encoder { @Override public final <T extends Serializable> Name<T> decode(String data) { if(data==null) { return null; } try { byte[] serializedData=BaseEncoding.base64().decode(data); Serializable subject=SerializationUtils.deserialize(serializedData, Serializable.class); return assemble(subject); } catch (IOException e) { throw new AssertionError("Deserialization should not fail",e); } }  }
AbstractEncoder extends Encoder { @Override public final <T extends Serializable> Name<T> decode(String data) { if(data==null) { return null; } try { byte[] serializedData=BaseEncoding.base64().decode(data); Serializable subject=SerializationUtils.deserialize(serializedData, Serializable.class); return assemble(subject); } catch (IOException e) { throw new AssertionError("Deserialization should not fail",e); } }  @Override final String encode(Name<?> name); @Override final Name<T> decode(String data); }
AbstractEncoder extends Encoder { @Override public final <T extends Serializable> Name<T> decode(String data) { if(data==null) { return null; } try { byte[] serializedData=BaseEncoding.base64().decode(data); Serializable subject=SerializationUtils.deserialize(serializedData, Serializable.class); return assemble(subject); } catch (IOException e) { throw new AssertionError("Deserialization should not fail",e); } }  @Override final String encode(Name<?> name); @Override final Name<T> decode(String data);  }