shibing624/similarity

JaroWinklerDistanceTextSimilarity无限递归?

1ightDance opened this issue · 1 comments

调用JaroWinklerDistanceTextSimilarity的相似度方法时发现,org.xm.similarity.text.JaroWinklerDistanceTextSimilarity#getSimilarityImpl中会调用super.getSimilarity导致无限递归且没有递归出口
Exception in thread "main" java.lang.StackOverflowError at java.base/java.text.SimpleDateFormat.zeroPaddingNumber(SimpleDateFormat.java:1405) at java.base/java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1180) at java.base/java.text.SimpleDateFormat.format(SimpleDateFormat.java:997) at java.base/java.text.SimpleDateFormat.format(SimpleDateFormat.java:967) at java.base/java.text.DateFormat.format(DateFormat.java:374) at ch.qos.logback.core.util.CachingDateFormatter.format(CachingDateFormatter.java:49) at ch.qos.logback.classic.pattern.DateConverter.convert(DateConverter.java:63) at ch.qos.logback.classic.pattern.DateConverter.convert(DateConverter.java:23) at ch.qos.logback.core.pattern.FormattingConverter.write(FormattingConverter.java:37) at ch.qos.logback.core.pattern.PatternLayoutBase.writeLoopOnConverters(PatternLayoutBase.java:119) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:149) at ch.qos.logback.classic.PatternLayout.doLayout(PatternLayout.java:39) at ch.qos.logback.core.encoder.LayoutWrappingEncoder.doEncode(LayoutWrappingEncoder.java:134) at ch.qos.logback.core.OutputStreamAppender.writeOut(OutputStreamAppender.java:194) at ch.qos.logback.core.OutputStreamAppender.subAppend(OutputStreamAppender.java:219) at ch.qos.logback.core.OutputStreamAppender.append(OutputStreamAppender.java:103) at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:88) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:48) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:273) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:260) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:442) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) at ch.qos.logback.classic.Logger.debug(Logger.java:503) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:53) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) at org.xm.similarity.text.JaroWinklerDistanceTextSimilarity.getSimilarityImpl(JaroWinklerDistanceTextSimilarity.java:64) at org.xm.similarity.text.TextSimilarity.getSimilarity(TextSimilarity.java:59) ...

可以截图看下case吗?不然我这边没法复现问题。