eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-1012) Some language level problems
Date Tue, 02 May 2017 06:23:04 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992392#comment-15992392
] 

ASF GitHub Bot commented on EAGLE-1012:
---------------------------------------

Github user asdf2014 commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/925#discussion_r114254748
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertPublisherImpl.java
---
    @@ -199,7 +194,7 @@ private void closePlugins(List<AlertPublishPlugin> toBeClosed)
{
                 try {
                     p.close();
                 } catch (Exception e) {
    -                LOG.error(String.format("Error when close publish plugin {}!", p.getClass().getCanonicalName()),
e);
    +                LOG.error(String.format("Error when close publish plugin %s!", p.getClass().getCanonicalName()),
e);
    --- End diff --
    
    `String.format` should use `%s` rather than `{}`
    
    ```java
    @Test
    public void testFormat() {
        assertEquals("a{}c", String.format("a{}c", "b"));
        assertEquals("abc", String.format("a%sc", "b"));
    }
    ```


> Some language level problems
> ----------------------------
>
>                 Key: EAGLE-1012
>                 URL: https://issues.apache.org/jira/browse/EAGLE-1012
>             Project: Eagle
>          Issue Type: Bug
>          Components: Project Infrastructure
>    Affects Versions: v0.4.0
>         Environment: Linux 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012
x86_64 x86_64 x86_64 GNU/Linux
>            Reporter: Benedict Jin
>              Labels: JDK
>             Fix For: v0.6.0
>
>         Attachments: Eagle Language Level Problems.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Some language level problems
> * Spell
> * Duplicated
> * Lambda
> * Collection
> * String
> * instanceof
> * Complex Method
> * Exception
> Details see attachment files.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message