@Test public void npeInGetLanguageString() { final Variant variant = new Variant(MediaType.TEXT_PLAIN_TYPE, (String) null, null); assertNull(variant.getLanguageString()); }
public String getLanguageString() { return (language == null) ? null : language.toString(); }
Variant { public String getLanguageString() { return (language == null) ? null : language.toString(); } }
Variant { public String getLanguageString() { return (language == null) ? null : language.toString(); } Variant(final MediaType mediaType, final String language, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String languageVariant, final String encoding);  Variant(final MediaType mediaType, final Locale language, final String encoding); }
Variant { public String getLanguageString() { return (language == null) ? null : language.toString(); } Variant(final MediaType mediaType, final String language, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String languageVariant, final String encoding);  Variant(final MediaType mediaType, final Locale language, final String encoding); Locale getLanguage(); String getLanguageString(); MediaType getMediaType(); String getEncoding(); static VariantListBuilder mediaTypes(final MediaType... mediaTypes); static VariantListBuilder languages(final Locale... languages); static VariantListBuilder encodings(final String... encodings); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); }
Variant { public String getLanguageString() { return (language == null) ? null : language.toString(); } Variant(final MediaType mediaType, final String language, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String encoding);  Variant(final MediaType mediaType, final String language, final String country, final String languageVariant, final String encoding);  Variant(final MediaType mediaType, final Locale language, final String encoding); Locale getLanguage(); String getLanguageString(); MediaType getMediaType(); String getEncoding(); static VariantListBuilder mediaTypes(final MediaType... mediaTypes); static VariantListBuilder languages(final Locale... languages); static VariantListBuilder encodings(final String... encodings); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }