mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 12:02:20 +00:00
[FIXED JENKINS-18902] Exclude lower bound of range from changes
This commit is contained in:
1 parent
c826a01441
commit
25acdd8850
13 files changed
+39
-7
No files matched your search
@@ -540,6 +540,20 @@ public class Functions {
|
||||
return map.subMap(Integer.parseInt(to),Integer.parseInt(from)-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a sub map by using the given range (upper end inclusive).
|
||||
*/
|
||||
@Restricted(NoExternalUse.class)
|
||||
public static <V> SortedMap<Integer,V> filterExcludingFrom(SortedMap<Integer,V> map, String from, String to) {
|
||||
if(from==null && to==null) return map;
|
||||
if(to==null)
|
||||
return map.headMap(Integer.parseInt(from));
|
||||
if(from==null)
|
||||
return map.tailMap(Integer.parseInt(to));
|
||||
|
||||
return map.subMap(Integer.parseInt(to),Integer.parseInt(from));
|
||||
}
|
||||
|
||||
private static final SimpleFormatter formatter = new SimpleFormatter();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user