Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIP Changes - Draft PR #983

Open
wants to merge 75 commits into
base: mappings
Choose a base branch
from
Open

ZIP Changes - Draft PR #983

wants to merge 75 commits into from

Conversation

sania-16
Copy link
Contributor

@sania-16 sania-16 commented Dec 8, 2024

No description provided.

@sania-16 sania-16 requested a review from sonalgoyal December 8, 2024 07:51
import java.util.HashMap;
import java.util.Map;

public class MatchTypes {

Check warning

Code scanning / PMD

This utility class has a non-private constructor Warning

This utility class has a non-private constructor

public static Map<String, IMatchType> allMatchTypes;// = new HashMap<String, IMatchType>();

protected MatchTypes(){

Check warning

Code scanning / PMD

Document empty constructor Warning

Document empty constructor
Comment on lines +28 to +30
if (allMatchTypes == null) {
allMatchTypes = new HashMap<String, IMatchType>();
}

Check warning

Code scanning / PMD

Singleton is not thread safe Warning

Singleton is not thread safe
}

public static String[] getAllMatchTypes() {
IMatchType[] zo = allMatchTypes.values().toArray(new IMatchType[allMatchTypes.size()]);

Check warning

Code scanning / PMD

This call to Collection.toArray() may be optimizable Warning

This call to Collection.toArray() may be optimizable
@@ -122,7 +122,7 @@

@JsonIgnore
public boolean isDontUse() {
return (matchType != null && matchType.contains(MatchType.DONT_USE));
return (matchType != null && matchType.contains(MatchTypes.DONT_USE));

Check warning

Code scanning / PMD

Useless parentheses. Warning

Useless parentheses.
@@ -23,8 +24,8 @@

//add first stopWordRemover
List<FieldDefinition> fdList = new ArrayList<FieldDefinition>(4);
ArrayList<MatchType> matchTypelistFuzzy = new ArrayList<MatchType>();
matchTypelistFuzzy.add(MatchType.FUZZY);
ArrayList<IMatchType> matchTypelistFuzzy = new ArrayList<IMatchType>();

Check warning

Code scanning / PMD

Avoid using implementation types like 'HashMap'; use the interface instead Warning test

Avoid using implementation types like 'ArrayList'; use the interface instead
* product descriptions
*/
TEXT("TEXT"),
public MatchType(){

Check warning

Code scanning / PMD

Document empty constructor Warning

Document empty constructor

public interface IPreprocTypes {

public final static IPreprocType STOPWORDS = new PreprocType("stopwords");

Check warning

Code scanning / PMD

Unnecessary modifier 'private' on constructor 'LabelMatchType(Double, String)': enum constructors are implicitly private Warning

Unnecessary modifiers 'public static final' on field 'STOPWORDS': the field is declared in an interface type

String name;

public PreprocType(){

Check warning

Code scanning / PMD

Document empty constructor Warning

Document empty constructor
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PMD found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Nitish1814 and others added 14 commits January 3, 2025 13:17
* blocking tree changes

* moved the set logic to block

* reverted back tests

* reverted back test data

* removed unused code

* added back commented code

* ftd changes

* refactor

* simplified if-else

* removed unused imports

* ftd changes

* changed absolute path

* refactored class naming

* config changes

* changed tot this()
* blocking tree changes

* moved the set logic to block

* reverted back tests

* reverted back test data

* removed unused code

* added back commented code

* ftd changes

* refactor

* simplified if-else

* removed unused imports

* ftd changes

* changed absolute path

* refactored class naming

* config changes

* changed tot this()

* changes directory structure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants