Warning: [unchecked] unchecked conversion.. how to avoid this warning?

Hi all,
When i compile my java file, i get this warning.
Z:\webapps\I2SG_P2\WEB-INF\classes\com\i2sg>javac testwincDB.java
Note: testwincDB.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Z:\webapps\I2SG_P2\WEB-INF\classes\com\i2sg>javac -Xlint testwincDB.java
testwincDB.java:15: warning: [unchecked] unchecked conversion
found   : java.util.ArrayList
required: java.util.ArrayList<java.lang.String[]>
    ArrayList <String[] > recRep2 = dbh.getReconReport2(projID);My functions are:
public ArrayList getReconReport2(int projID)
        ArrayList <String[] > recRep2 = new ArrayList <String[] > ();
        String getReconReportQuery2 = "select recon_count FROM i2sg_recon1 WHERE PROJECT_ID = " + projID;
        int i=0;
        try {
        resultSet = statement.executeQuery(getReconReportQuery2);
              while (resultSet.next())
                     recRep2.add(new String[1]); // 0:RECON_COUNT
            ((String []) recRep2.get(i))[0] = resultSet.getString("RECON_COUNT");
                     i++;
              resultSet.close();
              } catch (Exception ex)
            ex.printStackTrace(System.out);
        return recRep2;
    }and
import java.sql.*;
import java.util.ArrayList;
import java.util.*;
public class testwincDB
    public static void main(String args[])
    int projID=8;
    wincDB dbh = new wincDB();
    ArrayList <String[] > recRep2 = dbh.getReconReport2(projID);
    int totalRec = recRep2.size();
     for(int i=0;i<totalRec;i++)
    System.out.println(((String []) recRep2.get(i))[0]);
}Thanks in advance,
Lakshma

found : java.util.ArrayList
required: java.util.ArrayList<java.lang.String[]>
ArrayList <String[] > recRep2 = dbh.getReconReport2(projID);This tells all about the warning.....
public ArrayList getReconReport2(int projID)change it to:
public ArrayList<String[]> getReconReport2(int projID)Thanks!
Edit: Very late.... :-)
Edited by: T.B.M on Jan 15, 2009 7:20 PM

Similar Messages

  • My macbook keeps asking me to use an administrator and their password to continue but nobody seems to know who is the administrator for this computer...does anyone know how to avoid this this or figure out who the administrator is?

    My macbook keeps asking me to use an administrator and their password to continue but nobody seems to know who is the administrator for this computer...does anyone know how to avoid this this or figure out who the administrator is?

    Lynne130,
    to figure out which users have administrative privileges, open the Users & Groups pane of System Preferences; each user other than the Guest User will be shown with a description of either “Admin” or “Standard”. It’s typical for the first user created on a Mac to be an administrative user.

  • Why do all the programs open when the mini is turned on, and how to avoid this?

    why do all the programs open when the mini is turned on, and how to avoid this?

    Open System Preferences > Users & Groups then select the Login Items tab.
    Remove all apps listed there.
    And check /Library/StartupItems
    Open a Finder window. From the Finder menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/StartupItems
    Click Go then move all items from the StartupItems folder to the Trash.

  • After adding MIME type in sharepoint server, file click opens a popup for file to open as readonly or edit, How to avoid this popup

    After adding MIME type in sharepoint server,
    File click opens a popup for file to open as readonly or edit, How to avoid this popup
    Popup Details:
    You are about to open --> File Details
    How would you like to open --> ReadOnly, Edit
    OS: Window 7
    Jagadish

    this is likely caused by the library requiring check-out/check-in. For a file to be editable, the file needs to be checked out.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • After writing into serial port, the same message gets bounced back into the Inqueue also. If anyone know how to avoid this, please rpely.

    Hi,
    After writing into serial port, the same message gets bounced back into the Inqueue also. If anyone know how to avoid this, please reply.
    Thanks,
    Ganesh

    If you disconnect the cable going to the serial device, do you still get the echo? If so you have something going on in the port setup. If disconnecting the cable stops the echo then the device you're talking to is doing it - which would be my bet. One thing to check is whether this might not be normal operation. I have seen devices that if a command was successful, it simply echo'd back the command string you had sent. Also many serial devices have setting for specifying whether they are to echo commands.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Hi. My Ipad2 is being reseted each 1 minut of use and then I found this description "resetcounter(date and time).plist". Someone knows what this means and how to avoid this? Many, many thanks. iPad 2

    Hi. My Ipad2 is being reseted each 1 minute of use and then I found this description "resetcounter(date and time).plist". Someone knows what this means and how to avoid this? Many, many thanks.
    iPad 2

    Try resetting your device by holding down both the home and lock buttons for ~10 seconds or until the device restarts, ignoring the power slider. 

  • How to avoid this?

    Hi
    i'm calling reprots from the forms.My problem is we are calling 3 reports at a time i,e one after the other, this will works fine in report 5 for screen but in 10g this will overlap all the output to a single pdf file (here i'm using cache)so that i'm getting only the third file.
    how to avoid this? so that i can have 3 diffrent pdf files or one after the other if first close second open,second close third open.
    please help me,
    thanks and regards
    vishwa

    IF :BLK_MAIN.CKB_REP7 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast03');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast03',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    IF :BLK_MAIN.CKB_REP6 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast05');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast05',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    IF :BLK_MAIN.CKB_REP1 = 1 THEN
    report_id:=FIND_REPORT_OBJECT('Mast04');
    RUN_REPORT_OBJECT_PROC(report_id,
    SERVER_NAME,
    'pdf',
    CACHE,
    'Mast04',
    'paramform=no PDFCOMP=0 EXPIRATION=120 desformat=pdf P_COMP_CODE='||:GLOBAL.G_COMP_CODE||' '||
    'P_UNIT_CODE='||:GLOBAL.G_UNIT_CODE||' '||'P_TRUST_CODE='||:GLOBAL.G_TRUST_CODE,
    IP_ADDRESS);
    END IF;
    In the above code,3 check box are like :BLK_MAIN.CKB_REP7,:BLK_MAIN.CKB_REP6,:BLK_MAIN.CKB_REP1 which end user selects(he can choose any one or all three).If select all 3 the report masto4 only comes,mast05,mast03 also
    comes but those pdf's are overlaped from the report mast05.
    But in the earlier version of forms and reports, if close the first report then second will come and like that.

  • How i avoid this window and directly fetched date

    hi master
    sir i have three options button when i select anyone then my query change and fatch new data
    but before fetching data system show new windows with this message
    Do you want to save the changes you have made ?
    with yes / no /cancel button
    sir how i avoid this window and directly fetched date
    or how bypass this message
    please give me idea

    bro, when u execute the query to fetch records it tries to validate the form and pops an alert message. if u want to avoid it do this
    change : execute_query;
    to: execute_query(no_validate);
    now it wont ask for validation of the previous records present on the form, but make sure such actions are not not a threat to data integrity.
    zaibi.

  • How to avoid this no read acess in EPC

    hi to all experts.
    im getting this error in Extended Program Check how to avoid this error .
    No read access to field string SWIFT

    Hi,
    Field swift was not read in program, which means field swift was not used in program.If swift was necessary use it with read access.
    Hope this helps you
    Regards,
    Rajani

  • Why Memory Manager .cpp Error.How to avoid this

    I am getting getting the attached error when developing labview program.
    Why this error is coming?
    How to avoid this?
    Attached the error screen shot
    Attachments:
    MemoryCppError.png ‏33 KB

    Hi Selvan,
    we don't know your VI, thus we don't know the cause…
    Practical advice: save often, save early!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Pluggin container makes flash player crash. all is up to date. How to avoid this?

    Question
    pluggin container makes flash player crash. all is up to date. How to avoid this?

    First, download and run the Flash uninstaller: [http://kb2.adobe.com/cps/141/tn_14157.html http://kb2.adobe.com/cps/141/tn_14157.html] . You probably want the 64-bit version. After that has run, restart your computer, and then let's download a fresh version of Flash. Try downloading and installing it from [http://fpdownload.macromedia.com/pub/flashplayer/current/licensing/win/install_flash_player_11_plugin_32bit.exe here].
    Once you have flash installed again, start Firefox up, and see if you are getting any errors. If it works, awesome, if not, let's move on.
    Start Firefox up in [[Safe Mode|Safe Mode ]] (don't select any of the checkboxes that appear). If Flash works here, then it is one of your addons which is causing a problem.
    If we are still having a problem, try [[Updating your graphics driver|Updating your graphics driver]] .
    If none of these work, read [[Troubleshooting plugins|Troubleshooting plugins]] and let me know!

  • How can I avoid this warning casting my return value?

    I'm new to generic methods. I coded this method to get the selected item from a JComboBox only if it is of the specified type class. But I get a compiler warning when I try to assign to the return value:
    public static <T> T getSelectedComboItem(JComboBox combo, Class<T> c)
    T ret = null;
    Object selected = combo.getSelectedItem();
    if (selected != null && selected.getClass() == c)
    // Warning: Type safety: unchecked cast from Object to T
    ret = (T) selected;
    return ret;
    Can anybody tell me how to do this cleanly?
    Thanks!

    If I'm not mistaken:
    ret = c.cast(selected);

  • How to reslove this warning?

    warning: [path] bad path element "C:\jdk1.5.0\lib\htmlparser.jar": no such file
    or directory
    KaoqinRecord.java:105: warning: [unchecked] unchecked conversion
    found : java.util.Set
    required: java.util.Set<java.lang.String>
    Set<String> set = h.keySet();
    ^
    2 warnings

    warning: [path] bad path element
    "C:\jdk1.5.0\lib\htmlparser.jar": no such file
    or directoryThe above tells you the jar can't be found.
    KaoqinRecord.java:105: warning: [unchecked] unchecked
    conversion
    found : java.util.Set
    required: java.util.Set<java.lang.String>
    Set<String> set = h.keySet();
    ^The above is a warning from the new generics feature that's telling you the assignment isn't typesafe. Try
    Set<String> set = h.keySet<String>();
    2 warnings

  • Form distribution submit button: how to avoid this or remove it when it's automatically inserted?

    I've form(s), created in Acrobat X Pro, that I want to put on a web page for download and fill in.  I tried this with FDF but... because I have a number of forms it proved very time consuming to match the FDF data to the relevant form.  I'm now trying to do this through acrobat,com and form distribution.
    Help pages for Acrobat X Pro state;
    "Home / Using Acrobat X Pro / Forms
    Setting action buttons
    Add a submit button
    When you distribute a form, Acrobat automatically checks the form. If it doesn’t find a submit button, it adds a Submit Form button to
    the document message bar. Users can click the Submit Form button to send completed forms back to you. If you don’t plan to use the
    Submit Form button created by Acrobat, you can add a custom submit button to your form."
    My form already has a submit button (whose target I changed to acrobat.com) which also submits to PayPal for payment and pops up a warning message to avoid (hopefully) double submission etc. (which works OK in the undistributed form) but the wizard doesn't detect this and inserts an additional submit button - top right, in the purple area.
    How can I avoid this or remove it?
    Acrobat X Pro
    Win 7 32 Ult

    *Image Block: https://addons.mozilla.org/firefox/addon/image-block/

  • I can not add the warning before buying an app. Could you please explain how to add this warning

    Please tell me how to add the warning before purchasing an app?

    Hey klw67
    Thanks for the question. Are you referring to the prompt for your password? If so, this can be achieved by utilizing the Restrictions (parental controls) of the specific device. For information on setting up and using Restrictions, see this resource:
    iOS: Understanding Restrictions (parental controls)
    http://support.apple.com/kb/HT4213
    You can prevent access to specific content types:
    - You can also adjust the time necessary before a password is required to purchase content.
    Thanks,
    Matt M.

Maybe you are looking for

  • Price including Tax

    Hi all friend and Laxmi I have a problem that how to calculate that where a price in including the tex amount e.g Amount 100 (including tax) Tax        4% then how to calculate Net value (Amount- Taxes) Hope you all understand is there any alt cal ty

  • Trying to publish to Flickr and get code error 4, document is empty?

    Does anyone have a solution to the question?

  • Linking to networked symbols/swatches folder

    Is it possible to make Illustrator point to a networked folder containing symbol libraries and swatches??? I have developed a number of custom libraries of symbols for my company and would like to allow other users on our network to access these symb

  • Faces-config as file resource?

    Is it possible to use a faces configuration file stored on the server, instead of in the WEB-INF directory? I'd like to store some server specific settings in our dev and QA environments and have my JSF app look them up something like this: Web.xml <

  • Why is it that taking HP so long to release the n-trig driver for windows 7?

    I am very disappointed at HP and how they are handling their Windows 7 support. I am just hoping the delay is not because they are adding new touch gestures for their TouchSmart media software. Any ideas? This question was solved. View Solution.