You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by Andras Salamon <an...@melda.info> on 2018/08/07 12:54:56 UTC
Review Request 68255: OOZIE 3314 - Remove findbugs-filter.xml and
convert its contents to annotations
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68255/
-----------------------------------------------------------
Review request for oozie, András Piros and Kinga Marton.
Repository: oozie-git
Description
-------
3 excptions replaced by annotations, the 4th one affects generated code, still using a (simpified) XML for that.
Diffs
-----
core/src/main/java/org/apache/oozie/command/XCommand.java 7b8f47cc
core/src/main/java/org/apache/oozie/util/Instrumentation.java 8bcb64c1
findbugs-filter.xml 133178f0
fluent-job/fluent-job-api/pom.xml 4c9b8533
fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/GraphVisualization.java 437d6b3b
fluent-job/pom.xml 5b24c911
pom.xml 92358aa2
Diff: https://reviews.apache.org/r/68255/diff/1/
Testing
-------
Thanks,
Andras Salamon
Re: Review Request 68255: OOZIE 3314 - Remove findbugs-filter.xml and
convert its contents to annotations
Posted by Andras Salamon <an...@melda.info>.
> On Aug. 7, 2018, 1:01 p.m., András Piros wrote:
> > core/src/main/java/org/apache/oozie/command/XCommand.java
> > Lines 84 (patched)
> > <https://reviews.apache.org/r/68255/diff/1/?file=2069835#file2069835line84>
> >
> > Typo: eventService
Fixed it, later removed the annotation.
> On Aug. 7, 2018, 1:01 p.m., András Piros wrote:
> > core/src/main/java/org/apache/oozie/command/XCommand.java
> > Line 82 (original), 85 (patched)
> > <https://reviews.apache.org/r/68255/diff/1/?file=2069835#file2069835line85>
> >
> > Actually `eventService` is only written from inside one of the constructors, so it could - and should - be `static final`. Maybe can also be `private` and provide a getter for the ones wanting to reach it, or at least a `@VisibleForTesting`, when that's the case.
Writing the static variable from the constuctor is not the best idea, findbugs also gives us ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD warning. I've replaced the variable with a protected static getEventService method.
> On Aug. 7, 2018, 1:01 p.m., András Piros wrote:
> > core/src/main/java/org/apache/oozie/util/Instrumentation.java
> > Lines 710-711 (patched)
> > <https://reviews.apache.org/r/68255/diff/1/?file=2069836#file2069836line710>
> >
> > Any other way to refactor?
Refactored. Annotation eliminated.
- Andras
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68255/#review206941
-----------------------------------------------------------
On Aug. 7, 2018, 12:54 p.m., Andras Salamon wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68255/
> -----------------------------------------------------------
>
> (Updated Aug. 7, 2018, 12:54 p.m.)
>
>
> Review request for oozie, András Piros and Kinga Marton.
>
>
> Repository: oozie-git
>
>
> Description
> -------
>
> 3 excptions replaced by annotations, the 4th one affects generated code, still using a (simpified) XML for that.
>
>
> Diffs
> -----
>
> core/src/main/java/org/apache/oozie/command/XCommand.java 7b8f47cc
> core/src/main/java/org/apache/oozie/util/Instrumentation.java 8bcb64c1
> findbugs-filter.xml 133178f0
> fluent-job/fluent-job-api/pom.xml 4c9b8533
> fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/GraphVisualization.java 437d6b3b
> fluent-job/pom.xml 5b24c911
> pom.xml 92358aa2
>
>
> Diff: https://reviews.apache.org/r/68255/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Andras Salamon
>
>
Re: Review Request 68255: OOZIE 3314 - Remove findbugs-filter.xml and
convert its contents to annotations
Posted by András Piros via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68255/#review206941
-----------------------------------------------------------
core/src/main/java/org/apache/oozie/command/XCommand.java
Lines 84 (patched)
<https://reviews.apache.org/r/68255/#comment290118>
Typo: eventService
core/src/main/java/org/apache/oozie/command/XCommand.java
Line 82 (original), 85 (patched)
<https://reviews.apache.org/r/68255/#comment290119>
Actually `eventService` is only written from inside one of the constructors, so it could - and should - be `static final`. Maybe can also be `private` and provide a getter for the ones wanting to reach it, or at least a `@VisibleForTesting`, when that's the case.
core/src/main/java/org/apache/oozie/util/Instrumentation.java
Lines 710-711 (patched)
<https://reviews.apache.org/r/68255/#comment290120>
Any other way to refactor?
- András Piros
On Aug. 7, 2018, 12:54 p.m., Andras Salamon wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68255/
> -----------------------------------------------------------
>
> (Updated Aug. 7, 2018, 12:54 p.m.)
>
>
> Review request for oozie, András Piros and Kinga Marton.
>
>
> Repository: oozie-git
>
>
> Description
> -------
>
> 3 excptions replaced by annotations, the 4th one affects generated code, still using a (simpified) XML for that.
>
>
> Diffs
> -----
>
> core/src/main/java/org/apache/oozie/command/XCommand.java 7b8f47cc
> core/src/main/java/org/apache/oozie/util/Instrumentation.java 8bcb64c1
> findbugs-filter.xml 133178f0
> fluent-job/fluent-job-api/pom.xml 4c9b8533
> fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/GraphVisualization.java 437d6b3b
> fluent-job/pom.xml 5b24c911
> pom.xml 92358aa2
>
>
> Diff: https://reviews.apache.org/r/68255/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Andras Salamon
>
>
Re: Review Request 68255: OOZIE 3314 - Remove findbugs-filter.xml and
convert its contents to annotations
Posted by András Piros via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68255/#review206973
-----------------------------------------------------------
Ship it!
Ship It!
- András Piros
On Aug. 8, 2018, 9:15 a.m., Andras Salamon wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68255/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2018, 9:15 a.m.)
>
>
> Review request for oozie, András Piros and Kinga Marton.
>
>
> Repository: oozie-git
>
>
> Description
> -------
>
> 3 excptions replaced by annotations, the 4th one affects generated code, still using a (simpified) XML for that.
>
>
> Diffs
> -----
>
> core/src/main/java/org/apache/oozie/command/XCommand.java 7b8f47cc
> core/src/main/java/org/apache/oozie/command/coord/CoordinatorXCommand.java 18937a4b
> core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java 87d7e77f
> core/src/main/java/org/apache/oozie/util/Instrumentation.java 8bcb64c1
> findbugs-filter.xml 133178f0
> fluent-job/fluent-job-api/pom.xml 4c9b8533
> fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/GraphVisualization.java 437d6b3b
> fluent-job/pom.xml 5b24c911
> pom.xml 92358aa2
>
>
> Diff: https://reviews.apache.org/r/68255/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Andras Salamon
>
>
Re: Review Request 68255: OOZIE 3314 - Remove findbugs-filter.xml and
convert its contents to annotations
Posted by Andras Salamon <an...@melda.info>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68255/
-----------------------------------------------------------
(Updated Aug. 8, 2018, 9:15 a.m.)
Review request for oozie, András Piros and Kinga Marton.
Changes
-------
Two of the annotations are eliminated.
Repository: oozie-git
Description
-------
3 excptions replaced by annotations, the 4th one affects generated code, still using a (simpified) XML for that.
Diffs (updated)
-----
core/src/main/java/org/apache/oozie/command/XCommand.java 7b8f47cc
core/src/main/java/org/apache/oozie/command/coord/CoordinatorXCommand.java 18937a4b
core/src/main/java/org/apache/oozie/command/wf/WorkflowXCommand.java 87d7e77f
core/src/main/java/org/apache/oozie/util/Instrumentation.java 8bcb64c1
findbugs-filter.xml 133178f0
fluent-job/fluent-job-api/pom.xml 4c9b8533
fluent-job/fluent-job-api/src/main/java/org/apache/oozie/fluentjob/api/GraphVisualization.java 437d6b3b
fluent-job/pom.xml 5b24c911
pom.xml 92358aa2
Diff: https://reviews.apache.org/r/68255/diff/2/
Changes: https://reviews.apache.org/r/68255/diff/1-2/
Testing
-------
Thanks,
Andras Salamon