File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/util/type Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -149,16 +149,14 @@ private Map<String, String> getFileInfo(File file) {
149149 int pos = name .lastIndexOf ('.' );
150150 name = name .substring (0 , pos );
151151
152- int end = name .length () - 1 ;
153- int start = name .lastIndexOf ('-' );
152+ int start = name .indexOf ('-' );
154153 while (start > 0 ) {
155154 if (isDigit (name .charAt (start + 1 ))) {
156- result .put (VERSION , name .substring (start + 1 , end + 1 ));
155+ result .put (VERSION , name .substring (start + 1 ));
157156 result .put (ARTIFACT_ID , name .substring (0 , start ));
158157 break ;
159158 }
160- end = start - 1 ;
161- start = name .lastIndexOf ('-' , end );
159+ start = name .indexOf ('-' , start + 1 );
162160 }
163161 return result ;
164162 }
You can’t perform that action at this time.
0 commit comments