BadLocationException: Wrong (offset+length)
Closed this issue · 3 comments
csonuryilmaz commented
Hi, I've installed .nbm
from here. 0.1.6
I've added a .sql
file with a query:
select * from customer c where date_added >= '2021-04-26 00:00' order by date_added desc limit 3;
When I try to format, I'm getting "BadLocationException: Wrong (offset+length)" exception without formatting query.
Product Version: Apache NetBeans IDE 12.3
Java: 11.0.11; Java HotSpot(TM) 64-Bit Server VM 11.0.11+9-LTS-194
Runtime: Java(TM) SE Runtime Environment 11.0.11+9-LTS-194
System: Linux version 4.19.0-0.bpo.9-amd64 running on amd64; UTF-8; en_US (nb)
manticore-projects commented
Onur,
please try to add an Empty Line after the Statement (just one more line
break).
e.g.
select * from customer c where date_added >= '2021-04-26 00:00' order
by date_added desc limit 3;
The error is thrown by netbeans, not by my code. So I need a bit time
to understand, why/what is happening there.
Thanks for reporting.
Cheers
Andreas
…On Sat, 2021-05-01 at 07:12 -0700, Onur Yılmaz wrote:
Hi, I've installed .nbm from here. 0.1.6 I've added a .sql file with
a query:
select * from customer c where date_added >= '2021-04-26 00:00' order
by date_added desc limit 3;
When I try to format, I'm getting "BadLocationException: Wrong
(offset+length)" exception without formatting query.
Product Version: Apache NetBeans IDE 12.3
Java: 11.0.11; Java HotSpot(TM) 64-Bit Server VM 11.0.11+9-LTS-194
Runtime: Java(TM) SE Runtime Environment 11.0.11+9-LTS-194
System: Linux version 4.19.0-0.bpo.9-amd64 running on amd64; UTF-8; en_US (nb)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
csonuryilmaz commented
manticore-projects commented
Fixed via funfried/externalcodeformatter_for_netbeans/#147
In the meantime, you can download a snapshot NBM from here: https://github.com/manticore-projects/jsqlformatter/releases/download/0.1.6/externalcodeformatter-sql.nbm