Skip to content

Commit

Permalink
[INLONG-9755][Sort] fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
haibo-duan committed Mar 18, 2024
1 parent dbafbc8 commit 44ab183
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -45,6 +46,8 @@ public class ClassResourceQueryConsumeConfig implements QueryConsumeConfig {

public static final Logger LOG = LoggerFactory.getLogger(ClassResourceQueryConsumeConfig.class);

public static final String REGEXP = "/\\*((?!\\*/).|[\\r\\n])*?\\*/";

/**
* queryCurrentConsumeConfig
*
Expand All @@ -57,6 +60,7 @@ public ConsumeConfig queryCurrentConsumeConfig(String sortTaskId) {
try {
String confString = IOUtils.toString(getClass().getClassLoader().getResource(fileName),
Charset.defaultCharset());
confString = confString.replaceAll(REGEXP, StringUtils.EMPTY);
ObjectMapper objectMapper = new ObjectMapper();
CacheZoneConfig cacheZoneConfig = objectMapper.readValue(confString, CacheZoneConfig.class);
//
Expand Down

0 comments on commit 44ab183

Please sign in to comment.