Watch, Follow, &
Connect with Us
Public Report
Report From: JBuilder/Editor/Options    [ Add a report in this area ]  
Report #:  7425   Status: Reported
Format ALL failure - Spaces Around Binary Operator
Project:  JBuilder Build #:
Version:    10.0 Submitted By:   Petar Banicevic
Report Type:  Basic functionality failure Date Reported:  2/25/2004 3:37:30 PM
Severity:    Commonly encountered problem Last Updated: 2/25/2004 3:43:12 PM
Platform:    All platforms Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Format all fails if "Spaces Around Binary Operator" option is off !

instanceof operator must not be threated same as other operators. It is possible to remove spaces here:
int a=1;

but not in this case
if (x instance of Object)
Steps to Reproduce:
Goto to (Default) Project Properties. Goto Formatting. Goto tab Spaces.
Uncheck option "Around Binary Operator".

Open any project, open any class and insert following code:

  public void test() {
    Object x=new Object();
    if (x instanceof Object) {

Now do right mouse click and select format all. DO you see what happened ?
Did you get syntax error ? Now your code looks like:

  public void test() {
    Object x=new Object();
    if (xinstanceof Object) {

Well keyword xinstanceof does not exist. This space should not be removed !
Never use Unchecked option "Around Binary Operator".


Server Response from: ETNACODE01