Hirdetés

Új hozzászólás Aktív témák

  • TBG
    senior tag

    Most a getBuffer él hibat ir

    symbol: method getBuffer()
    location: variable outWriter of type Writer
    Note: C:\Users\KEX\Desktop\BikeShop FINALE\src\bikeshop\orej.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    C:\Users\KEX\Desktop\BikeShop FINALE\nbproject\build-impl.xml:926: The following error occurred while executing this line:
    C:\Users\KEX\Desktop\BikeShop FINALE\nbproject\build-impl.xml:268: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 0 seconds

    https://www.dropbox.com/sh/x057q8rnw27kl24/GPbdbymsw7

    A metódus elé tegyél egy annotációt:

    @SuppressWarnings("unchecked")
    public String toXml() {
    StringBuilder xml = new StringBuilder();
    if ( this.emp!=null && !this.emp.isEmpty() ) {
    for (Employee employee: this.emp) {
    // employee to xml, ahogy tetszik.


    // TransformerFactory tf = TransformerFactory.newInstance();
    // Transformer t = tf.newTransformer();
    // DOMSource source = new DOMSource(doc);
    // StreamResult result = new StreamResult(new File("xmldoc.xml"));
    // t.transform(source, result);
    // return result.toString();


    xml.append(employee.toXml());

    }
    }
    return xml.toString();
    }

Új hozzászólás Aktív témák