aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zameer Manji <zma...@apache.org>
Subject Re: Review Request 53933: Adopt built-in string formatting in Preconditions.checkState and our logger.
Date Mon, 21 Nov 2016 01:55:53 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53933/#review156431
-----------------------------------------------------------


Ship it!




LGTM.

I wonder if we could write a PMD rule to catch and prevent cases like this.

- Zameer Manji


On Nov. 20, 2016, 10:50 a.m., Stephan Erb wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53933/
> -----------------------------------------------------------
> 
> (Updated Nov. 20, 2016, 10:50 a.m.)
> 
> 
> Review request for Aurora and Joshua Cohen.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Inspired by https://reviews.apache.org/r/53928/ this replaces many usages of `String.format`
with the built-in formatting in `Preconditions.checkState` and our logger. This has the advantage
that the formatting is only done when necessary. A couple of other usages are replaced with
`String.join` or simple string concatenation which tends to be faster than the more powerful
`Sting.format`.
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/TaskStatusHandlerImpl.java 51215b6ec5b0d83bfc81a16e6016f52b0fb2b899

>   src/main/java/org/apache/aurora/scheduler/events/Webhook.java 321cab3aa7a1e92b2419f87c3c8874c7080f21cd

>   src/main/java/org/apache/aurora/scheduler/http/LeaderRedirect.java 6ea780c8a63e1608510ab3867736c5fae065e08b

>   src/main/java/org/apache/aurora/scheduler/mesos/MesosTaskFactory.java abbe81aa023faa58d12c71199836281d8b03966d

>   src/main/java/org/apache/aurora/scheduler/offers/OfferManager.java 3b56921c0a5a2b3efbeb1f0a65b604186506582c

>   src/main/java/org/apache/aurora/scheduler/pruning/TaskHistoryPruner.java c672826c80feab896cf6b1c1ee1b2bc1dbc67380

>   src/main/java/org/apache/aurora/scheduler/reconciliation/TaskTimeout.java a90cbff12a0a252034a1ffdb00c96e5b2fb7b9e0

>   src/main/java/org/apache/aurora/scheduler/resources/ResourceMapper.java ccfd997504d13fae7d6113558cea989b57d55126

>   src/main/java/org/apache/aurora/scheduler/scheduling/TaskScheduler.java 31edb1db3f513990d653d753a8da16e1d7160486

>   src/main/java/org/apache/aurora/scheduler/state/StateManagerImpl.java 1c4a621710c3343a2178b94bb077534a421f82a8

>   src/main/java/org/apache/aurora/scheduler/state/TaskAssigner.java 4c617623823f51739922dd7b10f0600e3d51b8d0

>   src/main/java/org/apache/aurora/scheduler/thrift/aop/LoggingInterceptor.java 3f11d8efb228544178690a659692237174312ebe

>   src/main/java/org/apache/aurora/scheduler/updater/JobUpdateControllerImpl.java 2a92a5ac2ac533465436e35019380de14086ad74

> 
> Diff: https://reviews.apache.org/r/53933/diff/
> 
> 
> Testing
> -------
> 
> ./gradlew -Pq build
> 
> 
> Thanks,
> 
> Stephan Erb
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message