Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Comments

Predictive custom service for user defined functions#8

Open
Smriti-Roy wants to merge 5 commits intomainfrom
feature/PredictiveCustomService
Open

Predictive custom service for user defined functions#8
Smriti-Roy wants to merge 5 commits intomainfrom
feature/PredictiveCustomService

Conversation

@Smriti-Roy
Copy link

No description provided.

@Smriti-Roy Smriti-Roy self-assigned this Jun 3, 2020
@CLAassistant
Copy link

CLAassistant commented Sep 4, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@marco-porru marco-porru left a comment

Choose a reason for hiding this comment

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

is it still relevant?

private static File configProperties = null;
private static OS_ARCH OSArch = OS_ARCH.NONE;

//public static String LOG_LEVEL_STRING = "INFO";
Copy link
Contributor

Choose a reason for hiding this comment

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

remove commented code


/*
* Helper function used by the entire application
* TODO: replace with log4j
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we already use log4j instead of putting the TODO?

BoilerPredictiveActivator.printlnDebug("--- new service = " + serviceRef );

BoilerPredictiveActivator.printlnDebug("---- context = " + BoilerPredictiveActivator.bundleContext);
//BoilerPredictiveActivator.printlnDebug("end of this.service");
Copy link
Contributor

Choose a reason for hiding this comment

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

remove commented code

try {
BoilerPredictiveActivator.persistenceClient = new PersistenceClient(BoilerPredictiveActivator.service, BoilerPredictiveActivator.bundleContext);
} catch (PersistenceException e) {
// TODO Auto-generated catch block
Copy link
Contributor

Choose a reason for hiding this comment

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

remove automatic generated TODO

} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
BoilerPredictiveActivator.println("ERROR: Could not get token for database. Engine not started.");
Copy link
Contributor

Choose a reason for hiding this comment

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

log the exception or rethrow it

// inner class
////////////////////

// private class RowLine {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove commented code

if (statementObject.hasResultList()) {
StringBuffer s = new StringBuffer();
statementObject.getResultList().forEach((row) -> {
//RowLine rowFormated = new RowLine(" " + rowIndex + " : ");
Copy link
Contributor

Choose a reason for hiding this comment

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

remove commented code

private String getBundleCanonicalName( BundleContext bundleContext ) {
BoilerPredictiveActivator.printlnDebug("bundleContext = " + bundleContext.toString());
String bundleCanonicalName = "test";
// try {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comment



private boolean exists( String storedProcedureName ) throws PersistenceException {
String query = String.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid potential sqlinjection:

https://www.baeldung.com/sql-injection

return rc;
}

String query = String.format(
Copy link
Contributor

Choose a reason for hiding this comment

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

avoid potential sqlinjection:

https://www.baeldung.com/sql-injection

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants