accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milleruntime <...@git.apache.org>
Subject [GitHub] accumulo pull request #289: ACCUMULO-4677 Sanitizing PathParam values in RES...
Date Fri, 04 Aug 2017 16:19:57 GMT
Github user milleruntime commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/289#discussion_r131426801
  
    --- Diff: server/monitor/src/main/java/org/apache/accumulo/monitor/rest/trace/TracesResource.java
---
    @@ -258,8 +278,8 @@ protected Range getRangeForTrace(long minutesSince) {
         long startTime = endTime - millisSince;
     
         String startHexTime = Long.toHexString(startTime), endHexTime = Long.toHexString(endTime);
    -    while (startHexTime.length() < endHexTime.length()) {
    -      startHexTime = "0" + startHexTime;
    +    if (startHexTime.length() < endHexTime.length()) {
    +      StringUtils.leftPad(startHexTime, endHexTime.length(), '0');
    --- End diff --
    
    Nice improvement!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message