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.

Similar Messages

  • How to make a method global so that it can be used in another component.?

    Hi,
    Is it possible to make a method global so that it can be used in another component.?
    i.e I have one component C1 and methods declared in this component M1, M2, ...
    Now I have another component C2 and in this component i want to use method M1 of component C1.
    how to do so?
    Any inputs will be appreciated.
    Thanx.

    Hi,
    As Uday said, To make the method as global of component say C1, You have to make method as interface by clicking the check box.
    Now while using the method in other component say C2, you have to follow following steps:
    1. In used component of comp. C2, add component C1.
    2. Instantiate the component atleast once in any of the method of component using code wizard option:
    'Instantiate Used Componet'.
    3. Now you can call the method of component C1 using code wizard option 'Method call in used controller'

  • How to make a method sleep without affecting the responsiveness of the GUI

    Hi,
    I want to make a method sleep for a few second before executing the rest of its body. Apparently Thread.sleep(10000) doesn't do the job as it makes the GUI non-responsive.
    Any advice would be deeply appreciated.
    Thomas

    Here's an example:
    package tjacobs.ui.ex;
    import java.awt.Color;
    import javax.swing.Icon;
    import javax.swing.JLabel;
    import tjacobs.ui.util.WindowUtilities;
    * @author tjacobs
    public class Blink extends JLabel implements Runnable {
         public static final long DEFAULT_TIME_LENGTH = 1000;
         private long mTimeLength = DEFAULT_TIME_LENGTH;
         private String mLabel;
         private Icon mIcon;a
         public void run() {
              mLabel = getText();
              mIcon = getIcon();
              try {               
                   while (true) {
                        Thread.sleep(mTimeLength);
                        String current = getText();
                        if (current.equals(mLabel)) {
                             setText("");
                             setIcon(null);
                        else {
                             setText(mLabel);
                             setIcon(mIcon);
                        repaint();
              catch (InterruptedException ex) {
                   ex.printStackTrace();
              finally {
                   setText(mLabel);
                   setIcon(mIcon);
         public Blink() {
         public Blink(String arg0) {
              super(arg0);
         public Blink(Icon arg0) {
              super(arg0);
         public Blink(String arg0, int arg1) {
              super(arg0, arg1);
         public Blink(Icon arg0, int arg1) {
              super(arg0, arg1);
         public Blink(String arg0, Icon arg1, int arg2) {
              super(arg0, arg1, arg2);
         public void setBlinkTime(long time) {
              mTimeLength = time;
         public long getBlinkTime() {
              return mTimeLength;
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              Blink b = new Blink("Hello World");
              b.setBackground(Color.RED);
              WindowUtilities.visualize(b);
              b.setFont(b.getFont().deriveFont(24.0f));
              b.run();
    }

  • How to make update method permanent once and forever?

    Hi,
    Every time I get an update to Flash and install it, at the end of the install I get the three update choices of ‘Allow Adobe to install updates (recommended)’, ‘Notify me to install updates’ and ‘Never check for updates (not recommended)’. Every time I choose the second option and every single subsequent time there is an update I have to go through the same procedure again because the first option becomes selected. I do NOT want Adobe to perform automatic updates. Is there a way to set it to notify me of updates but never bug me to change my update method? I have tried changing the setting through the Control Panel but this doesn’t make any difference either. I just want to be notified of updates but not be pestered with those same three options EVERY time.

    This answer is NOT working. The line "SilentAutoUpdateEnable=0" is already present. And it still queries for the annoying question, even when asked and answered ad nauseum.
    Adobe should in the very next update, as a minimum, make it such, that the chosen value in "Choose your update method:" remains PERMANENT and FOR EVER until the user changes it. It is WILDLY annoying to have to answer this question over and over and over and over and over and over again. Make a new value or something that will be written to the mms.cfg file, that will permanently understand this setting, I Want to update, but I want to know when and how and why, and I especially want to do it myself - Automatic updates can for novice users be nice, until it screws up the entire system - but for super user level or above it is an annoyance, that programs do not respect the answers of the user. It SHOULD ask this question ONCE, and never ever there after - unless the user changes the behaviour, in e.g. the mms.cfg file.
    I hope this is crystal clear --- it should be, and I cannot fathom that millions of other users are not annoyed by this popup box ... When i press "DONE" ... it should be EXACTLY THAT - notify me to install updates, BUT NOT to ask it every time what "update method" i want to use -- i've only told you a million times before --- just freaking get the answer and understand it.
    Annoyed regards : CyberstormXIII

  • How to make reusable methods?

    I have a program that reads through a collection of project Ids, connects to a website, inputs the project id in one at a time. I then collect data from the website and insert it into a DB. I have code in my program that I have copied over and over again, but have modified certain variables, strings etc... to get it to work. It works great, but I want to make this code that I use over and over, into a method(s) that I can just call when ever I feel like it.
    below is the posted program. Please Note that the urls that are being connected to are not real, I have taken them out so that the data on this site is protected. The createProject is the method that has all the crazy code. I am sorry for this code, I know its probably terrible, but I am a newbie. Thanks public class URLReader
        public URLReader()
           dbConn = new DBConnection();      
       public java.util.Collection getProjectIDs() throws Exception 
          // get the progrect ID's from our database
            java.util.ArrayList projectIds = new java.util.ArrayList();
            dbConn.dbConnection();
            java.sql.Statement stmt = dbConn.createStatement();
            String SQL = "SELECT distinct PROJECT_ID FROM EMSP.PROJECTS";
            java.sql.ResultSet rs = stmt.executeQuery(SQL);
            while(rs.next())
                    projectIds.add(new Integer(rs.getInt("PROJECT_ID")));
            System.out.println("Project ID " + projectIds);
            System.out.println("Project ID Length " + projectIds.size());
            dbConn.close();
           return projectIds;
       public String extractString( String text)  // I think I can already use this method over and over again
          int count = 0;
          char separator = ' ';
          // Determine the number of substrings
          int index = 0;
          do
             ++count;
             ++index;
             index = text.indexOf(separator, index);
          while (index != 1);
          //Extract the substring into an array
          String[] subStr = new String[count];
          index = 0;
          int endIndex = 0;
          for(int i = 0; i < count; i++)
             endIndex = text.indexOf(separator, index);
             if(endIndex == -1)
                subStr[i] = text.substring(index);
             else
                subStr[i] = text.substring(index,endIndex);
             index = endIndex + 1;
          return text;
       public static java.lang.String getString(String text, String target, String startTag, String endTag)
          int offset = text.indexOf(target);
              if (offset == -1) return "";
              int start = text.indexOf(startTag, offset);
              if (start == -1) return "";
              start += startTag.length();
              int end = text.indexOf(endTag, start);
              return end == -1 ? "" : text.substring(start, end);
       public Project createProject(int projectId) throws Exception
          Project proj = new Project();
          try
              /******************Project Details Page**********************/
                java.net.URL projectDetails = new
                java.net.URL("http://someSite.com/portfolio/ProjectDetails.asp?Source=Tracking&Key="+projectId);
                java.io.BufferedReader in =
                            new java.io.BufferedReader(new java.io.InputStreamReader(projectDetails.openStream()));
                String projDetailspage = new String("");
                String inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    projDetailspage = projDetailspage.concat(inputLine.trim());
                System.out.println("project ID: "+ projectId);
                //**** get the contact Details Page ID  from Project Details Page****/
                String contactDetailsId ="";                       
                String contactDetailsStr = (String)(projDetailspage.split("\\<h3\\>Project Details\\</h3\\>")[1].split( 
                "\\<td valign=\"top\"\\>")[1].split("\\=\"ChangeImage\\(")[0].trim());
                // takes the string that was ripped out between the opening and closing tags
                // searches for an integer and then coverts it to a string.
                String conId = "";
                java.util.regex.Pattern conDetStr = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher conDetMatch = conDetStr.matcher(contactDetailsStr);
                conDetMatch.find();
                conId = conDetMatch.group(1); // assuming it matched...
                System.out.println( "\tcontactDetails ID:"+ conDetMatch.group(1).toString());
                //**** extract the Data from Project Details Page ****//
                String projectTitle = (String)(projDetailspage.split("\\<[Bb]\\>Project Title:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String LeadPI= (String)(projDetailspage.split("\\<[Bb]\\>Lead PI:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                 // This code I have copied and posted alot into different places.
                int count= 0;
                while(LeadPI.charAt(count)!=',')
                    count++;
                String investigator=LeadPI.substring(0,count).trim();
                String institution=LeadPI.substring(count+2, LeadPI.length());
                institution = institution.trim();
                System.out.println("\tinvestigator: "+investigator);
                System.out.println("\tinstitution: "+institution);
                /*********************** new test stuff  *********************/
                String text = projDetailspage;
                String target = ">Researcher(s):<";
                String startTag = "<font size=\"-1\">";
                String endTag = "</table>";
                String researchers = Testing.getString(text, target, startTag, endTag);
                System.out.println("researchers before for loop: "+ researchers);
                researchers = researchers.replaceAll("\\<.*?\\>","|").replaceAll("\\|+","|").replaceAll(",.*?\\|",",");
                researchers = researchers.replaceAll("<td width=\"70%\" align=\"left\" valign=\"top\">", "" ).replaceAll("><td width=\"30%\">","" );
                String[] investigators = researchers.substring(1,researchers.length() - 1).split(",");
                System.out.println("investigator1 = "+investigators[0]);
                System.out.println("investigator2 = "+investigators[1]);
                System.out.println("investigator3 = "+investigators[2]);
                System.out.println("investigator4 = "+investigators[3]);
                for(int x = 0; x < investigators.length; x++)
                   System.out.println("New researchers are now Investigators: " +investigators[x].toString()); 
                /*********************** end test stuff  *********************/
                /*************** Contact Details Page ***********************/
                contactDetailsId = conId;  // gets its url(projectId) from the previous page projectDetailsPage
                java.net.URL contactDetails = new
                java.net.URL("http://someSite.com/portfolio/ContactDetails.asp?ProjectID="+contactDetailsId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(contactDetails.openStream()));
                String conDetailsPage = new String("");
                inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    conDetailsPage = conDetailsPage.concat(inputLine.trim());
                //**** get the contact Full Details ID  ****/
                String contactFullDetailsId ="";
                String institutionId = "";
                String contactFullDetailsStr= (String)(conDetailsPage.split("\\<[Bb]\\>Principal Investigator\\</[Bb]\\>")[1].split( 
                "\\<li\\>")[1].split("\\</a\\>")[0].trim());
                String institutionDetailsStr= (String)(conDetailsPage.split("\\<[Bb]\\>Principal Investigator\\</[Bb]\\>")[1].split( 
                "\\</li><ul><li\\>")[1].split("\\</a\\>")[0].trim());
                // takes the string that was ripped out between the opening and closing tags
                // searches for an integer and then coverts it to a string.
                String fullId = "";
                java.util.regex.Pattern conFullDetId = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher conFullMatch = conFullDetId.matcher(contactFullDetailsStr);
                conFullMatch.find();
                fullId = conFullMatch.group(1); // assuming it matched...
                System.out.println( "\tcontactFullDetailsID: "+ conFullMatch.group(1).toString());
                String instiId = "";
                java.util.regex.Pattern instiStr = java.util.regex.Pattern.compile("\\b(\\d+)\\b");
                java.util.regex.Matcher instiMatch = instiStr.matcher(institutionDetailsStr);
                instiMatch.find();
                instiId = instiMatch.group(1); // assuming it matched...
                System.out.println( "\tinstitution ID:"+ instiMatch.group(1).toString());
                //String str = (String)(projDetailspage.split("\\<[Bb]\\>Researcher(s):\\</[Bb]\\>")
                //[1].split( "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                //System.out.println("String before replace all: "+ str);
                //**** get the Institution Details ID ****/
                //String institutionsID = instiId;
                //institutionsID = (String)(projDetailspage.split("\\<h3\\>Principal Investigator\\</h3\\>")[1].split( 
                //"\\<li><a href=InstDetails.asp?InstitutionID\\=")[1].split("\\</a\\>")[0].trim());
                //System.out.println("InstitutionID: "+institutionsID);
                /************* Contact Full Details Page ********************/
                contactFullDetailsId = fullId;
                java.net.URL contactFullDetails = new
                java.net.URL("http://someSite.com/portfolio/ContactFullDetails.asp?Mode=P&ID="+contactFullDetailsId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(contactFullDetails.openStream()));
                String conFullDetailsPage = new String("");
                inputLine = "";
                while ((inputLine = in.readLine()) != null)
                    conFullDetailsPage = conFullDetailsPage.concat(inputLine.trim());
                /**** extract the Data from Project Details Page ****/
                 String investigatorTitle = (String)(conFullDetailsPage.split("\\<[Bb]\\>Title:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String investigatorPhone = (String)(conFullDetailsPage.split("\\<[Bb]\\>Phone:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String investigatorEmail = (String)(conFullDetailsPage.split("\\<[Bb]\\>E-mail:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String department = (String)(conFullDetailsPage.split("\\<[Bb]\\>Mailing Address:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                count= 0;
                while(investigatorEmail.charAt(count)!='>')
                    count++;
                String investiEmail=investigatorEmail.substring(0,count).trim();
                String email=investigatorEmail.substring(count+1, investigatorEmail.length());
                email = email.replaceFirst("</a>", "");
                //getContactName - FirstName, MiddleI, LastName, Prefix.
                //getContactAddress - Street, City, State, Zip.
                /*************** Institution Details Page *******************/
                institutionId = instiId;
                java.net.URL institutionDetails = new
                               java.net.URL("http://someSite.com/portfolio/InstDetails.asp?InstitutionID="+institutionId);
                in = new java.io.BufferedReader(new java.io.InputStreamReader(institutionDetails.openStream()));
                String instDetailsPage = new String("");
                inputLine ="";
                while ((inputLine = in.readLine()) != null)
                    instDetailsPage = instDetailsPage.concat(inputLine.trim());
                /**** extract the Data from Project Details Page ****/
                String institutionType = (String)(instDetailsPage.split("\\<[Bb]\\>Institution Type:\\</[Bb]\\>")[1].split( 
                "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                String institutionURL = (String)(instDetailsPage.split("\\<[Bb]\\>Web Site Home Page:\\</[Bb]\\>")[1].split( 
               "\\<font size=\"-1\"\\>")[1].split("\\</font\\>")[0].trim());
                count= 0;
                while(institutionURL.charAt(count)!='>')
                    count++;
                String instiURL=institutionURL.substring(0,count).trim();
                String url=institutionURL.substring(count+1, institutionURL.length());
                url = url.replaceFirst("</a>", "");
                System.out.println("\turl: "+ url);
                 //"\\<li\\>")[1].split("\\</a\\>")[0].trim());
                //System.out.println("InstitutionID: "+institutionType);
                //getInstName
                //getInstType
                //getInstAddress - City, State, Zip
                //getInstURL
           /*************** Set the Project Objects ***********************/
                //**** Idaho Project Objects ****//
                proj.setProjectTitle(projectTitle);
                proj.setProjectId(projectId);
                //**** Idaho Investigator Objects ****//
                proj.setInvestigator(investigator);
                proj.setInstitution(institution);
                proj.setInstitutionType(institutionType);
                proj.setInstitutionURL(url);
                proj.setInvestigatorTitle(investigatorTitle);
                proj.setInvestigatorPhone(investigatorPhone);
                proj.setEmail(email);
                proj.setDepartment(department);
           catch( java.lang.NullPointerException npe)
              System.out.println("npe error" + npe);
          catch( java.lang.ArrayIndexOutOfBoundsException aio)
              System.out.println("npe error" + aio);
           return proj;
       public void persistProject(Project proj) throws Exception
           dbConn.dbConnection();
           java.sql.PreparedStatement insertProjects;
           //String insertProjectString = "INSERT into IDAHO_PROJECTS(PROJECT_ID,PROJECT_TITLE) values (?,?)";
           String insertProjectString = "INSERT into IDAHO_PROJECTS(PROJECT_ID,PROJECT_TITLE) values (?,?)";
           insertProjects = dbConn.prepareStatement(insertProjectString);
           insertProjects.setInt(1, proj.getProjectId());
           insertProjects.setString(2, proj.getProjectTitle());
           insertProjects.execute();
           java.sql.PreparedStatement insertInvestigators;
           String insertInvestigatorString = "INSERT into IDAHO_INVESTIGATORS(PROJECT_ID, INVESTIGATOR,INVESTIGATOR_TITLE,DEPARTMENT, INSTITUTION,INSTITUTION_TYPE,INSTITUTION_URL,PHONE,EMAIL) values (?,?,?,?,?,?,?,?,?)";
           insertInvestigators = dbConn.prepareStatement(insertInvestigatorString);         
           insertInvestigators.setInt(1, proj.getProjectId());
           insertInvestigators.setString(2, proj.getInvestigator());
           insertInvestigators.setString(3,proj.getInvestigatorTitle());
           //insertInvestigators.setString(3,proj.getInvestigatorType());
           insertInvestigators.setString(4, proj.getDepartment());
           insertInvestigators.setString(5, proj.getInstitution());
           insertInvestigators.setString(6, proj.getInstitutionType());
           insertInvestigators.setString(7, proj.getInstitutionURL());
           insertInvestigators.setString(8,proj.getInvestigatorPhone());
           insertInvestigators.setString(9,proj.getEmail());
           // insertInvestigators.setString(2,proj.getAddress1());
           // insertInvestigators.setString(2,proj.getAddress2());
           // insertInvestigators.setString(2,proj.getCity());
           // insertInvestigators.setString(2,proj.getState());
           // insertInvestigators.setString(2,proj.getZip());
           insertInvestigators.execute();   
           dbConn.close();
       public static void main(String[] args) throws Exception
           URLReader urlReader = new URLReader();
           java.util.Collection projectIds = urlReader.getProjectIDs();
           for(java.util.Iterator iter = projectIds.iterator();iter.hasNext();)
               Integer projectId = (Integer)iter.next();
               Project project = urlReader.createProject(projectId.intValue());
               //Contact contact = urlReader.parseConact(project.getConactId());
               urlReader.persistProject(project);                
           // do commit on idahoProjects table;
       private DBConnection dbConn = null;  

    ok, another question associate with this program. I have it running. and it get the most of the information that I need as long as its a one to one pass. in iterating through the project Id.s and inserting them. Here is my problem though. I have two tablesPROJECTS{
         PROJECT_ID             NUMBER(20)                 PK                         Null-N
         PROJECT_TITLE       VARCHAR(500)                                          Null -Y
    INVESTIGATORS{
         PROJECT_ID                   NUMBER(20)                                               Null-N
         INVESTIGATOR               VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TITLE  VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TYPE  VARCHAR(200)                                          Null-Y
         DEPARMENT                   VARCHAR(200)                                          Null-Y
         INSTITUTION                   VARCHAR(200)                                          Null-Y
         INVESTIGATOR_TYPE  VARCHAR(200)                                          Null-Y
         INVESTIGATOR_URL    VARCHAR(200)                                          Null-Y
         PHONE                              VARCHAR(200)                                          Null-Y
         EMAIL                                VARCHAR(200)                                          Null-Y
         ADDRESS1                      VARCHAR(200)                                          Null-Y
         ADDRESs2                      VARCHAR(200)                                          Null-Y
         CITY                                  VARCHAR(200)                                          Null-Y
         STATE                              VARCHAR(200)                                          Null-Y
         ZIP                                     VARCHAR(200)                                          Null-Y
    }So I need to make sure in the table PROJECTS, that I have one project ID, which I think I do?
    But, in the second Table INVESTIGATORS, I can have many investigators associated with the same projectID. So I would like to insert into the second table, I think I can extract the data that I need for each investigator, but how do I iterate through them and put one into PROJECTS and many into INVESTIGATORS?
    so it would look something like this
    PROJECT_ID, INVESTIGATOR, INVESTIGATOR_TITLE, INVESTIGATOR_TYPE, etc...
    54122 , Dr. Who, Professor, LEAD PI, etc..
    54122, Dr. What, student, CO-PI, etc..
    If this is confusing please look at the code the first post with all of the code.
    orozcom

  • How to make a method Synchronous in Repository Information System ?

    In SE80 Transaction i create a copy of object TSTC. I want to set the Execute method of that object to Synchronous. I tried in Repository information system but could not find anything related to it. Can anyone help me?
    Thank you.

    Hi Sandesh,
    Check if this two excellent weblogs may help you:
    /people/vikash.krishna/blog/2008/09/23/crm-2007-how-to--2-a-transaction-launcher
    /people/raja.g/blog/2007/01/24/displaying-r3-transaction-in-icwc-application
    They have a step-by-step example, either with SE80, either with SWO1.
    Kind regards,
    Garcia

  • How to make a method run 25 times in 1 second?

    I have a JPanel that implements Runnable and that has animation on it. I need to update the screen 25 times per second. I have a vague idea that I need to call function run() 25 times a second, but how do I do that? Thank you!!!

    Hi how are you ?
    I noticed that you have some duke dollars for this questions:)
    Here is the answer.
    You won't want to call the run method 25 times by the way. Within your run method you can call a method that is going to do the animation 25 times .
    Example:
    void doAnimation(Graphics g){
    for(int i = 0 ; i < 25 ; i++){
    g.drawImage(yourimages,x,x);
    try{
    Thread.sleep(250);//or whatever the interval is
    }catch(InterruptedException e){}
    g.drawImage(clearscreenimage,x,x);
    let me know how that works for you ?
    however, the exact timing depends on the monitor being used and the OS being used. it's a bit more involved. but the answer above is a basic one.
    stephen

  • How to make find methods return a subset of the result?

    Take the multipage apps for instance,
    it is a common idea to return only a subset(No. 10~No. 30) of the full-list especially when there are millions item in the full-list.
    Please help me:)

    Maybe you're looking for something like a "Value List Handler"
    http://developer.java.sun.com/developer/restricted/patterns/ValueListHandler.html

  • How to synchronize a method for all instances of a class

    Hi,
    How to make a method synchronized for all instances of a class? If a simple method is synchronized, then multiple threads cannot access it at the same time. If we make the method as static, then we are making it synchronized at class level.How to make a synchronized method so that no two instances (objects) of a class can access it at the same?
    Thanks
    Neha

    Neha_Khands wrote:
    There is nothing wrong with that. Actually this question was asked in an interview. They didnt want to create a static method. They told me that synchronization can be achieved at instance level also. and for that we have to call some Class.getInstance().synchronied method inside constructor. Kind of a dumb question. First, synchronization does not occur "at a class level" or "at an instance level." Syncing is always the same--a single object's lock is obtained, which prevents any other threads from obtaining that lock. The only thing that makes it appear that there are special cases is that declaring a method synchronized obtains the lock associated with the instance or with the Class object for that class. But that's just syntactic sugar. The Class object lock is identical to the instance lock, which in turn is identical to a lock on some other arbitrary Object created just to serve as a lock. There's no such things as "locking the class" or "locking the instance."
    Second, and more important, making an instance method synced across all instances is a grotesquely artificial situation, IMHO, and if it were to ever come up, the right way to do it is to have that instance method call a static synchronized method.

  • How to mark a method as deprecated

    Hello,
    please does anyone knows how to mark a method as deprecated.
    thanks

    I know about the documentation i mean about the method
    itself.
    is putting @deprecated at the documentation will
    generate a warrning message if u did not use
    -deprecation as a parameter while compilingThat is how to do it! You will only get a warning if you make use of a deprecated method. Why would you want to deprecate a method, and then carry on using it in your own code? You need to change the usages to whatever you have implemented to replace the missing required functionality.

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • How to make Web Dynpro Search work using CAF Entity Service Method

    Hallo everybody,
    I'm facing a problem regarding CAF Method and I really need some help.
    The Method I want use is a "Search by Key" method, which I already testet in Composite Application and it has worked.
    But wenn I try to add the CAF Model in Web Dynpro and Apply the template in Component Controller, there was no input value there to be selected but only the return values. How can I make the method work?
    Thanks a lot.

    Hallo everybody,
    I'm facing a problem regarding CAF Method and I really need some help.
    The Method I want use is a "Search by Key" method, which I already testet in Composite Application and it has worked.
    But wenn I try to add the CAF Model in Web Dynpro and Apply the template in Component Controller, there was no input value there to be selected but only the return values. How can I make the method work?
    Thanks a lot.

  • How to make plsql parser around java method

    can someone tell me how can i move Jdeveloper java method into oracle DB (how to make plsql parser around java method). Is this possible becouse in google i can not find any good example how to make this.

    Hi,
    I think you are talking about Java Stored Procedure (?)
    Look here, http://download.oracle.com/docs/cd/E11882_01/java.112/e10588/toc.htm
    Regards
    Peter

  • How to make jar file for this compilation method ?

    can any one tell me how to make jar file for this compilation
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJava
    *this is a compile code:-*
    D:\java\browser\IEInJava>javac -classpath jdic.jar;. IEInJava.java
    *and this is a run code:-*
    D:\java\browser\IEInJava>java -cp jdic.jar;. IEInJavanow how make JAR file ?

    Assuming IEInJava only uses classes inside the jdic jar, this is one way. D:\java\browser\IEInJava> jar cf yourjar.jar IEInJava.classThen to run it you would use D:\java\browser\IEInJava> java -cp jdic.jar;yourjar.jar IEInJavaAnother way would use the jar manifest file to specify the Main-Class and Class-Path.

  • Deprecated methods in IPCItemReference of IPC

    Hello friends,
    I am upgrading ISA 3.0 to ISA 5.0.
    In 3.0 in my java class they have used IPCItemReference's setter methods,
    but when i have complied in new ISA 5.0, its says methods deprecated.
    But still there must be some other methods given in this class by SAP in newer version, which i couldnt found.
    How to make this code work in ISA 5.0
    code in 3.0:
         public static IPCItemReference createItemReference(
              HeaderData header,
              ItemData item) {
              IPCItemReference ipcItemReference = new IPCItemReference()
              ipcItemReference.setDocumentId(header.getIpcDocumentId().getIdAsString());
              ipcItemReference.setItemId(item.getTechKey().getIdAsString());
              ipcItemReference.setHost(header.getIpcHost());
              ipcItemReference.setPort(header.getIpcPort().trim());
              ipcItemReference.setSessionId(header.getIpcSession());               
              return ipcItemReference;
    Thanks in advance,
    Niraja

    im out of that project

Maybe you are looking for