Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Fix class variable typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Czernek committed Mar 21, 2020
1 parent 3dbf5a8 commit ec8ca88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/redhat/constants/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ public class Constants {
"https://github.com/m-czernek/acrobot \n\n" +
"Currently, Acrobot is testing injecting IRC acronym database into the results. For feedback, comments, or suggestions "+
"about the function, visit https://github.com/m-czernek/acrobot/pull/12";

public static final String FOUND_YAML_TEXT = "\n_Found requested acronym in the IRC database. " +
"Send @Acrobot help for more information about this feature._\n";
}
3 changes: 2 additions & 1 deletion src/main/java/com/redhat/messages/YamlAcrobotInjector.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.redhat.messages;

import com.fasterxml.jackson.databind.JsonNode;
import com.redhat.constants.Constants;
import com.redhat.entities.Acronym;
import com.redhat.entities.Explanation;
import com.redhat.persistence.YamlDal;
Expand All @@ -9,9 +10,9 @@

public class YamlAcrobotInjector {
private YamlDal dal = new YamlDal();
String res = "\n_Found requested acronym in the IRC database. Send @Acrobot help for more information about this feature._\n";

public String injectYamlAcronyms(JsonNode eventJson, String originalMessage) {
String res = Constants.FOUND_YAML_TEXT;
String requestedAcronym = eventJson.get("message").get("argumentText").asText().trim();
Set<Acronym> yamlAcronyms = dal.getAcronymsByName(requestedAcronym);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/redhat/persistence/YamlDal.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Set;

public class YamlDal {
Map<String, Map<String, String>> yamlDatabase;
private Map<String, Map<String, String>> yamlDatabase;


public YamlDal() {
Expand Down

0 comments on commit ec8ca88

Please sign in to comment.