fabric-chaincode-java icon indicating copy to clipboard operation
fabric-chaincode-java copied to clipboard

refactor: Modernize ChaincodeBase class

Open bhaskar-allam opened this issue 1 year ago • 1 comments

refactor: Modernize ChaincodeBase class

  • Utilize Java 8+ features like lambda expressions and Optional
  • Implement try-with-resources for better resource management
  • Improve logging with concise lambda expressions
  • Use switch expressions for cleaner level mapping
  • Enhance environment variable processing
  • Implement text blocks for multi-line string formatting
  • Streamline StreamObserver implementations
  • General code cleanup and organization improvements

Signed-off-by: Bhaskar Allam [email protected]

bhaskar-allam avatar Oct 21 '24 13:10 bhaskar-allam

@bestbeforetoday I've added recent changes for compatibility for Java 8, please review it.

bhaskar-allam avatar Oct 29 '24 02:10 bhaskar-allam

The build is failing since the code does not even compile.

Looking at the current set of changes (after the use of language features not available in Java 8 are reverted), the vast majority of the changes are reformatting of the code. A couple of variables are renamed and, in a couple of cases, the logic flow of the code is slightly reordered. What issue is this change addressing?

bestbeforetoday avatar Nov 03 '24 13:11 bestbeforetoday

No response so closing.

bestbeforetoday avatar Nov 18 '24 09:11 bestbeforetoday