Skip to content

Commit

Permalink
[activemq_58] Code cleanup and beautifying
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne LAFARGE committed Apr 22, 2015
1 parent 2a303ee commit 7217b70
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/org/datadog/jmxfetch/reporter/StatsdReporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ public static String formatDataName(String name){
String[] chunks = name.split("\\.");

// Escaping the prefix name
chunks[0] = chunks[0].replaceAll("[_A-Z0-9]", "");
chunks[0] = chunks[0].replaceAll("[_A-Z0-9:-]", "");

// Putting the chunks together (there's nothing in the standard library to do that :o )
String res = "";
for(int i=0; i < chunks.length; ++i){
if(i>0)
res+=".";
res+= chunks[i];
for(int i = 0; i < chunks.length; ++i){
if(i > 0)
res += ".";
res += chunks[i];
}

return res;
}

Expand Down

0 comments on commit 7217b70

Please sign in to comment.