Skip to content

Conversation

@rajput-kshitij
Copy link

@rajput-kshitij rajput-kshitij commented Oct 25, 2021

Description

Remove all the sysouts and e.printStackTrace and replace it with logback

Fixes #35

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

throw e;
} catch (Exception ex) {
ex.printStackTrace();
logger.error("Error reading rule file", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

You have missed few more printStackTrace statements:

╰$ rg 'printStackTrace()'
src/main/java/com/intuit/apl/engine/ParsingRules.java
258:          ex.printStackTrace();
266:          e.printStackTrace();

samples/helloworld/src/main/java/com/sample/apl/HelloWorld.java
68:                     e.printStackTrace();
79:                     e.printStackTrace();
89:                     e.printStackTrace();


seContext.registerFunction("getStringLen",Myclass.class.getDeclaredMethod("getmyLen",String.class));
Integer len = parser.parseExpression("#getStringLen('concretepage.com')").getValue(seContext, Integer.class);
System.out.println(len);
logger.info("Length: "+ len);
Copy link
Contributor

Choose a reason for hiding this comment

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

You have missed sysouts here:

samples/helloworld/src/main/java/com/sample/apl/HelloWorld.java
64:                     System.out.println(decision);
65:                     System.out.println(obligationList);
67:                     System.out.println("Error running hello world: "+e.getMessage());
78:                     System.out.println("Error warming up hello world: "+e.getMessage());
86:                     System.out.println(explanation);
88:                     System.out.println("Error explaining hello world: "+e.getMessage());

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.

Remove all the sysouts and e.printStackTrace and replace it with logback

2 participants