Skip to content

Commit

Permalink
fix #40
Browse files Browse the repository at this point in the history
  • Loading branch information
organics2016 committed Aug 14, 2024
1 parent fcf403b commit 68c8711
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public class POJO2JSONParser {

private final ParserContext templateParserContext = new TemplateParserContext();

private final SettingsState settingsState = SettingsState.getInstance();

public POJO2JSONParser() {
}

Expand Down Expand Up @@ -138,14 +136,14 @@ private String parseFieldKey(POJOField pojoField) {
}
}

Expression expression = expressionParser.parseExpression(settingsState.fieldNameSpEL, templateParserContext);
Expression expression = expressionParser.parseExpression(SettingsState.getInstance().fieldNameSpEL, templateParserContext);
return expression.getValue(EvaluationContextFactory.newEvaluationContext(pojoField), String.class);
}

private Object parseFieldValue(POJOVariable pojoVariable) {

PsiType type = pojoVariable.getPsiType();
Map<String, String> psiTypeExpression = settingsState.classNameSpELMap;
Map<String, String> psiTypeExpression = SettingsState.getInstance().classNameSpELMap;

if (type instanceof PsiPrimitiveType) { //primitive Type

Expand Down

0 comments on commit 68c8711

Please sign in to comment.