Space char. added in Java source

Hello, when opening a Java Source in schema browser or in editor, a space character is added in the code.

Code as written and compiled (via Toad) :

SET DEFINE OFF;
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "boncom/XXXXX"
as package boncom;
...

Code when reopened in editor :

SET DEFINE OFF;
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "boncom/XXXXX"
as package bon com;
...

Notice in the last line : package bon com instead of package boncom. This extra space breaks the code. It's very painful to remove it each time I open a Java source (and very error prone).

Checking in database :

select text
  from user_source 
  where type = 'JAVA SOURCE' 
        and name = 'boncom/XXXXX'
        and line = 1

Result :

package boncom;

I even checked in hex to see if there is a special character in that line of code. The response is no.

For information, here are the script options :
image

And DB version :
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production

Thank you in advance for your help.

Workaround : adding a comment on the first line so code doesn't break each time it's opened

SET DEFINE OFF;
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "boncom/XXXXX"
as // ----->>><<< 

The space will be added between >>> and <<< but it will be harmless.

Hello,

I can reproduce this and will fix it. Thanks.

-John

1 Like