[svn] 3121: Optimized QualifiedIdentifierNode creation by not requiring a throw

Revision: 3121
Author: [email protected]
Date: 2008-09-05 11:40:44 -0700 (Fri, 05 Sep 2008)
Log Message:
Optimized QualifiedIdentifierNode creation by not requiring a throw
away IdentifierNode. This reduces overall object creation and GC
time.
tests Passed: checkintests, asc-tests
Needs QA: YES
Needs DOC: NO
API Change: NO
Reviewer: tierney
Code-level description of changes:
asc/src/java/macromedia/asc/semantics/FlowAnalyzer.java
compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java
Modified NodeFactory.qualifiedIdentifier() calls to use the
IdentifierNode's name and position.
asc/src/java/macromedia/asc/parser/NodeFactory.java
Modified NodeFactory.qualifiedIdentifier() calls to use the
IdentifierNode's name and position.
Modified identifier(String, boolean) to call identifier(String,
boolean, int).
Modified identifier(String, boolean, int) to check for "arguments".
Modified qualifiedIdentifier() to take a String instead of an
IdentifierNode.
asc/src/java/macromedia/asc/parser/QualifiedIdentifierNode.java
Modified constructor to take a String instead of an IdentifierNode.
asc/src/java/macromedia/asc/parser/Parser.java
Added parseIdentifierString() and parsePropertyIdentifierString()
and modified parseIdentifier() and parsePropertyIdentifier() to use
them.
Modified qualifiedIdentifier() calls to use parseIdentifierString()
or parsePropertyIdentifierString().
asc/src/java/macromedia/asc/parser/VariableDefinitionNode.java
Modified NodeFactory.qualifiedIdentifier() call to use the
IdentifierNode's name and position.
Modified Paths:
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/NodeFactory.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/Parser.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/QualifiedIdentifierNode.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/VariableDefinitionNode.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/FlowAnalyzer.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/ImplementationGenerator.java

I have no clue where to startHow about the tutorials?
so if somebaody can gve me sample codes or can showSample code? Easy, take this:
public class SampleClass {
  private static final String TEXT = "Hello World!";
  public static void main (String[] args) {
     System.out.println(TEXT); 

Similar Messages

  • Optimal BufferedImage creation & format transformation.

    Hi all,
    I am working on Apache Batik/java 2D imaging for optimal conversion of SVG images to PNG/BMP/JPEG etc. Optimal means good quality and reduced size. I came across several optimization configuration points like:
    1. SVG document rendering attributes
    2. Graphics2D rendering hints, which creates a optimal BufferedImage instance.
    3. Encoding params set in encoders for different image formats.
    Taking example of PNG, rendering hints like INTERPOLATIOn, RENDERING, STROKE CONTROL etc seems working. Even encoding params like unsetting chromaticity works. But still image quality/size requirement does not matches. Are some more places, when i can look for optimization configuration like
    1. optimal BufferedImage creation
    2. encoding params.
    Is there some document refering the standard optimization for any image processing. ?
    Thanks..Alpesh.

    Thanks Anne for replying.
    I got the solution for my problem. Thanks to ramana.
    Here is my piece of code for this:
    <ns2:trxDate>
    <xsl:value-of select="concat(substring(/top:F59432001Collection/top:F59432001/top:imdtsc,1.0,4.0),&quot;-&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,5.0,2.0),&quot;-&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,7.0,2.0),'T',substring(/top:F59432001Collection/top:F59432001/top:imdtsc,9.0,2.0),&quot;:&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,11.0,2.0),&quot;:&quot;,substring(/top:F59432001Collection/top:F59432001/top:imdtsc,13.0,2.0))"/>
    </ns2:trxDate>
    Cheers,
    Abhi...

  • Without equipment creation serial number required at the time of delivery?

    Dear SAPIENTS,
    Without equipment creation serial number required at the time of delivery? In customizing i have defined that equipment not required in serialization profile. But still i am getting equipemnt number at the time of delivery of sales order.
    Regards,
    Kaushal Rai

    Dear Venu,
    You want to generate Alphanumeric Serial Number that is possible by following Enhancement for Serial Numbers:
    Pls find here some details about generating alphanumeric serial numbers as below :
    You can generate alphanumeric serial number with the following BADI / Customer Exit:
    Name of Enhancement : IQSM0001
    Name of Function Module Exit: EXIT_SAPLIPW1_001
    Name of Include : ZXQSMU01
    ZXQSMU01:
    This user exit can be used to create the serial numbers automatically for material of a production order. Number of serial numbers generated will be equal to the total number of quantity. The purpose behind development of this user exit was to attach prefix in each serial number generated.
    so as per your requirement you can generate serial number like ABC0001 etc.
    Process Steps:
    For exit: EXIT_SAPLIPW1_001
    1. Get serial number profile for a material in respective plant.
    2. Check if the profile is u2018XYZu2019.
    3. If profile is u2018XYZu2019 generate the serial numbers for the given quantity of material in production order.
    General Program Structure
    For exit: EXIT_SAPLIPW1_001
    1. Get the serial number profile using function module 'MARC_SINGLE_READ' for a material.
    2. Check if the profile is u2018XYZu2019.
    3. If the serial number profile is u2018XYZu2019 then generate the serial numbers for the given production order quantity of a material.
    4. Concatenate ABC as a prefix to the all generated serial numbers
    Provide above details reg. implementation BADI / Enhancement to your ABAPer and go ahead.
    You can implement above Enhancement in CMOD.
    Hope this helps.
    Revert in case of any doubt.
    Award points if useful.
    Regards,
    Tejas

  • Not Required Main Work Centre on Order Header Maintenance Order

    Hi Experts,
    I want to know about main work center on order header maintenance order. Standart SAP is main work center required, and i want to set main work center on order header is not required. How Can i set Main Work center on order header is not required?
    Thank you experts for the answers,
    Best Regrads,
    Bernardus Jalu
    Edited by: bernardus jalu on Jan 17, 2012 8:46 AM

    Hi
    Main workcenter is the responsible workcenter in a order and is used as a reporting selection criteria in major reports(IW38/IW39/IW28/IW29/IW68/IW69 etc). From it also the responsible cost center gets derived. Also it gets copied to the Performing workcenter fields of each operations. So why you dont wants it to be used. It can be maintained as master data in technical objects & gets copied to notifications/orders while creation
    Shakti
    Edited by: SHAKTI BEHERA on Jan 17, 2012 3:41 AM

  • Without equipment creation serial number required?

    Dear SAPIENTS,
    Without equipment creation serial number required. In customizing i have defined that equipment not required in serialization profile. But still i am getting equipemnt number at the tinme of IQ01.
    Regards,
    Kaushal Rai

    Rachin,
    Run SHD0. Give IW81 in field  Transaction Code. Keep cursor in field  Transaction Variant and press F4.
    You will get values if some work was done on this Tcode here. Here the value we got is ZIW81
    (In case you do not get any values you need not proceed further)
    Now take this value and Continue. You will get Screen Variants list in the Transaction Variant Tab.
    A Transaction variant is a group of several screen variants. (Initial screen, and various tabs etc)
    You see in this case several screen-variants are seen. Our screen is initial screen i.e., 0106.
    Now Go to Screen Variants Tab and give this value. i.e., ZIW81_0106 and click on Display.
    This screen will be in front of you. Here for your case, the check-boxes against the fields Equipment and Serial number in the Column Invisible  should be tick-marked like shown below.
    I did not work much on SHD0, If you are interested, refer to this document How to Create a Transaction Variant.
    However, if you do not find anything in SHD0 for this post, continue in other angles.
    Jogeswara Rao K

  • Code in main does not require catch, but code in constructor does

    this is the original program, its all in main. i took all the code out of main and put it in a constructor to make it more usable, and started making the necessary adjustments. i eventually got it to work but i had to catch exceptions EVERYWHERE. why does this code not require so many exceptions when the code is in main?
    import java.io.BufferedInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    public class MainClass {
      public static void main(String args[]) throws Exception {
        URL u = new URL("");
        URLConnection uc = u.openConnection();
        String contentType = uc.getContentType();
        int contentLength = uc.getContentLength();
         // ||
        if (contentLength == -1) {
          throw new IOException("Error: No File Found.");
        InputStream raw = uc.getInputStream();
        InputStream in = new BufferedInputStream(raw);
        byte[] data = new byte[contentLength];
        int bytesRead = 0;
        int offset = 0;
        while (offset < contentLength) {
          bytesRead = in.read(data, offset, data.length - offset);
          if (bytesRead == -1)
            break;
          offset += bytesRead;
        in.close();
        if (offset != contentLength) {
          throw new IOException("Only read " + offset + " bytes; Expected " + contentLength + " bytes");
         String dirText = "text";
         String dirTarget = "target";
         String filename = u.getFile().substring(u.getFile().lastIndexOf('/') + 1);
         String dirAndFile;
         // determine weather the file is a target or is to be parsed for more files
         if(contentType.startsWith("text/")) {
              dirAndFile = dirText + "\\" + filename;
         else {
              dirAndFile = dirTarget + "\\" + filename;
        FileOutputStream out = new FileOutputStream(dirAndFile);
        out.write(data);
        out.flush();
        out.close();
    }Edited by: chopficaro on May 1, 2010 8:15 AM

    ok but still, why do i not have to catch all these exceptions when the code is in main rather than a constructor? heres the code after i put it in the constructor:
    import java.io.BufferedInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.URL;
    import java.net.URLConnection;
    import java.net.MalformedURLException;
    public class MainClass {
         public static void main(String args[]) throws Exception
              MainClass mc = new MainClass("http://www.google.com/intl/en_ALL/images/logo.gif");
         MainClass(String addr)
              URL u = null;
              try
                   u = new URL(addr);
              catch (MalformedURLException e)
                   // Print out the exception that occurred
                   System.out.println("Invalid URL "+addr+": "+e.getMessage());
              URLConnection uc = null;
              try
                   uc = u.openConnection();
              catch (IOException e)
                   // Print out the exception that occurred
                   System.out.println("Unable to create "+addr+": "+e.getMessage());
              String contentType = uc.getContentType();
              int contentLength = uc.getContentLength();
              if (contentLength == -1)
                   System.out.println("no file");//throw new IOException("Error: No File Found.");
              InputStream raw=null;
              InputStream in=null;
              try
                   raw = uc.getInputStream();
                   in = new BufferedInputStream(raw);
              catch (IOException e)
              // Print out the exception that occurred
              System.out.println("bad input stream "+e.getMessage());
              byte[] data = new byte[contentLength];
              int bytesRead = 0;
              int offset = 0;
              while (offset < contentLength)
                   try
                        bytesRead = in.read(data, offset, data.length - offset);
                   catch (IOException e)
                        // Print out the exception that occurred
                        System.out.println(e.getMessage());
                   if (bytesRead == -1)
                   break;
                   offset += bytesRead;
              try
                   in.close();
              catch (IOException e)
                   // Print out the exception that occurred
                   System.out.println(e.getMessage());
              if (offset != contentLength)
                   System.out.println("didnt read enough bytes"); //throw new IOException("Only read " + offset + " bytes; Expected " + contentLength + " bytes");
              String dirText = "text";
              String dirTarget = "target";
              try
                   String filename = u.getFile().substring(u.getFile().lastIndexOf('/') + 1);
                   String dirAndFile;
                   // determine weather the file is a target or is to be parsed for more files
                   if(contentType.startsWith("text/"))
                        dirAndFile = dirText + "\\" + filename;
                   else
                        dirAndFile = dirTarget + "\\" + filename;
                   FileOutputStream out = new FileOutputStream(dirAndFile);
                   out.write(data);
                   out.flush();
                   out.close();
              catch (IOException e)
                   // Print out the exception that occurred
                   System.out.println(e.getMessage());
    }

  • Import invoice with status as Approval not Required

    Hi All,
    Can any one give the way to import an invoice with payables open interface import status as Approval not required.
    Thank you in advance.
    Raj.

    midimidi,
    > So to be clear...if the AS is on the main timeline,
    import statements
    > are not needed, and if the AS is external and imported,
    import
    > statements are needed.
    That's a general rule of thumb, but not 100% applicable.
    > Are there any other exceptions to that, or does that go
    for all AS3
    > classes?
    There are exceptions, and the easiest way to find them is to
    leave out
    your import statements and plug away ... sooner or later,
    you'll get a
    compiler error, and then you'll know. :)
    >> It did strike me *** odd though, an imported .as
    file uses the same
    >> publish settings as code on the timeline. So why
    treat them differently?
    FLA files have publish settings, but AS files don't. They're
    just text
    files. I hear what you're saying ... they end up getting
    compiled along
    with / into the some FLA anyway -- and that FLA does have
    classpaths
    listed -- but those same AS files might be compiled in Flex
    Builder 2 or
    some 3rd party compiler. It would probably make good sense to
    require the
    import statement for inline FLA code, but not everyone is a
    hardcore
    programmer, and Adobe knows it. Nothing is *hurt* by using
    import in FLAs,
    but for folks who just want to do light programming, the
    convenience of not
    having to use it is nice.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • IOS 6 Gamecenter ID did not require email address. iOS 7 does, how do I sync Game Center on new device

    My kid's have 3 iPod Touch's, 4th gen running iOS 6. We all share one Apple ID for purchases, but they each have their own Game Center ID. iOS6 Game Center DID NOT require an email address to use. Now I have bought them all iPad mini's that are running iOS 7. iOS7 REQUIRES an Apple ID to use. How do I import their Game Center info onto the Mini's?

    Hi Sonnyboy89,
    I am a little unclear as to what you are trying to do with Game Center on the iPads, but you can enter each user’s Apple ID in Game Center on their device using the steps in this article -
    Using Game Center on your Mac or iOS device
    http://support.apple.com/kb/HT4314
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • T/F: iPhone users are not required to pay $15/month extra for Good Technology

    I have a personal Droid RAZR M.  You may wonder why I am posting in the iPhone forum but you are about to find out.
    I have access to corporate e-mail via Good Technology.  When I got this service set up at the same time I acquired the phone, I was required to upgrade from a $30/month 2GB plan to a $45/month 2GB plan just to have this access ("needed for access to company servers").  That was a surprise but I got over it.  However, since then, I have come to learn the following:
    1.  It appears that other than VZW, no other carriers are charging users extra for access to Good Technology.
    2.  Based on a colleague's information from a Good Technology support engineer and a office mate who is using a VZW iPhone, VZW iPhone users are *not* *required* to move to an Enterprise plan aren't paying an extra $15/month.  If one searches the Internet, I am not the only one asking about this.
    If you are using a Verizon Wireless iPhone and have Good Technology on your phone, would you let me know if were *required* to upgrade your data plan and pay extra just for using Good Technology?
    Thanks,
    Techvet

    I need to check some information at work about this, since they have some guidance on how their employees can connect to their corporate email with android and iphone devices.

  • My service provider's SMTP does not require a password but the option "non" does not appear on the IPOD Touch 5th gen. Fix?

    I have relay.skynet.be as my outgoing server and it does not require/allow password protection. When configuring mail on the Ipod the option of "non" is not given for the outgoing server. Is this a skynet issue or is there an Ipod solution?

    Google for:
    setup XX email on iphone
    to see if ony of the returned sites help.
    XX is you email provider.

  • Bind Variable : required - no message, not required - error

    hi
    Please consider the example application created using JDeveloper 11.1.1.6.0
    at http://www.consideringred.com/files/oracle/2012/RequiredOrNotBVarApp-v0.01.zip
    It has these View Objects defined
    - EmployeesReqNoValueBVarVO which has a required Bind Variable, and where clause "last_name like '%' || :LastNameBVar || '%'"
    - EmployeesNotReqNoValueBVarVO which has a NOT required Bind Variable, and where clause "(:LastNameBVar is null or last_name like '%' || :LastNameBVar || '%')"
    The Bind Variable in both View Objects does NOT have a value (no default value, not programmatically set, not entered by the user, ...).
    This "no value set" aspect could be the result of a "development error", but the resulting observed behaviour is at least "peculiar".
    - scenario (sc1) : run "try tryEmployeesReqNoValueBVarVO", see a table filled with rows and NO message about the required Bind Variable
    - scenario (sc2) : run "try tryEmployeesNotReqNoValueBVarVO", see "No data to display." in the table and the "Missing IN or OUT parameter at index:: 1" error for the NOT required Bind Variable for a where clause that can deal with null values
    - question (q1) How can be explained that scenario (sc1) does not result in an error message about the required Bind Variable (and scenario (sc2) does result in an error message about the NOT required Bind Variable)?
    - question (q2) What does the "Required" checkbox for a Bind Variable really mean for Bind Variables used in a where clause of a View Object?
    If the described behaviour can be reproduced (using RequiredOrNotBVarApp-v0.01.zip), confirmations are welcome.
    (Aspects of these scenario's could be related to forum thread "Bind variable required/not required: strange behaviour".)
    many thanks
    Jan Vervecken

    Thanks for your reply Frank.
    Frank Nimphius wrote:
    ... your query actually is dependent on the existence of the bind variable because the bind variable is used in the where clause part. ...Sure, and the Bind Variable does exist (in both (sc1) and (sc2)).
    ... This has nothing to do with whether the bind variable value is checked for NULL and if the value it contains is NULL performs an "all you can eat" type of query. Because the existing, NOT required Bind Variable has not been given a value in scenario (sc2), the check for NULL only makes more explicit that NULL is a valid value for the SQL statement.
    ... Non required bind variables are used in the context of view criteria to avoid missing IN or OUT parameters. ...The "Required" checkbox for a Bind Variable is also available/enabled when the Bind Variable is not used in a View Criteria (in both (sc1) and (sc2)).
    ... In the case of a view criteria, the VO query may be executed without the view criteria applied and for this reason should not fail only because the defined bind variable is not provided. ...No View Criteria in the scenario's (sc1) and (sc2) I descirbe.
    ... If you run the query in the tester, you get
    (java.sql.SQLException) Missing IN or OUT parameter at index:: 1
    and no query is executed at all for EmployeesNotReqNoValueBVarVOSure, that matches scenario (sc2), but the Bind Variable can be configured as NOT required, how can it be missing?
    The JDeveloper help page "Create or Edit Bind Variables Dialog - Variable Page" says:
    "... Alternatively, you can use the SQL Statement page of the Edit View Objects dialog to enter a parameterized WHERE clause. Note that the bind variables you enter in a parameterized SQL WHERE clause will require a valid value at runtime or a runtime exception error will be thrown. ..."
    So, null as a valid value, seems to explain the behaviour in scenario (sc1).
    "... In contrast, when you create a view criteria filter condition that references a named bind variable, you can specify whether the value is required or optional. ..."
    But, the "Required" checkbox is also available (to uncheck) for Bind Variables that are not used in a View Criteria.
    Specifically for the "Required" checkbox the help page says : "... Select if you want to make the value of a name bind variable required for any usage the references the named bind variable. For example, when the value is required (default), all view criteria items that reference the named bind variable will fail to execute unless a valid value is supplied at runtime. Alternatively, you can leave the value not required and use the Create View Criteria dialog to specify whether or not individual view criteria items require the value. ..."
    Again, the focus is on View Criteria, although it can also be unchecked (configuring as NOT Required) for Bind Variables that are not used in a View Criteria (which does not seem to be something you should do).
    But, still, there is a perspective here that makes this possibly very confusing:
    - a View Object where clause with a required Bind Variable, no value set --> results in rows, and NO message about a missing value
    - a View Object where clause with a NOT required Bind Variable, no value set --> results in no rows, and a message about a missing value
    regards
    Jan

  • Error:-document is in transfer for purchase order..creation is not possible

    Hello,
    While doing confirmation of PO I am getting this error, saying "document is in transfer for purchase order..creation is not possible".
    can anyone please suggest me solution on this type of error?

    Hi,
    Is the PO in ORDERED status? Is there any confirmation posted for this PO which might be stuck (idoc failed to reach back end)?
    If it is a case of idoc failure, then reprocess the idoc and then do the next confirmation.
    regards,
    MRao

  • An accounting document is not required for this billing document

    Hi,
    While releasing the billing document to accounting the error is coming like "An accounting document is not required for this billing document"
    Diagnosis:
    The billing document has the net value '0' and does not create an accounting document. Despite this, the posting status 'C' (Posting document has been created) is set internally for this billing document.
    But the net value is coming in the sales order and alsi into the Billing document.
    gurus plz help me.
    regards,
    ragesh.

    Goto VOFA screen and check for ur billing type , what is assigned in the document type field?.
    Also please check, the posting block is activated. if it is, please remove.
    Also goto the accounting document type settings at OBA7, check whether the customer field is ticked under the account type allowed tab.
    Please let me know, whether ur problem solved..
    Reward points if useful..

  • TS1398 After updating to ios 6 my iphone 4 would no longer connect to my home wifi. At work we have a free wifi connection that does not require a password. However my wifi at home is password protected. I have the right password. It works on my ipod touc

    After updating my iphone 4 with the ios 6 update. My iphone would no longer connect to my home wifi that is password protected. I know that I have the right password entered in. At work we have a free wifi connection that does not require a password and I can connect no problem to it. My ipod touch has no problem connecting to my home wifi. It is a 3rd gen ipod and does not have the ios 6 update on it. Please help!

    I'm having the same issues. Started when I upgraded iphone 4S and ipad1 to 5.1.1. Wife's iphone 4g on 4.4.2 has been ok. I've forgot the network on both devices and restored the iphone, none of which changed the issue. I've upgraded to ios 6 on the iphone 4s, problem still persists.
         One thing that will help for a time: go to your router and change the wireless control channel. When I first did this I got full connectivity for about 48 hours... and now the problem is back. I'm now changing the wireless control channel every 12 hours, which is a pain but at least keeps me connected. I've tried a few other solutions that are out there and that has been the best one so far.
         to do this on a motorola router: type 192.168.0.1 in your address bar.
    username: admin and password:motorola if you have not changed the factory defaults.
    Click on the word "wireless" and look for the "control channel" field. This may be set to auto or to 1, try changing it to 6 or 11 (preferred) or any other channel.
    The control channel can cause static in the wireless system IF there are several networks nearby that are on the default setup.
    There is a fair bit of buzz about this issue out there, some other things I've seen:
    This is a hardware issue. Go to the store and have your wifi antenna checked, some users reporting that they get free replacement devices.
    Check against other wifi networks that require a password (this is next for me). Logon to those networks and surf until your wifi stops. If your wifi connects to the internet but stops responding, then this is a software (or hardware) issue and apple needs to step up. Some are claiming this to be the case.
    IF you connect and stay connected/on the internet on another password protected wifi, then the issue is with your router. this is where things get cute.
    Comcast may tell you to update your firmware. Motorola may tell you that your cable provider is the only one who can push through firmware updates. Comcast may tell you that you are not in an area that is being updated. It's unclear if they say that to all customers, or just those who have purchased cable modems and aren't renting them from comcast.
    Good luck, more to come if I figure out anything else, and please post any solutions you may find.

  • Is there a mobile phone that can sync with ical, but does not require a data plan?

    Is there a mobile phone that can sync with ical, but does not require a data plan?

    Thanks for the reply.  I already have this info, but have spent several hours trying to cross reference with the product descriptions and the different carriers websites.  I was hoping there was an easier way.
    John Maisey wrote:
    Hi,
    You cakn sync many phones using iSync. See here: http://support.apple.com/kb/ht2824
    Best wishes
    John M

Maybe you are looking for