Opened 12 years ago

Closed 12 years ago

#176 closed enhancement (fixed)

petascope.wcps.* packages to use String constants

Reported by: Piero Campalani Owned by: Alireza
Priority: minor Milestone: 8.4
Component: petascope Version: 8.3
Keywords: Cc:
Complexity: Medium

Description

All String constants used by the WCPS should be collected in one place.

For instance:

  • petascope.wcps.grammar.NumericScalarExpr.java
            if (op.equals("sqrt")) {
                function = "numericSqrt";
    
  • petascope.wcps.server.core.NumericScalarExpr.java
            if (name.equals("numericSqrt")) {
                op = "sqrt";
    

Mind ([1]):
Rule 11: The names of constants must be all uppercase letters, words must be separated by underscores ("_").

[1] http://rasdaman.eecs.jacobs-university.de/trac/rasdaman/wiki/CodeGuideRules

Change History (7)

comment:1 by Dimitar Misev, 12 years ago

Owner: changed from Dimitar Misev to Alireza
Status: newassigned

comment:2 by Dimitar Misev, 12 years ago

So Alireza, basically you go through the code in petascope.wcps.* and collect all literals into constants on one place, maybe in petascope.util.WCPSConstants

comment:3 by Piero Campalani, 12 years ago

Right, or either distributed inside each of the sources in petascope.wcps.grammar, then let the methods in petascope.wcps.server.core refer to them.

comment:4 by Dimitar Misev, 12 years ago

Can we close it Ali? I saw a few patches, is it completed?

comment:5 by Alireza, 12 years ago

Working on it. Few files remained.

comment:6 by Dimitar Misev, 12 years ago

I suppose it can be closed?

comment:7 by Alireza, 12 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.