diff --git a/java/src/main/java/com/genexus/sap/SessionManager.java b/java/src/main/java/com/genexus/sap/SessionManager.java index a6415aa6f..2eb5be035 100644 --- a/java/src/main/java/com/genexus/sap/SessionManager.java +++ b/java/src/main/java/com/genexus/sap/SessionManager.java @@ -153,10 +153,10 @@ public void TransactionBegin() try { destinationName = (String)destinationObj; - scopeName = (String)scopeObj; + scopeName = String.valueOf( scopeObj); Log.info("GX SAP - Begin Transaction " + destinationName); JCoDestination destination = null; - if (scopeName.length() == 0) + if (scopeName.isEmpty()) destination = JCoDestinationManager.getDestination(destinationName); else destination = JCoDestinationManager.getDestination(destinationName, scopeName); @@ -180,12 +180,12 @@ public void TransactionCommit() try { JCoDestination destination = null; - destinationName = (String)destinationObj; - if ( scopeObject == null || ((String)scopeObject).length() == 0 ) { + destinationName = (String)destinationObj; + scopeName = String.valueOf(scopeObject); + if ( scopeName.isEmpty() ) { destination = JCoDestinationManager.getDestination(destinationName); } else { - scopeName = (String)scopeObject; destination = JCoDestinationManager.getDestination(destinationName, scopeName); } Log.info("GX SAP - Commit Transaction " + destinationName); @@ -456,4 +456,4 @@ public void setRepositoryName(String value) { repositoryName = value; } -} \ No newline at end of file +}