Deprecated classes

Hello,
I've just downloaded the jsf-examples and modified the build.xml to play with helloDuke a little.
I'm able to compile and run, but I get several warnings, 3 reasons:
FormEvent in javax.faces.event has been deprecated
CommandEvent in javax.faces.event has been deprecated
ApplicationHandler in javax.faces.lifecycle has been deprecated
Does anyone know what replaced these? Or what should we use instead?
thanks!
Denise

Hi,
I also got these depreceted method/class warnings.
� think these messages are coming because this release is a Early Access release. So I think RI designer put these warnings to warn the
users of EA3. Otherwise, developers can continue to use EA without noticing that a stable version released.
Omer

Similar Messages

  • DOM parsing from memory avoid deprecated class usage

    I am parsing an xml file from memory stored in a StringBuffer xmlBuffer like this
    try {
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   InputStream is = new StringBufferInputStream(xmlBuffer.toString());
                   Document doc = db.parse(is);How can i avoid using of that deprecated class?

    Why are you storing the file in memory in a StringBuffer? You could use this method directly:
    [http://java.sun.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.io.File)]
    or from a URI:
    [http://java.sun.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.lang.String)]
    StringBufferInputStream is deprecated because it does not properly convert characters into bytes.

  • Weblogic User class extends deprecated class?

    weblogic.security.acl.User extends java.security.Identity which is a
    deprecated class for Java 1.2
    I checked the 5.1 API docs, this class still extends the
    java.security.Identity. Are there any plans to update this class or if there
    is another class we should use instead of weblogic.security.acl.User ?
    Srikanth Meenakshi

    s> weblogic.security.acl.User extends java.security.Identity which is
    s> a deprecated class for Java 1.2
    This is not a problem. It's okay to use it.
         <b
    Let us pray:
    What a Great System.
    Please Do Not Crash.
    ^G^IP@P6

  • Converting from JDK 1.0 to JDK 1.1    -deprecated classes.

    as the above topic explains.
    this is my code, i still get the -deprecated error even after i replace the classes. i need major help pls!
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public abstract class snake extends Applet implements Runnable,KeyListener,ActionListener
    static int LEFT,RIGHT,UP,DOWN;     
    Image dot[]=new Image[400];
    Image back;
    Image offI;
    Graphics offG;
    int x[]= new int[400];
    int y[]= new int[400];
    int rtemp=1;
    int game=1;
    int level;
    int z;
    int n;
    int count=0;
    int score=0;
    int add=1;
    Button b= new Button("Beginner");
    Button i= new Button("Intermediate");
    Button p= new Button("Professional");
    Button X= new Button("Xtreamest");
    String stemp;
    String s;
    String t;
    boolean go[]=new boolean[400];
    boolean left=false;
    boolean right=false;
    boolean up=false;
    boolean down=false;
    boolean started=false ;
    boolean me=false;
    Thread setTime;
    public void init()
    add(b);
    add(i);
    add(p);
    add(X);
    setBackground(Color.black);
    back = getImage(getCodeBase(), "screan.gif");
    for (z=0 ; z < 400 ; z++){dot[z] = getImage(getCodeBase(), "dot.gif"); }
    public void update(Graphics g)
    Dimension d = this.size();
    if(offI == null)
    offI = createImage(d.width, d.height);
    offG = offI.getGraphics();
    offG.clearRect(0, 0, d.width, d.height);
    paint(offG);
    g.drawImage(offI, 0, 0, null);
    public void paint(Graphics g)
    g.drawImage(back, 0, 0, this);
    g.setColor(Color.white);
    if(started)
    g.setFont(new Font("Verdana", 1, 12));
    t = "Score "+score+"";
    g.drawString(t, 75, 220);
    if(game==1)
    g.setFont(new Font("Verdana", 1, 13));
    s = "Select Mode";
    g.drawString(s, 65, 30);
    b.move(75, 50);
    i.move(68, 90);
    p.move(68, 130);
    X.move(73, 170);
    if((game==2)||(game==3))
    if(!started)
    g.setFont(new Font("Verdana", 1, 11));
    t = "Use the key board arrows to move!";
    g.drawString(t, 5, 215);
    for (z=0 ; z <= n ; z++){  g.drawImage(dot[z],x[z],y[z],this); }
    me=true;
    if(!me)
    g.setFont(new Font("Verdana", 1, 11));
    t = "by Omar Wally, http://crash.to/PLAY";
    g.drawString(t, 5, 215);
    if(game==3)
    g.setFont(new Font("Verdana", 1, 13));
    s="Game Over";
    g.drawString(s, 65, 60);
    public void run()
    for(z=4 ;z <400 ; z++) { go[z]=false;}
    for(z=0 ; z<4 ; z++) { go[z]=true;x[z]=91;y[z]=91;}
    n=3;
    game=2;
    score=0;
    b.move(70, -100);
    i.move(70, -100);
    p.move(70, -100);
    X.move(70, -100);
    left=false;
    right=false;
    up=false;
    down=false;
    locateRandom(4);
    while(true)
    if (game==2)
    if ((x[0]==x[n])&&(y[0]==y[n])){go[n]=true;locateRandom((n+1));score+=add; }
    for(z = 399 ; z > 0 ; z--)
    if (go[z])
    x[z] = x[(z-1)]; y[z] = y[(z-1)];
    if ((z>4)&&(x[0]==x[z])&&(y[0]==y[z])){ game=3; }
    if(left){ x[0]-=10; }
    if(right){ x[0]+=10; }
    if(up){ y[0]-=10; }
    if(down){ y[0]+=10; }
    if(y[0]>191){y[0]=191;game=3;}
    if(y[0]<1){y[0]=1;game=3;}
    if(x[0]>191){x[0]=191;game=3;}
    if(x[0]<1){x[0]=1;game=3;}
    if (game==3)
    if (count <(1500/level)) { count++; } else { count=0;game=1;repaint();setTime.stop(); }
    repaint();
    try{setTime.sleep(level);}
    catch(InterruptedException e){}
    public void locateRandom(int turn)
    rtemp=(int)(Math.random()*20);
    x[turn]=((rtemp*10)+1) ;
    rtemp=(int)(Math.random()*20);
    y[turn]=((rtemp*10)+1);
    n++;
    /*public boolean keyDown(Event e, int key)
    if ((key == Event.LEFT) &&(!right)){left = true; up = false; down = false;if(!started)started=true;}
    if ((key == Event.RIGHT) && (!left)){right = true; up = false; down = false;if(!started)started=true;}
    if ((key == Event.UP) && (!down)){ up = true; right = false; left = false;if(!started)started=true;}
    if ((key == Event.DOWN) && (!up)){down = true; right = false; left = false;if(!started)started=true;}
    return true;
         public void keyReleased(KeyEvent e)
         public void keyTyped(KeyEvent e)
         public void keyPressed(KeyEvent e)
         if ((key == Event.LEFT) &&(!right)){left = true; up = false; down = false;if(!started)started=true;}
         if ((key == Event.RIGHT) && (!left)){right = true; up = false; down = false;if(!started)started=true;}
         if ((key == Event.UP) && (!down)){ up = true; right = false; left = false;if(!started)started=true;}
         if ((key == Event.DOWN) && (!up)){down = true; right = false; left = false;if(!started)started=true;}
         //return true;
    public boolean actionPerformed(ActionEvent event, Object obj)
    stemp = (String) obj;
    if(stemp.equals("Beginner"))
    add=2;
    level=100;
    setTime = new Thread(this);
    setTime.start();
    return true;
    if(stemp.equals("Intermediate"))
    add=5;
    level=70;
    setTime = new Thread(this);
    setTime.start();
    return true;
    if(stemp.equals("Professional"))
    add=10;
    level=40;
    setTime = new Thread(this);
    setTime.start();
    return true;
    if(stemp.equals("Xtreamest"))
    add=20;
    level=20;
    setTime = new Thread(this);
    setTime.start();
    return true;
    return false;
    }

    i still get -deprecated after trying!!! ahh!!!

  • Deprecated Class

    I am attempting to 'import com.borland.jbcl.layout' but java now doesn't recgonise this statement. I am trying to use the XYLayout method, but without the correct libarie it won't work. So does anybody know what it's been updated with?
    Any help would be great.:)

    That is a Borland-specific LayoutManager, so you'd need the Borland-specific library to implement it. This is the trap you can get into when using IDE's to design GUIs: they suddenly "stop working" when you're not in the IDE...

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

  • Provide Multi Language Content in Knowledge Management // Class deprecated

    Hello,
    I tried to implement the blog "Provide Multi Language Content in Knowledgle Management" by Thomas Kuri (BridingIT).
    I have problems to import the the following class:
    import com.sapportals.portal.prt.service.usermanagement.IUserManagementService;
    I always get the warning "The type IUserManagementService" is deprecated. I use the following jar file for that:
    j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.usermanagement\lib\com.sap.portal.usermanagementapi.jar
    Is that the wrong jar file? Or am I doing something else wrong?
    Thanks for your help!!
    Kirsten

    Hi,
    she's trying to implement the code example from this article:
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207ba610-08ac-2b10-1787-fc477da4b5bf
    In this article, the deprecated class is used. Why? The code obviously is not written for EP7, but for EP6 with EP5 support. In the function: getEP5User is used to retrieve the EP5 user.
    If you're not too experienced or just want to try something / PoC it's OK to just copy & paste some sample code. For using this code in an EP7 portal I would recommend to adapt the code.
    br,
    Tobias

  • Deprecated methods/classes

    Does anyone know if, for the SUN Certified Web Component Developer exam, you are tested on the deprecated classes and methods e.g. HttpSession.putValue(), HttpSession.getValue() etc?

    No they are not in the test

  • Morphing class deprecated??

    I have been working with a Morphing example found on the internet (posted below) and when I go to compile the code, I get the following warning:
    "javax.media.j3d.Morph in javax.media.j3d has been deprecated"
    Java 3D is fully functioning on my pc, so it isn't a case of java3d being missing.
    Can anyone help explain? Any help would be greatly appreciated, Thanks.
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.GraphicsConfiguration;
    import java.util.Enumeration;
    import javax.media.j3d.Alpha;
    import javax.media.j3d.Appearance;
    import javax.media.j3d.Background;
    import javax.media.j3d.Behavior;
    import javax.media.j3d.BoundingSphere;
    import javax.media.j3d.BranchGroup;
    import javax.media.j3d.Canvas3D;
    import javax.media.j3d.GeometryArray;
    import javax.media.j3d.Morph;
    import javax.media.j3d.QuadArray;
    import javax.media.j3d.Shape3D;
    import javax.media.j3d.Transform3D;
    import javax.media.j3d.TransformGroup;
    import javax.media.j3d.WakeupOnElapsedFrames;
    import javax.vecmath.Color3f;
    import javax.vecmath.Point3d;
    import javax.vecmath.Vector3d;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    public class Pyramid2Cube extends Applet {
      private SimpleUniverse u = null;
      private BranchGroup createSceneGraph() {
        // Create the root of the branch graph
        BranchGroup objRoot = new BranchGroup();
        // Create a Transformgroup to scale all objects so they
        // appear in the scene.
        TransformGroup objScale = new TransformGroup();
        Transform3D t3d = new Transform3D();
        t3d.setScale(0.4);
        objScale.setTransform(t3d);
        objRoot.addChild(objScale);
        // Create a bounds for the background and behavior
        BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),
            100.0);
        // Set up the background
        Color3f bgColor = new Color3f(0.05f, 0.05f, 0.2f);
        Background bg = new Background(bgColor);
        bg.setApplicationBounds(bounds);
        objScale.addChild(bg);
        // Create the transform group nodes for the 3 original objects
        // and the morphed object. Add them to the root of the
        // branch graph.
        TransformGroup objTrans[] = new TransformGroup[4];
        for (int i = 0; i < 4; i++) {
          objTrans[i] = new TransformGroup();
          objScale.addChild(objTrans);
    Transform3D tr = new Transform3D();
    Transform3D rotY15 = new Transform3D();
    rotY15.rotY(15.0 * Math.PI / 180.0);
    objTrans[0].getTransform(tr);
    tr.setTranslation(new Vector3d(-3.0, 1.5, -6.5));
    tr.mul(rotY15);
    objTrans[0].setTransform(tr);
    objTrans[1].getTransform(tr);
    tr.setTranslation(new Vector3d(0.0, 1.5, -6.5));
    tr.mul(rotY15);
    objTrans[1].setTransform(tr);
    objTrans[2].getTransform(tr);
    tr.setTranslation(new Vector3d(3.0, 1.5, -6.5));
    tr.mul(rotY15);
    objTrans[2].setTransform(tr);
    objTrans[3].getTransform(tr);
    tr.setTranslation(new Vector3d(0.0, -2.0, -5.0));
    tr.mul(rotY15);
    objTrans[3].setTransform(tr);
    // Now create simple geometries.
    QuadArray g[] = new QuadArray[3];
    Shape3D shape[] = new Shape3D[3];
    for (int i = 0; i < 3; i++) {
    g[i] = null;
    shape[i] = null;
    g[0] = new ColorPyramidUp();
    g[1] = new ColorCube();
    g[2] = new ColorPyramidDown();
    Appearance a = new Appearance();
    for (int i = 0; i < 3; i++) {
    shape[i] = new Shape3D(g[i], a);
    objTrans[i].addChild(shape[i]);
    // Create a Morph node, and set the appearance and input geometry
    // arrays. Set the Morph node's capability bits to allow the weights
    // to be modified at runtime.
    Morph morphing = new Morph((GeometryArray[]) g, a);
    morphing.setCapability(Morph.ALLOW_WEIGHTS_READ);
    morphing.setCapability(Morph.ALLOW_WEIGHTS_WRITE);
    objTrans[3].addChild(morphing);
    // Now create the Alpha object that controls the speed of the
    // morphing operation.
    Alpha morphAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE
    | Alpha.DECREASING_ENABLE, 0, 0, 4000, 1000, 500, 4000, 1000,
    500);
    // Finally, create the morphing behavior
    MorphingBehavior mBeh = new MorphingBehavior(morphAlpha, morphing);
    mBeh.setSchedulingBounds(bounds);
    objScale.addChild(mBeh);
    return objRoot;
    public Pyramid2Cube() {
    public void init() {
    setLayout(new BorderLayout());
    GraphicsConfiguration config = SimpleUniverse
    .getPreferredConfiguration();
    Canvas3D c = new Canvas3D(config);
    add("Center", c);
    // Create a simple scene and attach it to the virtual universe
    BranchGroup scene = createSceneGraph();
    u = new SimpleUniverse(c);
    // This will move the ViewPlatform back a bit so the
    // objects in the scene can be viewed.
    u.getViewingPlatform().setNominalViewingTransform();
    u.addBranchGraph(scene);
    public void destroy() {
    u.cleanup();
    public static void main(String[] args) {
    new MainFrame(new Pyramid2Cube(), 700, 700);
    class ColorPyramidUp extends QuadArray {
    private static final float[] verts = {
    // front face
    1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -1.0f,
    -1.0f, 1.0f,
    // back face
    -1.0f, -1.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
    -1.0f, -1.0f,
    // right face
    1.0f, -1.0f, -1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f,
    -1.0f, 1.0f,
    // left face
    -1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, -1.0f,
    -1.0f, -1.0f,
    // top face
    0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
    0.0f,
    // bottom face
    -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
    -1.0f, 1.0f, };
    private static final float[] colors = {
    // front face (cyan)
    0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
    1.0f,
    // back face (magenta)
    1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
    1.0f,
    // right face (yellow)
    1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
    0.0f,
    // left face (blue)
    0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
    1.0f,
    // top face (green)
    0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
    0.0f,
    // bottom face (red)
    1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
    0.0f,
    ColorPyramidUp() {
    super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
    setCoordinates(0, verts);
    setColors(0, colors);
    class ColorCube extends QuadArray {
    private static final float[] verts = {
    // front face
    1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f,
    -1.0f, 1.0f,
    // back face
    -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f,
    -1.0f, -1.0f,
    // right face
    1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
    -1.0f, 1.0f,
    // left face
    -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
    -1.0f, -1.0f,
    // top face
    1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
    1.0f, 1.0f,
    // bottom face
    -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f,
    -1.0f, 1.0f, };
    private static final float[] colors = {
    // front face (red)
    1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
    0.0f,
    // back face (green)
    0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
    0.0f,
    // right face (blue)
    0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
    1.0f,
    // left face (yellow)
    1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
    0.0f,
    // top face (magenta)
    1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
    1.0f,
    // bottom face (cyan)
    0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
    1.0f, };
    ColorCube() {
    super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
    setCoordinates(0, verts);
    setColors(0, colors);
    class ColorPyramidDown extends QuadArray {
    private static final float[] verts = {
    // front face
    0.0f, -1.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 0.0f,
    -1.0f, 0.0f,
    // back face
    0.0f, -1.0f, 0.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 0.0f,
    -1.0f, 0.0f,
    // right face
    0.0f, -1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 0.0f,
    -1.0f, 0.0f,
    // left face
    0.0f, -1.0f, 0.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 0.0f,
    -1.0f, 0.0f,
    // top face
    1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f,
    1.0f, 1.0f,
    // bottom face
    0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
    -1.0f, 0.0f, };
    private static final float[] colors = {
    // front face (green)
    0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
    0.0f,
    // back face (red)
    1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
    0.0f,
    // right face (yellow)
    1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f,
    0.0f,
    // left face (magenta)
    1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
    1.0f,
    // top face (blue)
    0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
    1.0f,
    // bottom face (cyan)
    0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f,
    1.0f, };
    ColorPyramidDown() {
    super(24, QuadArray.COORDINATES | QuadArray.COLOR_3);
    setCoordinates(0, verts);
    setColors(0, colors);
    //User-defined morphing behavior class
    class MorphingBehavior extends Behavior {
    Alpha alpha;
    Morph morph;
    double weights[];
    WakeupOnElapsedFrames w = new WakeupOnElapsedFrames(0);
    // Override Behavior's initialize method to setup wakeup criteria
    public void initialize() {
    alpha.setStartTime(System.currentTimeMillis());
    // Establish initial wakeup criteria
    wakeupOn(w);
    // Override Behavior's stimulus method to handle the event
    public void processStimulus(Enumeration criteria) {
    // NOTE: This assumes 3 objects. It should be generalized to
    // "n" objects.
    double val = alpha.value();
    if (val < 0.5) {
    double a = val * 2.0;
    weights[0] = 1.0 - a;
    weights[1] = a;
    weights[2] = 0.0;
    } else {
    double a = (val - 0.5) * 2.0;
    weights[0] = 0.0;
    weights[1] = 1.0f - a;
    weights[2] = a;
    morph.setWeights(weights);
    // Set wakeup criteria for next time
    wakeupOn(w);
    public MorphingBehavior(Alpha a, Morph m) {
    alpha = a;
    morph = m;
    weights = morph.getWeights();

    A method or (in this case it seems) a class being deprecated is nothing to worry about. All it means is that it is strongly advised that you not use this method/class because they have made something better to use. It also means that support for the method/class is no longer available from the makers and that they will soon be discontinuing the method/class.
    In the case of the Morph class, you can still use it, but it may not be there in the next version or two. If you want to stop those compile warnings, then you can stick this somewhere (before the method that uses the Morph, I think):
    @SuppressWarnings("unused")Using that will Suppress further Warnings of any "unused" (read "no longer supported/deprecated") classes or methods. And in your next program, see if you can find a replacement for the Morph class.
    Tustin2121

  • Warning: [deprecation] getRealPath in ServletRequest has been deprecated

    I have extended class HttpServletRequestWrapper for custom implementation I have neither overriden the method getRealPath(java.lang.String) nor has this method been used/accessed anywhere. I still get following warning
    [javac] /home/pangav1/dev/upgrade/webapps/common/src/minimed/ddms/webapp/common/filter/LocaleFilter.java:222: warning: [deprecation] getRealPath(java.lang.String) in javax.servlet.ServletRequest has been deprecated
    [javac] public static class HttpRequest extends HttpServletRequestWrapper {
    [javac] ^
    Can anyone tell me the reason why compiler shows the warning message?

    It should certainly not be ignored, especially if you don't understand the reason of deprecation and don't know the alternatives, which is the case of the topicstarter. In any case of deprecated classes/methods, the reasoning of deprecation and any alternatives should already be described in the API docs.
    [Here is the API doc of ServletRequest#getRealPath()|http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getRealPath(java.lang.String)]

  • Bogus "deprecated" warnings

    Hi,
    I wrote a class that extends HttpServerResponseWrapper and now I am getting these bogus deprecation warnings:
    warning: [deprecation] setStatus(int,java.lang.String) in javax.servlet.http.HttpServletResponse has been deprecated
    class CacheResponseWrapper extends HttpServletResponseWrapper
    Thing is, I am not overriding or invoking setStatus() at all so what gives? Is this a bug in the javac compiler?
    Gili

    Its not a bug. When implementing an interface, you get this warning if you don't declare the implementation of any deprecated methods declared in the interface as being deprecated in the implementation. HttpServletResponseWrapper doesn't declare its implementation of setStatus(int, String) as deprecated, so this is why you are seeing the warning. If you override the method and mark it as deprecated in your class, the warning will dissappear.

  • Deprecated log level constants

    Hi,
    In my DB class I have the following:
    sssn.setLogLevel(DefaultSessionLog.FINE);
    where sssn is a Server session. In Eclipse I'm getting the warning:
    The field SessionLog.FINE is deprecated
    I can see in the javadoc that that is the case but as far as I can tell there are no other constants defined and I should just use int:s to avoid the warnings.
    I'm reluctant to do that since that is not as descriptive as the constant and what if the int:s representinh the desired level change in a future relase?
    Am I missin something here or did Oracle miss something when they deprecated the level constants and not just the methods of the class?
    Regards,
    Andrei

    Andrei,
    We did miss something here. When SessionLog (oracle.toplink.sessions) was deprecated and the new SessionLog (oracle.toplink.logging) was introduced we ensured backwards compatibility through inheritance.
    I have also seen the issue within JDeveloper when I use SessionLog (oracle.toplink.logging) statics. The warning shows in the code editor but I do not get any compiler warning for the deprecation.
    The issue is that in this case we did not replicate the statics to the non-deprecated classes. This issue has been logged and will be addressed in a future release.
    Doug

  • Deprecation with wlwBuild ant task?

    <pre>Dear All,
    How can I turn on deprecation for the ant task wlwBuild for Workshop applications?
    I have tried the attribute deprecation="on" for wlwBuild, but it did not work.
    Thanks a lot!
    George</pre>

    Well, I wish to find out all the deprecated classes and methods used in code, during compilation time.
    The ant task javac has the attribute deprecation which accomplishes the task.
    Similarly, is there anything in the ant task wlwBuild?
    Thanks a lot!
    George

  • Replacement for deprecated StringBufferInputStream

    I'm working on something where I need to compare sets of String name/value pairs. Some of the name/value pairs are in a String in java.util.Properties format.
    My approach has been to use
    aPropertiesObject.load(new StringBufferInputStream(the_string_with_nvps));to put the String's name/value pairs into a Properties object, and then compare that Properties object with another one that should have the same name/value pairs.
    Unfortunately, StringBufferInputStream is deprecated. I can't find a suitable replacement. The API suggests StringReader, but I don't see how I can use that to load values into a Properties object.
    It looks like my choices are to use a deprecated class, or have to deal with parsing the string myself, which I'd prefer to avoid.
    Is there a way to automatically parse the string into a set of name/value pairs without relying on deprecated classes?

    That is my problem too.
    Does anyone know how I can avoid using the deprecated StringBufferInputStream?

  • How I make deprecated method in JB4

    Hi, i make deprecated method like this:
    * @deprecated
    public String fillCharsToLimit(String value, int limit, char chr, boolean fromFirst) {
    value = value.trim();
    if (value == null || (value.length() == 0 && limit <= 0))
    ;//do st
    (in project properties i enable Show deprecations)
    I except that compiler say me warning.
    Its ignore deprecation in my code, but when I use deprecated method from JDK all is OK, only my method no why?
    Thanks DK

    You don't get a deprecation warning if the deprecated class or method and the code that uses the deprecated class or method are compiled at the same time. See Bug 4216683 http://developer.java.sun.com/developer/bugParade/bugs/4216683.html for details.

Maybe you are looking for

  • Button Event Handler in a JList, Please help.

    Hi everyone, I have created a small Java application which has a JList. The JList uses a custom cell renderer I named SmartCellRenderer. The SmartCellRenderer extends JPanel and implements the ListCellRenderer. I have added two buttons on the right s

  • White lines in 3d text

    I'm new to illustrator so this might be a very simple/obvious problem to fix. I have text that I have extruded. Unfortunately, the resulting text has white lines throughout it. (I've attached a picture). My understanding is that Object > Expand Appea

  • HT2731 I live in Ireland and my account is asking for a post code

    I cannot set up my bank details on I tunes as it requires a post code that I do not have what do I put in its place

  • Negative sign disappears in Update Rule assignemnt

    Hello, I have a strange problem with an update rule. I try to copy a number with comma and sign into an attribute FI_TAXRT of an InfoObject. The number get ther ecorrectly but the sign deiappears. FI_TAXRT = Key Figure of type Number  (Dec =counter o

  • TS3274 can I keep my old Ipad with the same name?

    I bought a new Ipad 3rd Gen and are using my same AT&T account for 3G.  My wife wants to continue using my old one, I restored via I cloud to set up my new one like the old one.  Are we sharing the AT&T account now?