Skip to content

Commit

Permalink
Merge pull request #14 from DevFactory/release/multiple-quality-impro…
Browse files Browse the repository at this point in the history
…vements-fix-3

Multiple quality improvements - pmd:InefficientStringBuffering, squid…
  • Loading branch information
realtime-framework authored Jul 29, 2016
2 parents a33af0f + 70a3fed commit 3b66581
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/domains/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Channel {

public Channel(String name) {
this.name = name;
this.messages = new ArrayList<Message>();
this.messages = new ArrayList<>();
this.unRead = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/handlers/OrtcHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static void prepareClient(Context context, InterfaceRefresher rootView){
selfHandler = new OrtcHandler();
selfHandler.context = context;
selfHandler.rootView = rootView;
selfHandler.messages = new HashMap<String, Channel>();
selfHandler.messages = new HashMap<>();

Ortc api = new Ortc();
OrtcFactory factory;
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/preferences/PreferencesManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public List<String> loadChannels(){
String channels = settings.getString(CHANNELS,null);
if(channels == null)
{
return new ArrayList<String>();
return new ArrayList<>();
}

String[] parts = channels.split(",");

List<String> list = new ArrayList<String>();
List<String> list = new ArrayList<>();

for (String channel : parts) {
list.add(channel);
Expand All @@ -59,7 +59,7 @@ public void saveChannels(List<String> channels){
StringBuilder channelsString = new StringBuilder();

for (String channel : channels) {
channelsString.append(channel + ",");
channelsString.append(channel).append(",");
}

e.putString(CHANNELS,channelsString.toString());
Expand Down

0 comments on commit 3b66581

Please sign in to comment.