BUG: 10.1.3 EA1 - Refactor errors when handling arrays

Hi,
I declare my arrays like this:
int n[];
Rather than the way JDeveloper likes it:
int[] n;
So when JDeveloper refactors my code I either get too many [] or not enough.
E.g, JDeveloper makes a method out of some code, or moves definitions up the class hierarchy and it ends up like this:
int[] n[];
Its like it knows it's an array so it writes "int[]" then it writes the variable as it originally found it "n[]". I have also seen it drop the [] in a method parameter argument that was an array.
JDeveloper should preserve my definitions the way they were or at least get them right if it insists on changing it to its own style.
Regards,
Simon.

Thanks for looking into it.
You have to split the array definition from the method code so that it has to pass the array as a parameter.
E.g.
String s;
Object i[] = new Object[3];
if(i==null || i.length == 0)
s = "i is null";
System.out.println(s + i.toString());
Leave the definitions behind and just make a method of just the if statement. Mine generated:
String s;
Object i[] = new Object[3];
s = test(i);
System.out.println(s + i.toString());
and
private String test(Object i)
String s;
// TODO type initialisation here
if(i==null || i.length == 0)
s = "i is null";
return s;
Note that 'int i' is wrong and causes the syntax errors.
If you change the definition to "int[] i;" it works OK.
It also works if you include the definition (as it was) in the refactor code.
The indenting of the new method was mucked up too. Not as shown here because this forum strips out all leading blanks. Indenting appears to get mucked up if you have set the tabstop and indent set to 4 in the preferences. A 'reformat' fixes it.
Cheers,
Simon.

Similar Messages

  • Bug or error when handling leap years with WDS/DS

    Hi all,
    I discovered a difference in outcome with Build and Debug (without screens) and Build and Debug with Web Determinations or Determinations Server when calculating days within leap years.
    I use the function DayDifferenceInclusive to calculate the amount of days in an insurance period.
    the amount of days of the insurance period = DayDifferenceInclusive(the start date of the insurance, the end date of the insurance)
    With the regression tester or Build and Debug (without screens) I get the following outcome for the following input:
    *93 = DayDifferenceInclusive(02-29-2008, 05-31-2008)*
    When we use Web Determinations or Determinations Server we get the value of *92* for the exact same input data when it should be 93.
    Is this a bug in the java code? How can we fix this or is there a work around for it?
    We're in the middle of System Integration Testing for a huge project so help is much appreciated!
    Best regards,
    Niels Roest

    Niels,
    thanks for that - and it looks like in the Netherlands daylight savings started on the 30th of March 2008, which as far as I know is the trigger for this error.
    I have reproduced the issue against 10.1 using the period 01 October 2010 to 30 October 2010, which contains the date that daylight saving started in Australia.
    As for ways to work around the issue, I can offer 3:
    * wait for 10.2 - it's in beta at the moment (though given your opening comments, this might not be an option for you)
    * set your server locale to one that doesn't have DST
    * work around the issue in rules:
    Firstly, the issue is that the shipping version fails because it doesn't take into account that one of the days is shorter than the standard 24 hours.
    The trick is to replace the DayDifference function with the HourDifference function and round to the nearest number of days.
    So given a rule that looks like:
    the result = DayDifference(date one, date two)
    it can be rewritten as:
    The result = round(HourDifference(date one at 00:00:00, date two at 00:00:00) / 24, 0)
    * the whole "at 00:00:00" is necessary because HourDifference works on datetimes, not dates.
    Sorry for the hassle.
    Regards
    Andrew

  • Bug Report: Lr3 does not report error when SDK version is too low.

    Lr3 should report an error if SDK is under-version'd. For example, I have this in one of my plugins:
        LrSdkVersion = 2.0,
        LrSdkMinimumVersion = 2.0, -- minimum SDK version required by this plugin.
    If I put Lr3.0 specific stuff in the plugin, Lr3 does not report an error, but it should - otherwise whats the point in specifying a version.
    I have to take the plugin into Lr2 to test for inadvertent Lr3 specific inclusion mistakes. Thank goodness I'm not worrying about Lr1...
    Rob

    Hi ,
    Could you please helping me out on finding the Patches (SP4,SP5)?
    ans also i have tested very oftenly, that my log in credentials are seems to be fine since its working for other reports too.
    With Hunting,
    MAK

  • Error when handling rejections

    Hi experts,
    This is relative to Mobile Infrastructure 7.1 SP8.
    I have a scenario where the client wants to upload to the backend only orders that are finalized. In our Data Object Node we created an BOOL attribute 'finalized', in the client this status is setted when needed. If the order is not finalized, the changes made on client (such as 'description' and 'hours spent') can´t be lost on close the mobile client and can´t either go to backend until this order is finalized.
    In this [Thread|; I asked for possible solutions for this issue and got a solution. In this solution I changed my BAPI Wrapper modify to handle a rejection when the order is not finalized:
    IF ( ORDERHEADER-FINALIZED = 1 ).
      UPDATE ZORDERS
      SET HOURS_SPENT = ORDERHEADER-HOURS_SPENT
        FINALIZED = ORDERHEADER-FINALIZED
        DESCRIPTION = ORDERHEADER-DESCRIPTION
      WHERE ID = ORDERHEADER-ID.
    ELSE.
      LTYPE = 'E'.
      LCL = 'not_finalized'.
    ENDIF.

    In the mobile client I followed this Document which describes how to handle rejections on mobile client.  My rejection implementation is that:
    public void getOrdersRejections() {
    //@@begin getOrdersRejections()
      RejectionRepository rr = OcaRoot.getInstance().getSyncManager().getRejectionRepository();
      Ordem_srvModel model = ((Ordem_srvModel) OcaRoot.getInstance().getModel(Ordem_srvModel.class));
      Collection rejections = rr.getRejections((OcaModel) model);
      forRejections : for (Iterator iterRejections = rejections.iterator(); iterRejections.hasNext();) {
        Rejection rejection = (Rejection) iterRejections.next();
        if (rejection.getRejectionState() != RejectionState.INITIAL) {
          continue forRejections;
        // If there is at least one normal rejection, accept server version.
        for (Iterator iterInfo = rejection.getRejectionInfos(); iterInfo.hasNext();) {
          RejectionInfo info = (RejectionInfo) iterInfo.next();
          if (!"not_finalized".equals(info.getMessageClass())) {
            rejection.acceptServerVersion();
            wdContext.nodeordem_srv().nodegetOrders().reload();
            rejection.delete();
            continue forRejections;
        // There was no normal rejection, only mine, accept client version.
        rejection.acceptClientVersion();
        wdContext.nodeordem_srv().nodegetOrders().reload();
        rejection.delete();
    //@@end
    I tested changing only the order description on client and sync, this scenario was sucessfull, the description wasn´t updated on backend. I tested changing the order description and I finalized the order and sync, this scenario was sucessfull also, the description and the 'finalized' attribute went updated on backend.
    In the third scenario, when I updated description on client and on server, after sync the object on client went in an invalid state, I could not update anymore, receiving this message on NWDS console:
    java.lang.IllegalStateException: Cannot update row in status - 4
      at com.sap.tc.mobile.cfs.sync.InternalSyncState.update(InternalSyncState.java:27)
    Any ideia?

  • [Windows] file.url throw error when application executable in root directory

    Here is the bugbase ticked: Bug#3940278 - [Windows] file.url throw error when application executable in root directory
    If you launch AIR application packaged as bundle from root directory and try to get url property of any file you get IllegalOperationError.
    No matter what file url property you try to get.
    It's a big problem when you distribute your application on CD disks or flash drive.
    I'd like to ask everyone affected by this issue to take a minute and vote for the following bug.
    Thanks.

    I checked all deployment descriptions and there are no references to t3://localhost:7001. Few months back, I had the complete clustering setup working on 2 machines and now when I deploy my application on same configuration, it fails with t3://localhost:7001 unreachable error. I created a new cluster configuration on one machine with 2 managed server and it deploys fine. Can not figure out what has changed ?

  • Error when calling inbound proxy

    Hi all,
    I´m facing the following problem in the R/3 monitoring:
    <SAP:Code p1="Request Message" p2="CX_XSLT_RUNTIME_ERROR" p3="/1SAI/XS00000000000000000035: 0000000000" p4="Error Text: No valid source context supplied Kernel ErrorId: CX_XSLT_RUNTIME_ERROR">APPLICATIONCALL.PARSE_APPLICATION_DATA</SAP:Code>
      <SAP:Text language="EN">Error when handling Request Message; XSLT error: CX_XSLT_RUNTIME_ERROR: XSLT program and source line: /1SAI/XS00000000000000000035: 0000000000; Error Text: No valid source context supplied Kernel ErrorId: CX_XSLT_RUNTIME_ERROR</SAP:Text>
      </SAP:ErrorHeader>
    I'm pulling a file from an external server and I pass the data to R/3 thru ABAP proxies. The point is that I am splitting the message in different parts, using the parameter Recordsets per Message, and mostly all of them are processed correctly, but in a few of them i´ve got that error. And if I process that parts of the file, that have caused the error, separately, they surprisingly work fine..
    I really do not know what happens and i really need help because I do not know what else to try or what could be the reason of this error.
    Thanks a lot!!

    the problem is INbound Message and the proxy genereted are not compatiable, can u check the field "S00000000000000000035: 0000000000;" whch field is atking this value from file, while passing to the R/3 check the lengths of this field....you will not c this error in MM, but you have to chcek the length of each field in proxy with data coming.......
    copy the payload from SXMB_MONI and directly try to send the data from SPROXY you will get the error detail....
    U can refer to the following thread where they has the same exception APPLICATIONCALL.PARSE_APPLICATION_DATA( b'cos of improper date formats...)So urs should also be a simlilar problem i guess..
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D44%26threadID%3D45455

  • APEX bug:9879227 (ORA-01403: no data found error when using validations)

    Hi,
    We are getting the
    ORA-01403: no data found error
    when the APEX page has validations AND a tabular form is also present on the page.
    I did see a couple of other forum links discussing the issue (bug id: 9879227 ?? ).
    But what i want to get a confirmation on is, in which release was this bug really fixed ?
    i see the release notes of 4.0.1.00.03 claiming that it is fixed
    in the release.
    we are on 4.0.1.00.03. is this bug really solved in release 4.0.1.00.03?
    are there any known work-arounds ? i tried re-creating the report multiple times, but that did not help.
    Any suggestions or work-arounds will greatly help us.
    Regards,
    Ramakrishnan

    Ramakrishnan,
    If you are talking about getting no data found when trying to save the report then take a look at the last message in this thread:
    {message:id=9971445}
    Cheers,
    Tyson Jouglet

  • [svn:bz-trunk] 21394: bug fix for watson 2887837 Not getting duplicate session detected error when same flex client id is used from two different HTTP sessions in CRX .

    Revision: 21394
    Revision: 21394
    Author:   [email protected]
    Date:     2011-06-16 12:34:13 -0700 (Thu, 16 Jun 2011)
    Log Message:
    bug fix for watson 2887837 Not getting duplicate session detected error when same flex client id is used from two different HTTP sessions in CRX.
    get the sessions id before we invalidate the duplicate session.
    Checkintests pass
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseHTTPEndpoint.java

    For our profect I think this issue was caused as follows:
    Believing that remoting was full asynchronous we fired a 2 or 3 remote calls to the server at the same time ( within the same function ) - usually when the users goes to a new section of the app.
    This seemed to trigger the duplicate http session error since according to http://blogs.adobe.com/lin/2011/05/duplication-session-error.html  two remote calls arriving before a session is created will cause 2 sessions to be created.
    Our current solution ( too early to say it works ) is to daisy chain the multiple calls together .
    Also there seemed to be an issue where mobile apps that never quit ( thanks Apple! )  caused the error when activated after a few hours.
    I guess the session expires on the server and the error above occurs on activation.
    So the mobile apps now ping the server with a remote call when activated after sleeping for more than one hour.
    All duplicate http errors are silently caught and reported.
    Fingers crossed we won't get any more!

  • [svn] 1774: Bug: BLZ-176 - Not getting an authentication error when Producer tries to send a message over streaming channel with insufficient credentials .

    Revision: 1774
    Author: [email protected]
    Date: 2008-05-16 13:29:10 -0700 (Fri, 16 May 2008)
    Log Message:
    Bug: BLZ-176 - Not getting an authentication error when Producer tries to send a message over streaming channel with insufficient credentials.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: This was caused by the fact that streaming channels do not report connected until the initial ping completes and a URLStream is established with the server. Added some extra code in ChannelSet to make sure authentication errors are reported with correct faultCode even if the channel is not reporting connected.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-176
    Modified Paths:
    flex/sdk/branches/3.0.1.x/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

    Revision: 1774
    Author: [email protected]
    Date: 2008-05-16 13:29:10 -0700 (Fri, 16 May 2008)
    Log Message:
    Bug: BLZ-176 - Not getting an authentication error when Producer tries to send a message over streaming channel with insufficient credentials.
    QA: Yes
    Doc: No
    Checkintests: Pass
    Details: This was caused by the fact that streaming channels do not report connected until the initial ping completes and a URLStream is established with the server. Added some extra code in ChannelSet to make sure authentication errors are reported with correct faultCode even if the channel is not reporting connected.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-176
    Modified Paths:
    flex/sdk/branches/3.0.1.x/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

  • Activity log for bug 278860: confusing "profile in use"/"already running" error when profile is missing (not found) did anyone find a fix for this? Thanks, Edie

    bug 278860: confusing "profile in use"/"already running" error when profile is missing (not found)
    Apparently the profile .default is missing. Therefore the bug 278860 is activated and I can't start Firefox. Is there a solution?

    I did some googling and found alot of topics from you on this issue, to me it simply seems like on of the connectors is broken or loose.

  • Unexpected (Bug?) Compile error when DataGridColumn has 'id' in Repeater

    When I attempt to create a small number of DataGrid controls
    with a Repeater, I get the following compile error message:
    Unable to generate initialization code within Repeater, due to
    id or data binding on a component that is not a visual child.
    Here is the minimal amount of MXML that generates the compile
    error:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:ArrayCollection id="myAC"/>
    <mx:ArrayCollection id="headersAC"
    source="{headers.header}"/>
    <mx:Model id="headers">
    <headers>
    <header>Header 1</header>
    <header>Header 2</header>
    <header>Header 3</header>
    <header>Header 4</header>
    </headers>
    </mx:Model>
    <mx:VBox>
    <mx:HBox>
    <mx:Repeater id="repeater1"
    dataProvider="{headersAC}">
    <mx:DataGrid id="datagrid1" width="125" height="210"
    dataProvider="{myAC}">
    <mx:columns>
    <mx:DataGridColumn
    id="anything"
    headerText="{repeater1.currentItem.header}"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Repeater>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>
    <mx:DataGridColumn/> compiles correctly.
    <mx:DataGridColumn
    id="anything"/> receives the compile error message above.
    <mx:DataGridColumn
    headerText="{repeater1.currentItem.header}"/> receives
    the compile error message above.
    I'd like to be able to address the repeating DataGridColumns
    via their id array. I'd also like to be able to assign the
    headerText to each of the DataGridColumns at initialization.
    There is a claim of a workaround at Nischal's blog:
    Referencing components inside
    the mx:Repeater, but there is no source code to show how to do
    this.
    He says:
    quote:
    Recently when I was working on Flex application and found
    that there is an issue with the columns of DataGrid, which is
    defined inside the repeater. Flex throws following error when you
    try to assign id or data binding values to DataGridColumn
    “Unable to generate initialization code within
    Repeater, due to id or data binding on a component that is not a
    visual child.”
    Which means if you want to assign dynamic value to say
    HeaderText of the column then you cannot use dynamically or id to
    assign value. Work around to this issue is to use columns array of
    datagrid to define the value. Click
    here
    to see the example and source code to use the column of the
    DataGrid.
    I'm not sure what "...use columns array of datagrid to define
    the value..." means.
    Any ideas on the workaround for this problem?

    Peter:
    You can see the example on
    Refrencing
    Datagrid and right click to view source.
    Regards,
    Nischal Pathania
    blog.nischal.com

  • Why am I getting Run-time menu error (Error 88 occurred at One or more illegal menu item index in...) in my built applicatio​n (single .exe) , but don't get any error when running/de​bugging it?

    I am using LabVIEW 6.02 & also downloaded the application builder patch. For my runtime menus, I've a subVI that first calls "Delete Menu Items.vi" to get rid of the standard menu items and then "Insert Menu Items.vi" to add my own. I only get an error when I try to run the built application.

    There was a similar issue in LabVIEW 5.0 where you would get the error if you passed an empty array to the 'items' input of Delete Menu Items. This was corrected in version 5.0.1. Did you mass compile your VI's after upgrading to version 6.0.2?
    I tried to reproduce the problem in a small VI but was not successful. I can run an executable built from this example without any problems. I am attaching it for you to test.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect
    Attachments:
    menu.llb ‏33 KB

  • Runtime Error when starting Lightroom

    I'm currently on day 12 or so of my trial with Lightroom. I've spent quite a few hours getting to know LR by retouching and cataloging over 8 years of photos. So far, aside from a few in-program bugs that I found a way to work around, I've been super-happy with it (especially the powerful keywording/metatagging system: amazing!) and have been really seriously coughing up the huge wad of $$ when the trial's done. But....
    For no reason, LR started giving me a Runtime Error when I tried to start it. Something along the lines of "This application requested Runtime to terminate it unusually."
    So off to Google I went, where I knew I could probably search that error and fix it like I've done with countless other programs. Unfortunately nothing is working.
    Here are the facts:
    --I'm running a fully patched Vista machine.
    --LR worked fine earlier this morning. I had 1.4 and didn't perform any upgrades or maintenance to it (that I know of) when it just gave me the error out of the blue today when I tried to start it.
    --I tried holding CTRL when I start it, and it still gives the error.
    --I tried deleting a .lock file (which did exist) but it still wouldn't start.
    --I tried running the "repair" tool in the install...no good.
    --I uninstalled LR, d/led it again, and re-installed it. IT WORKED!....one time. I was able to run it, checked to make sure my cataloging was still intact (it was - phew!) and even deleted a folder I didn't want in it. Then I closed it. I tried re-opening it a few hours later and I got the SAME ERROR!
    I sure hope someone can help because I'm at my wit's end.

    This is disgusting. I've pounded away for over 4 hours and I finally found a workaround. Here's the original post that had my answer:
    http://www.adobeforums.com/webx/.3c05ac2f
    The short of the story: if I put lightroom.exe into Windows XP compatibility mode" it will work. (To do that, for anyone else who comes across this, you just right-click your lightroom icon, click PROPERTIES, and go to the Compatibility tab and check the box next to "Run this program in compatibility mode for:" and select "Windows XP (Service Pack 2)")
    I've loaded it up half a dozen times and it's still working perfectly as far as I can tell. Hopefully it won't hurt anything keeping it in that mode.
    I'm glad this happened early enough into my trial that I'll have ample opportunity to see if it repeats itself. I'm not keen on sinking $300 into software that will give me ulcers as I troubleshoot problems like this.

  • Color picker does not work, " program error when I click, photoshop cc

    I am user of photoshiop cc and it worked fine until several days ago but suddenly it shows " program error " when I click color picker, and I can not use changing color. Please help me to resolve this issue.

    There was a bug with photoshop CC concerning the color picker and its swatches. Make sure you have the latest version and then if it still exists, reset your tools in the upper left hand corner which would be the very first icon in the top tool bar. That should fix it. If not let us know and maybe someone can think of something else.

  • Error when creating index with parallel option on very large table

    I am getting a
    "7:15:52 AM ORA-00600: internal error code, arguments: [kxfqupp_bad_cvl], [7940], [6], [0], [], [], [], []"
    error when creating an index with parallel option. Which is strange because this has not been a problem until now. We just hit 60 million rows in a 45 column table, and I wonder if we've hit a bug.
    Version 10.2.0.4
    O/S Linux
    As a test I removed the parallel option and several of the indexes were created with no problem, but many still threw the same error... Strange. Do I need a patch update of some kind?

    This is most certainly a bug.
    From metalink it looks like bug 4695511 - fixed in 10.2.0.4.1

Maybe you are looking for

  • HT1635 How do i find the make of my Macbook Pro?

    How do I find the make of my MacBook Pro 13-inch, Mid 2010?

  • SP_Validation Payment sereis with payment means

    Hi, I am trying to do a validation using the stored procedure,but it doesnt work. I have document series for cash->CH09 and check->CQ09 in outgoing payment. Now if the user choose the Cash series,only thorugh cash-payment means the document should be

  • Printing for stitching

    Hi guys, Maybe I'm just being dumb here but I've created an 8 page document that I want printed on A3 and folded and stitched so each page is A4 (in effect). How can I arrange the pages prior to printing so page 8 and 1 print on a sheet, 2 and 7, 6 a

  • Error Code 8003 with empty trash command

    I am trying to empty trash and getting an error code -8003. I have deleted some very large iphot folders to free up disk space after moving them to a detached drive.  To complete the task, I am trying to empty trash. After about 30 seconds, I get an

  • FB4 (release) will not start up - has anyone experienced this, too? (x-posted)

    My apologies for cross-posting but the other Flash Builder forum seems to get very little traffic. In a nutshell, when starting up FB4 (release) on OS X 10.5.7, it shows a window stating "An error has occurred." telling me to go look at the log and p