Skip to content

Commit

Permalink
fix: Pepperbot fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhuss committed Nov 4, 2017
1 parent 708e185 commit 69439a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.maven.project.MavenProject;

/**
* @author roland
* @since 04.11.17
*/
public class FormatParameterReplacer {

// Detect format elements within the name
private Pattern FORMAT_IDENTIFIER_PATTERN = Pattern.compile("^(.*?)%([^a-zA-Z]*)([a-zA-Z])(.*)$");
private final Pattern FORMAT_IDENTIFIER_PATTERN = Pattern.compile("^(.*?)%([^a-zA-Z]*)([a-zA-Z])(.*)$");

private final Map<String, Lookup> lookupMap;

public FormatParameterReplacer(Map<String, Lookup> lookupMap) {
this.lookupMap = lookupMap;
}

public String replace(String input) {
public synchronized String replace(String input) {
StringBuilder ret = new StringBuilder();
while (true) {
Matcher matcher = FORMAT_IDENTIFIER_PATTERN.matcher(input);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.common.base.Strings;
import io.fabric8.maven.docker.config.ConfigHelper;
Expand Down

0 comments on commit 69439a1

Please sign in to comment.