Opened 5 years ago

Closed 4 years ago

#176 closed enhancement (fixed)

petascope.wcps.* packages to use String constants

Reported by: pcampalani Owned by: arezaeim
Priority: minor Milestone: 8.4
Component: petascope Version: 8.3
Keywords: Cc:
Complexity:

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 Changed 5 years ago by dmisev

  • Owner changed from dmisev to arezaeim
  • Status changed from new to assigned

comment:2 Changed 5 years ago by dmisev

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 Changed 5 years ago by pcampalani

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 Changed 5 years ago by dmisev

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

comment:5 Changed 5 years ago by arezaeim

Working on it. Few files remained.

comment:6 Changed 4 years ago by dmisev

I suppose it can be closed?

comment:7 Changed 4 years ago by arezaeim

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.