@Test (expected = IllegalArgumentException.class) public void nullLang() throws Exception { new NonBreakPointsLoaderImpl().loadNBSP(null); }
@Override public List<String> loadNBSP(String lang) { if (lang == null || lang.isEmpty()) { throw new IllegalArgumentException("Lang must be filled to search for file!"); } List<String> result = loadForKey(lang); if (result == null) { int index = lang.indexOf('_'); if (index < 0) return null; result = loadForKey(lang.substring(0, index)); } return result; }
NonBreakPointsLoaderImpl implements NonBreakPointsLoader { @Override public List<String> loadNBSP(String lang) { if (lang == null || lang.isEmpty()) { throw new IllegalArgumentException("Lang must be filled to search for file!"); } List<String> result = loadForKey(lang); if (result == null) { int index = lang.indexOf('_'); if (index < 0) return null; result = loadForKey(lang.substring(0, index)); } return result; } }
NonBreakPointsLoaderImpl implements NonBreakPointsLoader { @Override public List<String> loadNBSP(String lang) { if (lang == null || lang.isEmpty()) { throw new IllegalArgumentException("Lang must be filled to search for file!"); } List<String> result = loadForKey(lang); if (result == null) { int index = lang.indexOf('_'); if (index < 0) return null; result = loadForKey(lang.substring(0, index)); } return result; }  }
NonBreakPointsLoaderImpl implements NonBreakPointsLoader { @Override public List<String> loadNBSP(String lang) { if (lang == null || lang.isEmpty()) { throw new IllegalArgumentException("Lang must be filled to search for file!"); } List<String> result = loadForKey(lang); if (result == null) { int index = lang.indexOf('_'); if (index < 0) return null; result = loadForKey(lang.substring(0, index)); } return result; }  @Override List<String> loadNBSP(String lang); }
NonBreakPointsLoaderImpl implements NonBreakPointsLoader { @Override public List<String> loadNBSP(String lang) { if (lang == null || lang.isEmpty()) { throw new IllegalArgumentException("Lang must be filled to search for file!"); } List<String> result = loadForKey(lang); if (result == null) { int index = lang.indexOf('_'); if (index < 0) return null; result = loadForKey(lang.substring(0, index)); } return result; }  @Override List<String> loadNBSP(String lang);  }