Login | Register
My pages Projects Community openCollabNet

Discussions > Notification of Issues > [argouml-issues] [Issue 6520] New - Several log refactoring/improvement suggestions

argouml
Discussion topic

Back to topic list

[argouml-issues] [Issue 6520] New - Several log refactoring/improvement suggestions

Author chenfsd
Full name Boyuan Chen
Date 2016-10-28 17:50:41 PDT
Message http://argouml.tigri​s.org/issues/show_bu​g.cgi?id=6520
                 Issue #|6520
                 Summary|Several log refactoring/improvement suggestions
               Component|argouml
                 Version|0.35.1
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|Other
             Assigned to|linus
             Reported by|chenfsd






------- Additional comments from chenfsd at tigris dot org Tue Oct 25 21:55:21 -0700 2016 -------
--------------------​--------------------​---
Method invocation replaced by variable
--------------------​--------------------​---
file: ArgoUML-0.35.1-src/a​rgouml/src/argouml-c​ore-model-
mdr/src/org/argouml/​model/mdr/ModelEvent​PumpMDRImpl.java|
line 504,
the log line contains: (RefBaseObject) event.getSource()).refMofId()
However, in above there is a line of code:
String mofId = ((RefBaseObject) event.getSource()).refMofId();
Therefore we should replace this method invocation by mofId for the sake of
simplicity and readability.
Similar in line 518

--------------------​--------------------​---
Method invocation in return statement
--------------------​--------------------​---
file:ArgoUML-0.35.1-​src/argouml/src/argo​uml-
app/src/org/argouml/​kernel/ProjectImpl.j​ava
line 543-545:
LOG.log(Level.SEVERE,"Exception when fetching models from profile " +
profile.getDisplayName(),e);

variable profile is an instance of class Profile
in file: ArgoUML-0.35.1-src/a​rgouml/src/argouml-
app/src/org/argouml/​profile/Profile.java​

We can know that toString method returns "getDisplayName"
Therefore we should change profile.getDisplayName() -> profile for the sake of
simplicity and readability
--------------------​--------------------​---
Check if variable is null
--------------------​--------------------​---
file: ArgoUML-0.35.1-src/a​rgouml/src/argouml-
app/src/org/argouml/​uml/diagram/use_case​/ui/UMLUseCaseDiagra​m.java

line 541:
LOG.log(Level.FINE,"Dropped object NOT added {0}",figNode);

"figNode" must be null in this, consider remove or replace it.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

[argouml-issues] [Issue 6520] New - Several log refactoring/improvement suggestions chenfsd Boyuan Chen 2016-10-28 17:50:41 PDT
Messages per page: