Interesting problems with the 1.2.2 Debugger and String.substring(int)

Guys/Gals,
Here's an interesting problem to ponder...
I define the following values in my class:
private String descriptorClassName = null;
private String userObjectClassName = null;
private String name = null;
I run the following piece of code as part of the constructor:
descriptorClassName = this.getClass().getName();
userObjectClassName = descriptorClassName.substring(0, descriptorClassName.indexOf("Descriptor"));
name = userObjectClassName.substring(userObjectClassName.lastIndexOf(".")+1);
The first line assigns the value of "com.foo.user.UserDataDescriptor" to descriptorClassName.
The second line assigns the value of "com.foo.user.UserData" to userObjectClassName.
The third line assigns the value of "UserData" to name.
As I step through the code, I see the first two values being set, and yet the third value for name is reported by the debugger as:
"name = null".
I added a call to log4j, which reports that that value of name has been correctly set!
This seems to be a result of the String.substing(int) call, as the call to Sring(substring(int, int) is fine.
Has anyone come accross this one before?
Does anyone have any workarounds other than:
name = userObjectClassName.substring(userObjectClassName.lastIndexOf(".")+1, userObjectClassName.length());
Cheers all.
Regards,
Chris.

I've been trying to reproduce this problem and it always works perfectly. The debugger tells me that name = "UserData". I'm using JDev 3.2.2 and my project is using JDK1.2.2_JDeveloper. Here's the exact source code I'm trying.
package com.foo.user;
public class UserDataDescriptor {
private String descriptorClassName = null;
private String userObjectClassName = null;
private String name = null;
public UserDataDescriptor() {
descriptorClassName = this.getClass().getName();
userObjectClassName = descriptorClassName.substring(0, descriptorClassName.indexOf("Descriptor"));
name = userObjectClassName.substring(userObjectClassName.lastIndexOf(".")+1);
System.out.println("end of constructor");
public static void main(String[] args) {
UserDataDescriptor userDataDescriptor = new UserDataDescriptor();
null

Similar Messages

  • With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    With my i phone 4 , the Push notifications doesn't work for apps like (fb viber , whatsapp etc ) it only works for the official apps like message  even when im using the phone, has  this probleme with the iOs 6.0.1 and also with the iOs 6.1

    This isn't an issue. Notice the screen prior to the one that shows usage has an iCloud section and a Manage Storage button. For this button to activate ios needs to download a few kb from icloud. Switching back to this screen forces ios to download those few kb.

  • I  have a problem with the synchronisation of my iPhone and iPad with Outlook 2007 on my 64-bit Windows 7  PC. For several years, I have had no problems with the synchronisation by cord connection and iTunes between these programmes. However, a few months

    I  have a problem with the synchronisation of my iPhone and iPad with Outlook 2007 on my 64-bit Windows 7  PC. For several years,
    I have had no problems with the synchronisation by cord connection and iTunes between these programmes. However, a few months ago I decided to use Mobile Me. However, there were problems with duplication of calendars and then “rogue events” – which could not be deleted – even if deleted on Outlook and on the iPhone (or both at the same time) – they would just reappear after the next synchronisation.  All other synchronisation areas (eg Contacts, Notes etc) work fine.
    I have looked for help through the Apple Support Community and tried many things.  I have repaired my Outlook. I have repaired my .pst file in Windows. I have re-installed the latest version of iTunes on my PC. I have re-installed the firmware on my iPhone. I have tried many permutations on my iPhone. I have closed down all Mobile Me functions on the iPhone. I have spent upwards of 24 hours trying to solve this problem.
    What am I left with? Outlook works seamlessly on my PC. My iPhone calendar now has no events from  my calendar, but does not synchronise through iTunes. Nor does it send events initiated on the iPhone to the Outlook. I am at the point of abandoning iPhones and iPads altogether.  I need to have a properly synchronising calendar on my phone.  Do you have any suggestions?

    In the control panel goto the "Lenovo - Power Manager" and click the battery tab, there is a maintenance button in there that will let you change the charging profile for your battery.   (from memory, so exact wording may be off)
     The lower the numbers you use there, the longer the battery *should* last.    These batteries degrade faster at higher charge levels, however storing them at too low of levels is also not good for them... I've read that 40% is optimal, but just not realistic if you use your computer.
    --- ThinkPad T61 / Win 7 / Core 2 / 4gb RAM / Nvidia / Still used daily --- ThinkPad Edge 15/ i5 / Win 7 / TrueCrypt / 8gb RAM / Hated it, died at 1 yr 1 mo old --- ThinkPad T510 / Win 7 / TrueCrypt / i5 / 8gb RAM / Nvidia / Current primary machine --- ThinkPad X220 / i7 / IPS / 4gb / TrueCrypt / My Road Machine

  • Problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) .

    Hi experts
    I am having problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) of the datasource 2lis_02_acc .
    I have created custom cube and have mapped the fiels MEINS to infoobject 0PO_UNIT and MENGE(Quantity) to infoobject 0CPQUAOU.
    Now the data is successfully loaded in the cube but the values of the above 2 fields are getting changed.
    In r3 the value for MEINS is "AU","EA" , "H" etc but this field value is getting converted to "LE" in the cube and also the field  MENGE(Quantity
    ) in r3 is for example "1"  it is getting converted to 3 in the cube. do u have any idea what is the problem.
    The rule type is direct assingment and there is no routine .
    Any clues.
    Thank you.

    holy devilz wrote:
    Hi experts
    > I am having problem with the fiells MEINS(PO Unit ) and MENGE(Quantity) of the datasource 2lis_02_acc .
    >
    > I have created custom cube and have mapped the fiels MEINS to infoobject 0PO_UNIT and MENGE(Quantity) to infoobject 0CPQUAOU.
    > Now the data is successfully loaded in the cube but the values of the above 2 fields are getting changed.
    > In r3 the value for MEINS is "AU","EA" , "H" etc but this field value is getting converted to "LE" in the cube and also the field  MENGE(Quantity
    > ) in r3 is for example "1"  it is getting converted to 3 in the cube. do u have any idea what is the problem.
    > The rule type is direct assingment and there is no routine .
    > Any clues.
    > Thank you.
    Hmm, your system should consider the alternative UOM maintain in the material master.
    Each material in SAP has its standard, base unit of measure (stored in MARA-MEINS). To allow using alternative units, those can be maintained per material in table MARM. So, assuming the Base UoM is only considered (for LE), it converts material quantity from one unit to another, most likely from alternative units to the base one. So, changing that settings must solve. http://goo.gl/JuZlm
    Alternative steps:
    1.Goto MM42 (Assuming there's no BAPI req?)
    2. change po unit from basic unit to other -> save OK
    3. change po unit from other to basic unit -> save OK
    Also, MD63 shows all data in the base unit of measure.
    If you want to explore basic steps, goto RSD1 > Additional > Alternative UoM.
    Best Regards, @{

  • HT201210 i have problem with the firmeware file...and I do not know what is that

    i have problem with the firmeware file...and I do not know what is that

    Make sure you are updating your phone the correct way, by connecting to iTunes and clicking Check for Updates on the Summary tab of your iTunes sync settings.  Do not try to download the firmware file from the internet first.  Also be sure iTunes is up to date before updating.
    Delete the existing firmware (.ipsw) file and try again.  You will find it at one of the following locations:
    Mac OS X: ~/Library/Application Support/MobileSync/Backup
    Windows XP: %AppData%\Apple Computer\MobileSync\Backup
    Windows Vista: %AppData%\Roaming\Apple Computer\MobileSync\Backup
    Windows 7: %AppData%\Roaming\Apple Computer\MobileSync\Backup

  • Is anyone having problems with the newest update of ITunes and then trying to update the Iphone 4?

    I updated the ITunes on the computer and that went ok, but when i went to go and update the IPhone 4 it went to restore it to the factory settings and then something happened where it wouldn't let it update and now the phone is stuck in Limbo world with the apple symbol showing and a status bar, but nothing else. also the phone is not showing up as being plugged in while in this limbo faze.

    Yes. I had problems with Firefox 3.5. The primary problem was very slow or never-ending loading of certain websites (particularly secure sites and sites with many features). I also have had similar, but not as bad, problems with Safari 4. I never had these problems with Safari 2 or Firefox 2. It just seems that with each update, the problems increased for me. I have read the Safari and Firefox forums and tried many fixes with little improvement. I have come to the conclusion that there is some kind of compatibility problem between the latest versions of Safari and Firefox and Shockwave Flash and/or Javascript and OS 10.4, particularly on PPC Macs. I expect there are many who will disagree and I cannot argue or prove the point. This is just my opinion. And I recognize that my problems could be caused by my setup and not by the browsers. By the way, I do not use any add-ons with any of my browsers. Anyway, I got tired of dealing with it and installed the latest version of Camino about 2 weeks ago. I also did a clean install of Firefox 3.0.13. Camino is working out great for me. It is simple and it works. No problems at all. So currently I am using Camino as my primary browser and Firefox 3.0.13 as my backup. I hope this helps.

  • Hi!!I have some problems with the synchronization of my system, and I don´t know how I can solve this!

    My system consists of differents vi´s.Some of them are used to read analogic inputs and digital inputs, using the serial port.
    The values that I read, go through differents vi to be proccesed, and at the end, these values are written in a file, all the values in the same file.
    My problems of synchronization are:
    1. I have one vi per input, and all of them use the same serial port. How can I synchronize them to avoid serial port conflicts? (using queues??) And how can I do, to get differents number of samples/sg with every vi? I have to introduce them in differents loops?
    2. The other problem is that, for example, I want to read 8 samples/ s but I only want
    to write two samples every second. How can I do to avoid stoping the data flow?
    Maybe, my problem is that I want to see the system like
    one block, and I am ignoring that, although all the system works like a block, every part works using a different "speed". I don´t know how tools can I use to combine two ideas, working like an only system( data dependence, some vis need the data of others vi to be able to work) and working getting differents numbers of samples/s.
    I have seen that there are synchronization vis. I am going to glance at them, maybe I find something interesting but I amsure that your help will be very useful?
    Thanks in advanced!!
    Graci

    I think you are pretty much on the right track with Queues. I have implemented a very similar system myself using queues. I have even different systems connected to the serial interface, but I can synchronise them all easily using the following method:
    1) Make a VI for opening the serial port and reading the data. The data (parsed to extract the numbers required) are then stored in an array (Shift register). If the pre-determined time delay is reached (say 5 seconds) the values are averaged and written to a Queue with a defined data type. Save the VI as a VI template.
    2) Make a VI which starts an instance of this template VI for every channel you require. You can use VI Server to set values on the new front panel before you set it's property to "running". Setting a timer value for all can help ensure that the X-Axis of your timing values (if you require) are synchronised. The clue here is to define and initiate a QUEUE per channel. (RS-232_1, RS-232_2 and so on). The QUEUE name needs to be passed to the VI Template before running so that each VI running in the background has an individual link to the main program.
    The second part of this VI simply uses an array of QUEUES, polling them one after another with a timeout of, say 5 ms. If data is found, append accordingly to an XY-Graph.
    I also add in some "Auto termination" in the VI template (MAx number of values allowed in the QUEUE for example) to allow for the background processes to find out if the front-VI is still running or not. There are many different ways to do this, shoose the best for your application.
    With this approach, it's not even important what instrument is connected as long as data is written in a specified format into a known QUEUE. I have also developed systems where I can transparently (almost) drop in VI Templates for instruments with similar functionality (output data) from different suppliers.
    I would post an example, but the time it would take me to clean it up is too large. Sorry. If you have any further questions, don't hesitate to ask further questions.
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • Problems with the batch in transaction MB1A and MB21

    Hi everybody, I am new in the MM module. I am having a problem with transaction MB1A and MB21, when i try to select a batch for the movement 901. if i click the match code for the material's batch, the system shows me all the batches for the material, but some of these batches don't have available quantity stock and order creates the reservation or the material output. The system dont allow negative stock. Do you have any idea of this problem? Regards.

    Hi,
    In IM, when you select a batch with possibile entries, system always shows the available batches no matter whether stock is there are not.
    However, if you setup batch determination strategy for example, when you are processing in MB1A, SAP fills the batch based on the criterion you define in:
    MBC1Logistics -->Materials Management -->Inventory Management -->Environment -->Batch Search Strategy -->MBC1 - Create
    Select appropriate strategy (if defined in your system, say for mvt ty)
    maintain search strategy and sort criteria for your movement type here.
    Hope this helps!

  • TS4507 Problems with the mail application: I quit and then it is still clean inbox. do you have another solution?

    I have tried to solve the mailbox problem with exchange.
    It all works fine with iPhone and iPad.
    Can anyone in Apple solve these problems?

    First this is not Apple. This is a user forum. We are all users like yourself helping each other. Your description of your issue is very vague and incomplete. What exactly is the problem?

  • Problems with the link between PXI chassis and PC via MXI-4

    MAX display the chassis with a yellow exclamation point, and the MXI-4 conection monitor indicates taht the connection to the chassis has timed out.
    Under the windows device manager appears PCI std PCI-to-PCI bridge and MXI-4 connection monitor working properly.
    The system has bben working properly for one year and suddenly start to fail.
    I've tried to uninstall fromn device manager and reinstall again, and teh problem continues. When the PC starts detect new hardware and reinstall from CD with MXI-4 software for windows v 1.0
    Only the led PWR lights. The link indicator remains always off, from power up continuously. The cable connection has benn checked ok.
    The chassis is powered up in the proper sequence, first the PXI chassis, and the the PC.
    Operating system windows XP service pack 2; latest update KB835732 30/12/2004 (V 6.2)
    labwindows/cvi (fds) 7.0
    ivi compliance oackage 2.1.2
    max 3.1
    ni-daq 7.3
    visa 3.1
    chassis pxi-1000b with PXI-8331.

    Hello,
    it could it be an incompatibility with the desktop PC (maybe?). I know of cases in which the PCI board can be incompatible with a certain PC for various reasons (PCI bus not 100% compliant to PCI standards, PCI power rails, PCI bus-master capabilities, motherboard/chipset issues, etc..).
    I mean, has the PC been changed?
    Wich PC model/brand is it?
    Have you tested it on another of PC (another model)?
    In case you have already tested your mxi-4 in other PCs and the behavior is the same, I suggest you to contact your local NI office for assistance.
    Regards,
    Jorge M.

  • Problems with the Updater 03-23-2006 and the Nano

    FYI.. My problem and resolution with my NANO and the 03-23-2006 updater version.
    Problem: My NANO refused to charge while connect via a powered USB port on my computer.
    Symptoms: On intial connection the "DO NOT DISCONNECT" message would display for approximately 10 seconds, then my NANO would "disconnect" and the NANO menu screen would appear. While my NANO would not charge, I could update songs via Itunes with out a problem.
    Troubleshooting: Connected my Video IPOD to the same cable and USB port to determine if there was a problem with either the USB port, Cable or the NANO itself. The Video IPod connect immediately and began to charge. Therefore I concluded the problem laid with the NANO itself.
    The battery indicater was in the red, did some minor research and saw that there are a few posts about charging an IPod if the battery was low and they indicated some problems do exist. So I charged my NANO with the Apple power brick and the same cable, and viola it began to charge and completed the charge within a few hours.
    Plug the NANO back into the PC and again no go. Within 10 seconds the menu screen was displayed, but I still could transfer songs but it would not charge.
    Solution 1:. Reset my NANO, but symptoms still existed. I performed a soft reset via the NANO menu, and I did a hard reset using the MENU and SELECT buttons.
    Last weekend I updated both my IPOD Video and NANO with the latest updater 3.23.2006. This problem did not exist prior the latest update (NANO had worked flawlessly since I purchased it in mid Febuary).
    Solution 2: Restored NANO back to the orignal firmware version, and problem has not occured since. NANO now charges when connect via a power USB port. All seems well.
    Homegrown   Windows 2000  

    uhm tried it but it didn't work still my ipod is still not charging via USB

  • Interesting problem with the iPad User Guide ...

    When I first got my iPad ... very much unlike myself, I thought ... I should read the manual rather than just stumble into how to use this thing.
    I went to the manual ... and, first, it was a webpage. What if I was having problems connecting to the Internet?
    Then ... it is a very large PDF file and takes quite a long time to load. I got it and read a little of it, and went off to do something else. Later I wanted to read some more of the manual.
    When I went to the manual again ... I had to download the entire thing again.
    Huh??? What if people want to read the manual when they do not have internet access or the time it takes to download a 20MB PDF file?
    Yes .... 20 MEGABYTES! That is a long time on a wifi connection.
    Is there something I am missing? Is there a way to cache or store a web page, or write it to a file? Because I did not see anything like that. Is there a local help file or facility on the iPad, because I did not really see that either?

    lowboydrvr:
    Thank you for pointing out that the iPad manual is an app in the app store.
    Still for people who do not have their iPad fully functional that might want
    to be preloaded, and deletable for those who do not think they need it.
    Governa:
    Now, sorry to ask but... you find 20MB a lot? It takes you "a long time on
    a wifi connection"? 20MB nowadays is nothing mate!
    That's Gmail's attachment limit for example
    Yeah, the maximum attackment size, done for reasons of market share.
    And yes, 20MB is along time over wireless when you are looking for a
    specific bit of information, thanks for that useful comment though.

  • Problems with the web based email page and Windows...

    We've just upgraded our PC to Windows 8 and I've read the bit on the Help page which says that Yahoo Mail is not compatible with Windows 8 and that we need to access our email via the webpage. Fair enough - though why Yahoo mail still won't work with Windows 8, which after all isn't that new is another matter.
    Our problem is that when we access our email via the www.bt.com webpage we have the following problems:
    It seems to be very slow
    When you click on the first unopened email in the list to open it, it usually opens one further down the list. You can get it to open the one you want if you tick the box next to it first, but that wasn't what you needed to do previously.
    When you try andreply to an email and start typing, your text appears in one place while the curser is actually somewhere else. If you make a mistake when typing and try and go back it doesn't work well.
    I tried getting help via a Live Chat with someone but she directed me back to the page I'd already seen saying BT Yahoo Mail and Windows 8 can't talk to each other and you need to access emails via the webpage.
    Has anyone else had the same problem? Any answers?
    Thanks - Kiwirob199
    Solved!
    Go to Solution.

    Just install an email client such as Thunderbird or Windows Live Mail, much easier than messing about with webmail.

  • Problem with the voice volume between incoming and outgoing calls

    Hi all.
    I have a situation with volume calls.
    1.- When the calls are originated in the PSTN to the IP Phones, the volume is ok in both sites.
    2.- When the calls is originated in the IP Phones to the PSTN, the person in the PSTN listens very low.
    I try to adjust the volume in the voice-port configuration, increasing the input and output db value, but not if I am doing it well or if I need adjust the configuration in other part.
    The router 2801 have a CCME ver 4, this router is connected to PBX with a E1 and the PBX have the PSTN Digital trunks.
    this is the voice router configuration:
    voice-card 0
    dsp services dspfarm
    voice service voip
    allow-connections h323 to h323
    supplementary-service h450.12
    controller E1 0/0/0
    framing NO-CRC4
    line-termination 75-ohm
    ds0-group 0 timeslots 1-12 type e&m-immediate-start dtmf dnis
    description to the PBX
    voice-port 0/0/0:0
    auto-cut-through
    input gain 4
    output attenuation 4
    playout-delay nominal 200
    playout-delay minimum low
    bearer-cap Speech

    Try using a negative value in the output attenuation setting. My understanding is that negative values in the the output attenuation increases the volume out to the PSTN. Make small adjustments as you increase the chance for echo. Positive values decrease the volume.
    Larry

  • IDOC to JDBC, problem with the multiple line items structure and mapping

    Hi,
    I have a scenario where the ORDERS data need to update the SQL table. for the idoc which consists one line item its ok but for multiple line item its just updating one line item. In the destination side we have only one table for purchase order which consists of lineitem as a field.(no different tables for Header data and Line item data)
    Can anyone suggest me how to create a structure for target side and how to map them.
    Regards,
    CJ

    Hi Rajan,
    The table structure is
    [PO_DATE]
          ,[VENDOR_NO]      ,[PAYMENT_TERM]      ,[MATERIAL_CODE]      ,ORDERED_QTY]      ,RECEIVED_QTY]                                 
          ,[UOM]       ,[RATE]       ,[CURRENCY]       ,[PO_EXCRATE]       ,[TAX_CODE]       ,[BASE_VALUE]       ,[TAX_VALUE]
          ,[TOTAL_VALUE]       ,[ADVANCE_PAYAMT]       ,[TOTAL_QTY]        ,[SNO]       ,[POLINEITEM]
    Datatype structure:
    PO_XI_MT_ORDERS05 1-1
    STATEMENT   1-UNBOUN
      TABLENAME 1-1
        ACTION   optional
        TABLE    1-1
        ACCESS  1-1
           PO_NO   0-1
           PO_DATE 0-1
    Correct me if im wrong.
    Regards,
    CJ
    Edited by: kuncjy on May 5, 2011 11:32 AM

Maybe you are looking for

  • Call Transaction 'PA40'  ALWAYS returns with error code

    Hi, I'm having issues with updating personnel actions using CALL TRANSACTION 'PA40'. The call always ends with an error code. I checked the message table and there are no error messages, only warnings and status messages. Warning and information mess

  • I did not install icloud when setup my ipad and now I cannot install icloud on ipad 3 with ios 8.1.

    I did not install icloud when setup my ipad and now I cannot install icloud on ipad 3 with ios 8.1.  Everything in Settings is complete and correct.  I can log in from my PC with no trouble.  If I go to icloud.com on Safari on the ipad, it takes me t

  • Multiple apps in Simulator folder

    Why do I get multiple sets of app folders in: ~/Library/Application Support/iPhone Simulator/User/Applications/ I noticed it when I tried to alter a data file in my app's documents directory directly. The changes didn't show up when I ran my app. Eve

  • Disabled lines in TableControl

    Hello, I have programmed a screen with several table controls. For some of them only the first line is open for input, for others all visible lines are open for input. As I have set them up all the same, I wonder, what is causing the different behavi

  • JScrollPane also move.Help!

    I add some JTextField in a Panel. and the panel is in a JScrollPane. i add keyListener for these textField, for example,KeyEvent.VK_UP, KeyEvent.VK_DOWN, the question is when i press up/down key,the JScrollPane also move up/down...(and perform before