This is really strange...

Hi, has anybody here ever encountered such problem?
My code is like:
String date = Util.Bytes2String(m_sDate);     
if (date!="")
try{
String yy = date.substring(0, 4);      
String mm = date.substring(4, 6);
} catch (Exception e){}
I have tested that the string date is empty(="") but the "try" statement is still executed, why? This is really strange to me.
Thank you.

Use
if (!("".equals(date)))You only use == and != to
1) compare primitives
2) see if a reference is null
3) see if two references refer to the same object
Even if date contains the empty String, it doesn't necessarily (and in your code won't) refer to the same object as the one in the constant pool that holds your "" String object.

Similar Messages

  • I just jazzed up my 2 Ghz iMac with 10.6.8, and 4 gigs of memory. I'm VERY happy with the results (fast!), but now I have a thin yellow line way over on the right side of the screen, which goes from top to bottom. This is really strange! Any input?

    I'm VERY happy with the results (fast!). However, the really strange thing is this - there is now a thin yellow line, way over on the right side of the screen, which goes from top to bottom, and stays there no matter where I go or what I do. I've never seen anything like this! It was not there before I did the upgrades. Anyone out there ever heard of such a preposterous thing ~ or have any ideas on how to get rid of it?

    Hello Mark,
    It's going to mean a lot of reading but you should study the 'More like this' legend to your post's immediate right.  >>>>>>>>   plus some of the links within each.
    The problem is well explored with much guidance on what to do and where to go.

  • This is really strange. Please help.

    I installed iPhoto '06 last night and already noticed a few problems. First off, some of my pictures in the thumbnail view of an ablum, are gone. They're just showing up as a white box. When I double click the white box, the picture DOES show up as usual, but I can't tell what picture it is until I double click it. About 1/6th of my photo thumbnails are doing that. The other thing is that it always asks me if I want to rebuild my thumbnail cache...Any ideas of how to fix this "white box thumbnail" problem?
    Thanks.

    Hi Danny,
    Close iPhoto
    Navigate to your iPhoto Library folder in the Finder.
    Drag to the desktop the three loose thumbnail files called Thumb32Segment.data, Thumb64Segment.data, and ThumJPGSegment.data.
    Hold down the Command and Option keys while launching iPhoto until you see the rebuild screen.
    Choose the first two options to rebuild the thumbnails.

  • HT1414 I have the iPhone 4s. I have tried restoring my phone and cleaning out the ports, but I still cannot hear music or my videos playing. This happened after I did the last update on my phone. Is there anything else I can do? This is really irritating.

    I have the 4s. I have recently restored my settings and cleaned out the ports. I still cannot hear my audio for music or videos. My volume on the side of the phone does not work either. Everything workds in the setting menu. It is not a speaker issue because the ringtone works when people are calling and I can listen to the different ringtones as well. My notifications and text message audio does not work. My phone does not say that it is on a dock. When I try listening to music, the volume adjustment appears, but it is gray and unusable. Everything works when headphones are in plugged in and when it is on the dock. This started with the last iPhone update. What else can I do... this is becoming very frustrating.

    Hi shanny202.
    Really strange problem you have there. I have a few questions though.
    Please try again and try to make the phone as a new without restoringen with you iCloud-data or backup-data from iTunes. Maybe it is something wrong with the data (strange).
    Anyway, i think you should call Apple Support or visit an Apple Store, don't forgot to make a Genius Bar reservation.
    You locate the nearest Apple Store here: http://www.apple.com/retail/storelist/
    And here is Apples phone numbers around the world for support: http://support.apple.com/kb/HE57

  • Oracle 9.2: Really strange problem so Please Help!

    Hi All,
    I am having a really strange problem and I don't know why it is so. I have a simple sproc (for testing) that updates one column in a table and the where clause uses two in params and the set clause uses a local variable. I stepped through it in JDeveloper and saw the execute of the update and commit statements and in params' values and the local variable's value, but the row will not be updated! If I changed the where clause to use literal values (303 and '1045225') and the set clause to use 3, then it works. If params and a variable are used for these three values, the row does not get updated! And when I added the dbms_output.put_line to print out the param's value and the variable value, they are all there! Here is the code:
    create or replace procedure sprocTestUpdate (
         Action          in varchar2 := 'FETCH',     
         p_QueueID          in number,
         StatusDesc     in varchar2 ,
         p_PK          in varchar2
    as
         --- local varirables
         StatusID     pls_integer;
         MessageTypeID     pls_integer;
         EditActionID     pls_integer;
         v_QueueID     pls_integer := 0;
         --- error constants
         Source constant     varchar2(20) := 'RCSO';
         Sproc constant varchar2(50) := 'spCriMNetQueuePublish';
         --- status constants
         StatusUnprocessed constant varchar2(20) := 'UNPROCESSED';
         StatusProcessing constant varchar2(20) := 'PROCESSING';
         StatusProcessed constant varchar2(20) := 'PROCESSED';
         StatusError constant varchar2(20) := 'ERROR';
         v_errorMessage     varchar2(4000);
    begin
         begin
              StatusID := fnc_getQueueStatusID (StatusDesc);
         exception
              when others then
                   null;
         end;     
         ---set transaction isolation level serializable;
         if Action = 'STATUSUPDATE' then          
              update QueuePublish
              set StatusID = StatusID,
                   attemptcount = attemptcount + 1
         where queueid = p_QueueID and PK = p_PK;          
              commit;
              dbms_output.put_line(to_char(StatusID) || ' For ' || to_char(QueueID));
         end if;
    exception
         when others then
              rollback;
    end sprocTestUpdate;
    and here is the test script in SQL*Plus:
    declare
         action     varchar2(30);
         QueueID number;
         StatusDesc varchar2(30);
         PK varchar2(30);
    begin
         action := 'STATUSUPDATE';
         QueueID := 303;
         StatusDesc := 'PROCESSED';
         PK := '1045225';
         sprocTestUpdate(action, QueueID, StatusDesc, PK);
    end;
    thanks.
    ben

    Ghulam, this is what I was talking about:
    <<
    StatusID := 3;
    if Action = 'STATUSUPDATE' then
    update QueuePublish
    set StatusID = StatusID,
    attemptcount = attemptcount + 1
    where queueid = 303 and PK = '1045225';
    commit;
    dbms_output.put_line(to_char(StatusID) || ' For ' || to_char(QueueID));
    end if;
    and it won't update! but if I say set StatudID = 3 it will work!
    >>
    might be better to do :
    L_STATUSID := 3 ;
    ste STATUS_ID = :L_STATUSID
    ...otherwise you are just replacing STATUSID by itself,
    poor RDBMS-engine doesn't know what StatusId you are talking about

  • Really strange cluster isolation problem....

    We are still using Coherence 3.6.0 and is experiencing a really strange problem with two test clusters:
    Cluster 1 uses wka a.b.c.d:9000 and cluster name "cluster1"
    Cluster 2 uses wka e.f.g.h:9000 and cluster name "cluster2"
    I can using JMX and log files see that both clusters have started successfully with node 1 (the single wka) using port 9000.
    A client program first connects successfully to cluster 1 (using cluster 1 wka and cluster name as above). After the program terminate the same client program is run again this time versus cluster 2 (using cluster 2 wka and cluster name as above) but this time the connection is refused and to our total surprise the error message indicates that the Cluster 1 wka node a.b.c.d:9000 has refused connection and that the cluster name should be "Cluster 1"!!!!!!! We have checked and re-checked that the right combination of wka and cluster name (for cluster 2) is specified on the command line the second time....
    Short of a DNS configuration problem (we are in fact using server names rather than physical IPs in the command line overrides) that would resolve the two wka node names to the same physical IP I cant see any solution (not involving woodo, alien intervention and/or the Bermuda triangle) to this behaviour. I actually tried pinging the two host names and could see that they indeed resolved to different IPs to eliminate this, unlikely but possible, problem...
    It is my understanding that when specifying a unique wka for two clusters there is no need to set up unique multicast addresses / ports (since multicast is not at all used in this case) - can somebody confirm that this is indeed true or if this could have anything to do with our problem?!
    Any suggestions or ideas (in addition to hiring a shaman to exorcise our servers :-)) are warmly appreciated...
    /Magnus

    After studying the problem more in detail I have come to the conclusion that this indeed seem to be a bug in Coherence 3.6.0. It does however not occur with 3.6.1 or 3.7.0 but if the problem is unknown I would have checked it out...
    The problem is really easy to reproduce. Create two clusters (can be single storage node, local or remote does not matter) each with a unique WKA port (of course).
    Execute a simple client program (non storage enabled) first against the one cluster then against the other. The program I used just looked up a cache ("near-test") and printed its size (in this case zero since I never loaded anything into the cluster).
    You don't need to enable pof or anything specia. The cache-config iin the coherence.jar works fine. I have tested this both on distributed clusters on Linux and locally on a single Windows box.
    You will notice that the program works against the first cluster but fails when run against the second.
    /Magnus

  • Ethernet Port is acting really strange?

    So I am having the hardest time coming up with a solution to a really strange problem I'm having.
    Day One: My ethernet port just stopped noticing when it was connected to a internet connection. I did a restart, PRAM reset, anything that I could think of. Nothing worked. I made an appointment to the Genius Bar and the same problem was happening there.
    So they booted up a new image of OSX on a thumb drive and ethernet port was working! So the Genius bar guy removed all my preferences/network .plist files from MY OSX and everything was back to normal.
    So we know this isn't a hardware issue.
    Next day: No more ethernet, Again...
    I did the same proceedure that the Genius bar did. No result. WHAT THE DUCE? I still didn't have an ethernet port.
    I then reinstalled OSX, to get a clean state. Ethernet is back and working normally. All good.
    Next day: Ethernet port "works" but is selective on which one it wants to use.
    I work in two different offices.
    At the first office. The port next to my desk doesn't work when I connect. Another person can plug in (with same cord or different chord and get internet access) no issues. I can go two feet over and plug in there and the ethernet port recognizes it is plugged in and I revieve internet.
    At the second office, the cubicle I reside in has 4 ethernet ports. All four work for other people. Only 2 work for me.
    WHAT THE DUCE is going on? Can anyone help me with this?

    Along the same vein, after resetting the PRAM and SMC, try turning all security off: no firewall, enable all apps and turn FileVault off if in use. Not advocating a "go stroll naked in the rough side of town", but rather to try and confirn that those components have no bearing on the issue. Do enable all you use immediately after.

  • Really strange network issue that is specific to OS X 10.6.8

    Really strange network issue that is specific to OS X 10.6.8 on both 2 iMacs and an older intel Mac Pro.
    Any system running 10.6.8 is achieving on average 15 –20 mb a sec transfer rates regardless of drive speeds, cables, network activity etc.. I've spent some time removing any cable , drive speed, router issues to the point where one machine dual boots into both 10.6.8 and 10.6.5
    The 10.6.5 system has network speeds of 60mb – 80mb p/sec transfer rates.
    Our older 10.5.8 PPC mac gets 80mb and my 2011 Macbook Pro 10.7.2 hits 60mb – 80mb consistently as well.
    Any idea what the cause is?
    Cheers

    Since your other Mac running 10.5.8 is not affected, you know that your AirPort router is functioning correctly.
    What changed on your Mac? This seems like a post for either the Mac OS X v10.6 Snow Leopard support area, or the support area for your model of Mac.
    We normally handle questions about the AirPort Express, AirPort Extreme or Time Capsule in this area, but you can certainly wait to see if you receive a response here.

  • Really strange musical fonts have appeared

    Just today I was using pages when i noticed these really strange musical fonts had appeared:
    There are alot more of these wierd fonts: these are just a few examples.
    i have this musical creation program on my computer called Sibelius First 6: I was wondering if that was the cause.I don't use it much and am on the trial version, so I could uninstall the program if it would fix this strange issue.
    Thanks

    cereskit,
    If you are really using 10.6.4, updating your OS may solve the problem.
    It would be best to download and install the 10.6.7 combo update and then run Software Update.
    Jerry

  • Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Is there a way to reset my messages account, I can't get iMessage to work on IPad nor Mac osx. Help please this is really frustrating.

    Hi,
    Is there an iPhone involved ?
    If not, what happens  if you remove the Apple ID on the iPad and then set it in Airplane Mode (allow a couple of minutes at this point) followed by re-adding the Apple ID ?
    What, if any error messages are appearing on the Mac when you try to launch the App or Login to the iMessages server ?
    Is the Apple ID linked to an iCloud account ?
    In Messages 7 (Mountain Lion) this did not seem to be important but it seems it is in Mavericks/Messages 8
    9:14 pm      Friday; April 11, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • My phone says there's 0 bytes available but only 6 GB are used the phone is supposed to be 8 GB I have no pictures at all and only 6 apps this is really bothering me please help I can't even take pictures because it says I've no storage

    My phone says there's 0 bytes available but only 6 GB are used the phone is supposed to be 8 GB I have no pictures at all and only 5 apps this is really bothering me please help I can't even take pictures because it says I've no storage I also have no messages at all

    My iPhone is a 16GB and it says 9.0GB Available and 3.7GB used; I suspect the missing 2.3GB is occupied by the system software.

  • Why can I not synch my brand new IPod with one purchased itune and 2 riped from a CD, both of which are shown in my itunes account. The unhelpful "support" suggests I click an icon pictured but not in any screen view available to me. This is really off-pu

    Just bought an IPod Classic and put 3 songs on my iTunes account - 1 purchased and 2 from a CD.  I can't sync and the screen shot shown in the help section doesn't ressemble my scren views. i have now been on hold for 55 minutes despite a mesage saying "15 minutes or more" that implied a much quicker experience. This is really an unimpressive begining.

    Just bought an IPod Classic and put 3 songs on my iTunes account - 1 purchased and 2 from a CD.  I can't sync and the screen shot shown in the help section doesn't ressemble my scren views. i have now been on hold for 55 minutes despite a mesage saying "15 minutes or more" that implied a much quicker experience. This is really an unimpressive begining.

  • When I am on Safari, the page randomly goes back to the previous page I was on. This is really frustrating when I am writing something online because it does not save my work. Fix for this?

    When I am on Safari, the page randomly goes back to the previous page I was on. This is really frustrating when I am writing something online because it does not save my work. Fix for this?

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Issue in BPS Variables....Please anybody reply...this is really urgent(SOS)

    <b>Hi dear friends, This is really a urgent problem and crucial Please anybody can share their ideas or atleast some inputs/ clues to clear the cobwebs in my understanding.</b>
    I am facing problem in BPS Variables.
    I created the variables 1.zqbs- employee responsible --->Userentry/default value.
    2. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    3. zconpar-- contact partner----
    > Replacement type is user exit(Function Module)
    ZCONPAR: I am using the zqbs, planing area, characterstic name as a import parameters and i am exporting the output value to 0BP_ACTIVIT through zconpar
    ZCONPER: I am using the zqbs, planing area, characterstic name as a import parameters and i am exporting the output value to 0BP_CONTPER through the zconper.
    These two variable info objects are calling in the planning layout lead column.
    based on contact partner it should display contact persons for the contact persons we are applying the conditions(bp_reltype = bur001,bp_reldir = 2) to filter the contact persons.
    In my case i am getting 3 values for the contact partner like 1000, 2000, 3000.
    i am getting 2 values for the contact persons if i run the variables individual.
    note: if i run BPS0 its going into loop and displaying multiple data means for 1 contact partner its applying all contact persons. at final it showing records like contact persons X contact partners means it showing more unvalid records.
    how to avoid this situation.
    contact partner contact person bp_reltype bp_reldir
    1000 xxxx bur001 2
    2000 yyy bur002 2
    3000 zzz bur001 2
    it should display like this
    1000 xxx
    2000
    3000 yyy
    but it showing
    1000 xxx
    1000 yyy
    1000 zzz
    2000 xxx
    2000 yyy
    2000 zzz
    3000 xxx
    3000 yyy
    3000 zzz
    Please anybody who have even a vague idea of solution can respond to this immediately.----SOS----
    Even your smallest hint is greatly appreciated.
    Yours truly,
    your friend Bharath.

    Thanks for the reply and I would trying these consistency check out again as a background job but I have already done these checks and have not been able to find any inconsistencies in the planning area or the master planning object structure. the problem is this as I have put in the SAP message:
    "We have generated CVCs from a text file using the load work list functionality  Due to some internal formatting issues few erroneous CVC were generated. On going through the concerned notes we have come to the conclusion that we would have to delete the erroneous CVC and recreate new CVC.
    The issue that we are facing is that we are not being able to delete the erroneous CVC from the MPOS as they are not visible in the display mode. On other hand we do see the erroneous CVC in the planning book, which is not at all understandable because if there are no CVC then why are we seeing them in the planning book."
    Please let me know if this is a problem that has been faced by anybody in SCM 5.0
    Thanks

  • Disabling cache usage in IE by java(this is really very important and urgen

    Hi,
    i would like to know if it is possible to disable cache memory(tempinternetfile) for IE.
    Since my jsp pages have the meta tag <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> some of the pages are being stored in temporary internet files folder and being called from there and this cause really big problems since all the data has to come from database,
    they just came from cache and none of the changes are being displayed.
    Thanks

    Try add page expire date:
    <META HTTP-EQUIV="expires" CONTENT="Fri, 31 Dec 2001 23:59:59 GMT">

Maybe you are looking for

  • IPod mini doesn't connect in Windows after doing an Update

    Please help! I promised to put some music om my friend's iPod (1st generation) from my computer. When I connected it with my computer, i first did a new update. After that the problems began!! After completing the update the ipod showed a picure of a

  • NSU V1.7.3 When is it going to get fixed?

    The Nokia NSU V1.7.3 en. us is all screwed up..Reason I say this is beacause I have a Nokia 6301 and a Nokia 5310..I updated the software on my 6301 and the wi-fi won't work anymore,updated the 5310 and I can't get Gmail App. or Yahoo!Go to work anym

  • Change multiple passwords in one operation

    Dear all, I'm currently looking for a way to change imap, smtp, caldav and carddav in a single operation instead of having to change each one manually. This is because of our company's password policy, every time a password expires, users usually for

  • Is this were I file a complaint?

    I have been a Verizon Wireless costumer for over 10+ years now but my patience is running thin.  On 9/18/2014 I decided to utilize the Edge program to upgrade from my current iPhone 5s to an iPhone 6 (black 16 GB).  I did this at my local Verizon sto

  • Help! Netscape browser problems

    Hi, This is my first time using layers, and I'm finding that Netscape 8 shifts text downwards slightly. I've posted the "Cafe Townsend" tutorial to illustrate the problem I'm getting- http://www.juliespetportraits.com/Cafe_Townsend/index_css.html If