Warning messages (Moving from JDK1.4 to DJK1.5)

I got some warning messages after I moved from 1.4 to 1.5, can someone show me the right way to avoid them ?
=====================================================================
Scanner.java:909: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.Vector
Region[Region_Id].add(region_element);
In my code :
region_element=new Region_Element();
static Vector Region[]=new Vector[64];
I tied :
static Vector<Region_Element> Region[]=new Vector<Region_Element>[64];
but still got warning message.
=====================================================================
Set_Maker.java:31: warning: [unchecked] unchecked cast
found : java.lang.Object
required: java.util.TreeSet<java.lang.Object>
try { S1=(TreeSet<Object>)o1; }
In my code :
static final Comparator<Object> TreeSet_Order=new Comparator<Object>()
public int compare(Object o1,Object o2)
if (Debug) System.out.println("=00= o1="+o1+" o2="+o2);
TreeSet<Object> S1=new TreeSet<Object>(TreeSet_Order);
TreeSet<Object> S2=new TreeSet<Object>(TreeSet_Order);
try { S1=(TreeSet<Object>)o1; } // Line 31
catch (ClassCastException e) { S1.add(o1); }
==================================================================
JDBCAdapter.java:190: warning: [unchecked] unchecked call to setElementAt(E,int) as a member of the raw type java.util.Vector
dataRow.setElementAt(value, column);
In my code :
Vector     rows=new Vector();
public void setValueAt(Object value,int row,int column)
Vector dataRow=(Vector)rows.elementAt(row);
dataRow.setElementAt(value, column); // Line 190
=================================================================
TableSorter.java:60: warning: [unchecked] unchecked call to compareTo(T) as a member of the raw type java.lang.Comparable
public int compare(Object o1, Object o2) { return ((Comparable) o1).compareTo(o2); }
In my code :
public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
public int compare(Object o1, Object o2) { return ((Comparable) o1).compareTo(o2); } // Line 60
==================================================================
TableSorter.java:260: warning: [unchecked] unchecked call to compare(T,T) as a member of the raw type java.util.Comparator
else { comparison = getComparator(column).compare(o1, o2); }
In my code :
protected Comparator getComparator(int column)
Class columnType = tableModel.getColumnClass(column);
Comparator comparator = (Comparator) columnComparators.get(columnType);
if (comparator != null) { return comparator; }
if (Comparable.class.isAssignableFrom(columnType)) { return COMPARABLE_COMAPRATOR; }
return LEXICAL_COMPARATOR;
Object o1 = tableModel.getValueAt(row1, column);
Object o2 = tableModel.getValueAt(row2, column);
else { comparison = getComparator(column).compare(o1, o2); } // Line 260

I have tried so many ways but I can't seem to get rid of the warning on this matter. I have no idea how to use the generics on Vector. The other part of Generics I can undertand but just this. In my case I am adding multiple types of datatype and how am I supposed just say if it is supposed to be
<String> or <Interger>or a
<Double>. I even tried using the Wildcard
<?>. Still no effect on it. Earlier I was trying it out with a Cosole program so I just revised the Version back to 1.4 SDK but now I am implementing a GUI to the program and I am in a real need to know how to solve it since I have to use the 1.5 JDK. Please Help me. I can't even find an example out there which uses Generic type methods to add to the Vector using the getter and setter method. Could there be a problem with the getter or setter of the program?

Similar Messages

  • How to trap warning messages generated from the background processing?

    Hi all,
    Following is my requirement, i want to know whether it can be done and how?
    The credit management (CM) warning messages generated as a result of the CM background processes, where do the messages go? Can you trap them and include them in an interface control report?
    Thanks

    Hi
    If it's created a job for that process, you can try to read the log: here you should find all triggered messages, so the warning ones too.
    U can try to use fm like BP_JOBLOG_READ or BP_JOBLOG_SHOW in order to get the log.
    Max

  • Moving from jdk1.3 to jdk1.4

    Hi everybody,
    I need one info.
    There is a bug in JDK1.3 related with HTTPClasses and Sun Says it has been fixed in JDK1.4.
    So i want to move to JDK1.4 .
    NOW what are the possible problems . My application uses Swing , XML ( xalan parser) .
    Can someone please give me some info on this?
    regds,
    Rajesh

    Hi ,
    my concern is for parsers what we are using Xalan and Xerces .
    If they would be using deprecated API then it could be a problem,
    as I remember reading similar problem somewhere. So wanted to
    ask the Forum.
    thanx,
    Rajesh

  • How to send information/warning message from CRM to B2B application

    Hi,
    I need to send information/warning mesage from CRM to B2B application.
    I am using FM CRM_MESSAGE_COLLECT to send the required message to application log first and then implemented a BADI called CRM_ISA_BASKET_MSGS for reading that message to dispay it in Internet Sales.
    When I am passing message type as E in FM CRM_MESSAGE_COLLECT ,it is correctly showing it in B2B internet sales application as an error message but when I tried to pass message type as I/W it is not dispaying the message in B2B internet sales application although that information/warning message is being displayed in application log in CRM
    Can anyone pls provide some useful inputs for passing information or warning message type from CRM to Internet Sales allpication??
    BR,
    Bykam

    You need to fire the action from B2B, maybe when the b2b is all loaded you can call a FM in CRM that will handle some validations, this FM will return a result, store it in a session attribute, and put a condition in the JSP that will handle the response, inside this condition (if the attribute session is not empty) print a block, a label or something in html, css class will help to put some colors and maybe make a custom alert block.

  • Warning message DM10826 when running gendata (text merge area that can shrink/grow on image that cannot grow)

    I am currently converting from Documaker 11.3 to 12.2 While running GENDATA I get the following message:
    DM10826:  Warning in TextMergeParagraph(): Attempting to use a text merge area that can grow, on the image <JACKETPAGE> which cannot grow. Processing will continue.
    I have a text area in the JACKECTPAGE section that has the sizing option of "Can grow and shrink" selected.  This is because I have an imbedded tag in the middle of the text area. The "form section options" for the JACKETPAGE section that contains the text area does not have "Can shrink and grow" selected.  If I change the JACKETPAGE "form section options" to select "can shrink and grow" the warning message goes away.
    Couple questions:
    (1) What are the ramifications of selecting "can shrink and grow" on the form section option?  I really don’t want anything else on the form to move around.
    (2) If there are no ramifications of selecting this option on the "form section options" there an easy way to find every section that has a text area that is flagged as "can shrink and grow" so that I can proactively flag the associated form(s) in order to eliminate these messages?
    Thanks for whatever help that you can give on this!

    The message is actually an old one, so I would be surprised if you are just now getting the message moving from 11.3 to 12.2. Unless it is perhaps because you were previously not using Studio model MRL and now you are.
    The message indicates that a growing text area could potentially push objects out of the section boundary or even exceed the boundary itself - assuming you mapped in enough data. It is simply a warning.
    If you know that your content can't really grow beyond your section or if you know and expect the result in case it does, then just ignore. Or if you know there is sufficient room for the content to grow within the section without overflowing the boundary (because you have white space at the bottom), then you could set the Can Grow on the section and prevent the message. Your choice really depends upon what you prefer.
    However, if the growing text area can indeed push objects (or itself) outside the boundary with the data you map, then setting the Can Grow on the section will affect your output.When a section grows in size, this adjusts the position of the remaining sections on the page. If you don't allow that, you could have overlapping content if the text area pushed something outside the boundary of a section.
    As for whether there is a way to globally set existing sections to grow, I don't think there is. The version you have now will automatically try to set the section to can grow when editing a section and you add a dynamic text area. However, you can still turn that off if you don't want it on. That does not affect existing forms or sections which you have in the library until you were to edit the sections and modify a text area.

  • After moving from Canada to the US, getting a new iPhone 5C, and restoring my backup from iCloud, I can't update my apps. I get an error message that my account is not valid in the Canadian App store and I must change to the US store. How do I do that?

    After moving from Canada to the US, getting a new iPhone 5C, and restoring my backup from iCloud, I can't update my apps. I get an error message that my account is not valid in the Canadian App store and I must change to the US store. How do I do that?

    Change here:
    Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region.
    You must have a verified billing address & be located in the country whose store you are trying to use.

  • When I try to download the latest version of itunes to my i phone, I get a message saying songs I have purchased on the phone need to be moved from "purchased" to a Library before continuing with the download.  How do I do this?

    When I try to download the latest version of itunes on my computer, which is tethered to my iphone, I get a message saying the music on my phone needs to be moved from "purchased" to a Library.  I search and can't find instructions on how to do this.  Please help!

    Transfer Purchases  = iTunes > File > Transfer Purchases
    http://support.apple.com/kb/HT1848

  • Change of Message status from Error message to Warning message

    Hello,
    I would like to know the configuration details of changing the status of a message class from Error message to warning message.
    Thanks
    Manish

    Hi,
    You can do it via OBA5 transaction; enter the application code, and put an entry for the message setting the flag to warning. Keep in mind, that not for every message it could be done.
    Regards,
    Eli

  • How to change P.O. duplication message type from warning to error for Order

    Hi Experts,
    I have a requirment to change P.O. duplication message type from warning to error for Order only not OrderTemplate.  I can easily change message type in BAdI ISA_BASKET_MSGS, but I can't find the parameter to know if it's Order or OrderTemplate (DocType).   If this BAdI is not good way,  is there other way? and how to please?
    Please advise / help..
    Thanks, Jin

    Thanks Easwer for your help. 
    The info for getting status from function is very clear and I followed you instruction and completed the coding in BAdI and tested it successfully .... Thank you very much.  I need to learn where I can see the system status of the template,  i.e.  I1034 (Order Template) or Order or Quotation .....?  if I need to filter out Quotation, I can easily do it in the BAdI.   Could you please provide me more details?
    Thanks again, Jin
    Thanks again, Jin

  • Since uninstalling / reinstalling iTunes I am not able to sync iPhotos with my Apple TV with the following warning message stating that this is due to a 'problem on your computer. The disk could not be read from or written to'. Please help!

    Since uninstalling / reinstalling iTunes I am not able to sync iPhotos with my Apple TV with the following warning message stating that this is due to a 'problem on your computer. The disk could not be read from or written to'. Please help!

    Welcome to Apple Discussions!
    Is all the software on your computer up to date?
    iTunes
    iPod Updater
    Also, try The Five R's
    btabz

  • Invoice Receipt Warning Message Appear After Upgrade from 4.6C to ECC6

    Hi Gurus,
    We do upgrade from 4.6C to ECC6. And we do Invoice Verification base on Delivery (Vendor delivery number), in our business process there more than one Purchase Order has same Vendor Delivery Number while GR executed. But only one Purchase order related to Invoice verification, others PO are Free PO (no need Invoice Verification).
    The problem is:
    In SAP 4.6C, while execute Invoice base on Delivery (Vendor delivery), system automatic select only PO with Delivery (vendor) which related/allow invoice receipt.
    In SAP ECC6, while execute Invoice base on Delivery (vendor delivery), all PO selected. So than there are warning messages appear (warning pop screen) for those PO not allow invoice Receipt (message M8035: PO item XXXXX does not allow invoice receipt), and at the end PO which allow Invoice receipt then appear for further Invoice Receipt process.
    At overall, the final result SAP 4.6C and SAP ECC6 is same (only PO which allowed Invoice Receipt will processed further).
    The Question are:
    1. Why in ECC6 appear warning message, while in 4.6C no warning message ? Is there config to ignoring the warning message. I've try to maintain system message for M8035 (t-code: OMRM) to ignoring the pop screen, but can not created.
    2. How do we make warning message dissapear (no need warning message), because if the PO's has hundred items so user need to click enter hundred times.
    Thanks in advance.
    Regards,
    Tri Wicaksono

    Hi,
    could you please check whether the flag "GR-based IV" is set in the purchase orders?
    If GR based-IV is ticked, then this pop-up cannot be suppressed.
    If you would like to post the invoice first then GR-based IV should not be checked, otherwise this pop-up will always appear.  I am afraid that this behaviour is standard. 
    Please, be aware that this feature is only available if you set  in the Purchase Order item the 'GR-based IV' indicator:
       If the GR-IV flag is not set in the PO, then the system does not                     
       differentiate individual goods receipts. Please see the <f1> help                    
       for the field "GR-IV" in the PO item detail. Since the individual                    
       receipts are not differentiated, an invoice is not tied per se to                    
       an individual receipt and a goods receipt can be reversed despite                    
       an invoice receipt.                                                                               
    With the GR-IV flag set on in a PO, you can specify which goods                      
       receipt is being invoiced in an IR and which goods receipt is being                  
       reversed in a return. It is this correlation between goods receipts                  
       and invoices that enables you to specify for GR-IV PO's whether an                   
       item can be returned despite an invoice. 
    Please refer to the note :457511 Question 10.          
    Best regards
    Erika

  • I have been asked to verify my account details. I have moved from UK to New Zealand. I cannot change my country from United Kingdom. When I tap on United Kingdom a red message appears telling me that I have unexpired video rentals, which is irrelevant!

    I have moved from UK to New Zealand. I need to change my address within iTunes because my credit card is now billed to me in NZ. I have an iPad. When I tap United Kingdom within the relevant change personal details section, instead of allowing me to switch countries, a red message comes up telling me that I have unexpired video rentals. This is correct, but it does not help me switch countries. Can anyone help?

    Nothing yet. I have changed my information back to the UK address and, though it is no longer correct, it now allows me to buy stuff. Not good!

  • Warning messages from ME_PROCESS_REQ_CUST  method CHECK

    Hello All,
    I am facing below mentioned issue with BADI ME_PROCESS_REQ_CUST
    1: how can we issue warning messages from BADI ME_PROCESS_REQ_CUST method CHECK?
    2: Check method is called twice if I click on check button in ME52N.
    Thanks

    HI  ,
    You can  use  Below 
    include mm_messages_mac. "useful macros for message handling
    if  ur condition   .
    mmpur_message_forced 'W' 'ME' '083' text-001 '' '' ''.
    endif.
    text-001  : text element   for your description  .
    BUt Warning Message will not keep the screen on error page  .  it will be  better  to use   'E' for error   if you want 
    mmpur_message_forced 'E' 'ME' '083' text-001 '' '' ''.
    regards
    Deepak.
    Edited by: Deepak Dhamat on Oct 21, 2011 8:20 AM

  • Warning Message:- Field BRSCH from structure CUSTOMER-CENTRAL_DATA-CENTRAL-DATA is provided by Business partner

    Hi Experts,
    I get this error when replication the Organization Unit created in transaction BP from CRM to ECC.
    The error is generated in ECC system and Error Class is CVI_EI.
    Any ideas.
    Kind Regards,
    Gaurav

    Hi Gaurav,
    The Business partner does not have 'industry Key' that is reason the warning msg is coming.
    BRSCH- Industry Field
    you can check this in structure 'CMDS_EI_VMD_CENTRAL_DATA ' which will be filled at run time and later validation happen in  Program 'Fill_customer_central' on it. You can set up breakpoint at line number 183 where the validation is failing and warning message is getting raised.
    Please assign point if above information helpful.:-)
    Thanks
    Prem

  • Warning message on jump from a BI report

    On jump from a BI report to another (from any characteristic or key figure), following warning message comes up in the second report "Source selection for 0FISCPER incompatible for target selection". This is user specific, not all users are getting this message. It is not an authorization issue. Please provide your thoughafter and soughtafter suggestions.
    Edited by: Suprabhat99 on May 18, 2011 3:23 PM

    Hi Suprabhat,
    Please check if all the Query restrictions like variables,selection options,interval,hierarchy etc is same for Source and Target Query for that paticular char - 0FISCPER.
    Then Incase there is no discrepancy in above types then please check SAP note 1265027:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31323635303237%7d
    Also below forum should help resolve your issue :
    Re: Jump Query
    Regards,
    Akanksha

Maybe you are looking for

  • Reports of WBS Elements plz reply

    Hi we have one SAP standard reports for WBS elements ( plan/actual/variance) and one whichis customized project management report in Projects systems but both the reports are showing different balance. is there any particular reason for showing diffe

  • Return to item after when-validate-item raises form_trigger_failure

    sorry for this simple question but its been awhile since i've had to program forms... i am doing item validation in a when-validate-item trigger. the trigger raises form_tirgger_failure on item validation failure. is there an easy way to return focus

  • B590: Einbau und Inbetriebnahme mSata SSD als Cache

    Hallo liebe Forengemeinde!In den nächsten Tagen erhalte ich das B590 i3-3110m mit 4GB Ram und Windows 8.1. In Kurzform: Möchte mSATA als SSD Cache (30 GB) installieren im B590. Funktioniert das überhaupt unter Windows 8.1 (Update1)? Muss ich etwas im

  • HT4539 redownload

    How do I re-download my previous purchases from iTunes?

  • Can i see the console.log output in DW?

    hey all! this seems like such a simple question, yet i can't find an answer anywhere.  everyone assumes it will be viewed in Firebug or what have you. i'd like to be able to see the output of console.log in DW, but don't know if that's even possible,