Coding guidelines

Hi,
Is there a std for coding in test stand?
so we have any coding guidelines to be followed?
thanks in advance
bharathi
Solved!
Go to Solution.

Hi bharathi,
Here are links to the TestStand best practices - This may not be exactly what you're looking for, but it's the closest I know to a coding style guide.
NI TestStand Advanced Architecture Series (in Print)
and here's the web location that this was derived from:
NI TestStand Advanced Architecture Series (website)
While this doesn't talk to a style like a C/C++ or .NET source code style guide does, there's a lot of valuable information that you could leverage in creating your own TestStand coding style guide (if that's what you're looking for).
Hope this helps.
-Jack

Similar Messages

  • Where is coding guideline for SharePoint 2013 available?

    Can any one suggest where is coding guidelines and best practices for SP 2013 development is available?

    Hi,
    According to your post, my understanding is that you want to know the best practices for SharePoint 2013 development.
    There are some articles cover best practices targeted towards software developers in SharePoint 2013, you can refer to them.
    http://social.technet.microsoft.com/wiki/contents/articles/13373.sharepoint-2013-what-to-do-farm-solution-vs-sandbox-vs-app.aspx ,
         discusses when to use farm solutions, sandbox solutions, or sharepoint      apps.
    http://social.technet.microsoft.com/wiki/contents/articles/13637.sharepoint-2013-best-practices-what-client-api-should-you-choose-when-building-apps.aspx ,
         guidelines to help you pick the correct client API to use with your app.
    http://msdn.microsoft.com/en-us/library/jj164060(v=office.15).aspx       
    http://social.technet.microsoft.com/wiki/contents/articles/16343.sharepoint-2013-best-practices-setting-up-a-dev-environment-for-windows-apps-and-sharepoint.aspx ,
         describes how to set up a dev environment needed for creating Windows Apps      that leverage SharePoint.
    http://social.technet.microsoft.com/wiki/contents/articles/16353.sharepoint-2013-best-practices-working-with-connection-strings-in-auto-hosted-sharepoint-apps.aspx ,
         discusses how to deal with connection strings in auto-hosted apps.
    For more reference:
    http://social.technet.microsoft.com/wiki/contents/articles/12438.community-best-practices-for-sharepoint-2013.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Check coding guidelines?

    Hi,
    as a java and python developer I'm used to check coding
    guidelines (semi-)automatically with tools like checkstyle or
    pylint. But I haven't found a similar tool for ActionScript. I did
    find coding guidelines like
    http://blog.dclick.com.br/2007/02/13/adobe_flex_coding_guidelines_english/
    by Fabio Terracini, but no tools.
    Does a lint-/checkstyle-like tool exist? Do I use the wrong
    search criteria at google/google-groups? Has someone "hacked" a
    java/javascript-tool to support ActionScript?
    Thanks in advance for your help.
    Uwe

    There is not checkstyle tool yet for ActionScript 3 out
    there.
    For coding quidelines, there is no strict coding quidelines
    imposed on developers by Adobe
    You already found the only known publicly shared coding
    quidelines made by one of the commercial company..
    Within my company, we had created a set of coding quidelines
    that is partly documented on internal Wiki, but we never had taken
    care of making those code guidelines public...
    Sorry for the little developement in this area, but AFAIK
    that the way it is currently in ActionScript 3 world...

  • Coding guideline in oracle on demand

    Let me know what are the coding guidelines to be followed in oracle on demand while developing project as we follow in other technologies

    I would recommend posting this question in the CRM On Demand Integration Development forum. Thanks for your help.

  • Secure coding guidelines

    We were able to get some of the secure coding guidelines documents for ABAP and Java which are dated 2006 from SDN. If there are any later to these releases, please let me know.
    thanks & Regards,
    S. Raj

    Few tips are:
    - you can follow some OOPs design patterns in ADF.
    - Create shareable components as bounded task flows and reuse them using ADF library jar
    - create separate projects for JavaScript, css, images or deploy them to web server virtual directory.
    - MDS can help you in many areas for customization and personalization
    - Over use of CSS and javascript could slow the performance as well.
    - Don't play with oracle internal libraries ( i have seen many cases causing bugs in productions later)
    and last not least...........don't re-invent the wheel if declarative solution is available use it ;)
    hope it helps
    Baig

  • CFC's - Question about coding guidelines

    I have a question about the following section in the
    CF
    Coding guidelines
    quote:
    {cfmxroot}
    ---wwwroot/ » web-accessible .cfm pages and .cfc Web
    Services
    ---extensions/
    --------components/ » tree for .cfc files
    --------customtags/ » tree for .cfm custom tags
    --------includes/ » tree for include files
    ---config/ » tree for configuration files
    This implies that we have two Custom Tag Paths set up in the
    CFMX Administrator:
    {cfmxroot}/extensions/components/
    {cfmxroot}/extensions/customtags/
    We also have mappings for the root of the includes tree (for
    cfinclude) and the custom tags tree (for cfimport):
    /cfinclude » {cfmxroot}/extensions/includes/
    /customtags » {cfmxroot}/extensions/customtags/
    1. Why would you want to add both a custom tag path
    AND a mapping for " {cfmxroot}/extensions/customtags/"?
    2. The guidelines seems to imply you should use a custom tag
    path for components, instead of a mapping. If the "components"
    directory is already outside the webroot, then adding a CF mapping
    shouldn't make it web accessible, right? So is there any benefit to
    using a custom tag path versus a mapping?

    It is up to you where you put your components and where you
    put your custom tags. The standard way, as I know it, at least, is
    to create a mapping for your cfc directory on the
    Mappings page of the Coldfusion Administrator and to
    register the path to your custom tag directory on the
    Extensions/Custom Tag Paths page. In answer to your first
    question, you will also need to create a mapping for a custom tag
    directory if you intend to call tags using the template-attribute
    of cfmodule.
    Coldfusion considers the directory-path that you register on
    the
    Extensions/Custom Tag Paths page an absolute path. That is
    what enables you to call a tag directly by name on any page of your
    application, for example,
    <cf_myCustomTag>.
    One consequence is, if you stored a component myComp.cfc in
    such a directory, you could instantiate it on any page simply by
    running
    <cfset myObj = createobject("component","myComp")>
    However, this doesn't offer anything a mapping wouldn't. So,
    in answer to the second question, I don't think one should use a
    custom tag path for components. Mixing one's custom tags with one's
    components only produces an oil-plus-water structure.

  • Coding Guidelines In SapScript For Jetforms Printing

    For the last 10 days I am searching in google & SDN for help related to JETFORM coding in SAP SCRIPT. I have seen some basic syntaxes like ^GLOBAL ^COMMENT ^COMMAND ^FIELD. But I dont know why this commands are used & how it related to Jetform Design.
    Can anyone provide me with a material for coding guideline for JetForm using SAP SCRIPT ?
    Please help...
    Thanks
    Malaya
    Edited by: Thomas Zloch on Jun 14, 2011 9:29 AM - SMS speak corrected

    could you pls. tell me why this is required. Can not ABAP fulfill the requirements.
    Please explain the requirement.
    check the following thread. hope this will solve ur prob.
    [what is a jetform;
    cheers
    Edited by: Nishant Kashyap on Jun 14, 2011 12:48 PM

  • Secure Coding Guidelines for ADF / WebCenter

    Hi,
    Our team is new to ADF and WebCenter development. Does Oracle have a security 'best practices' document for ADF developers?
    We already have a few generic 'secure coding' document, which recommends things like input validation, avoiding SQL injection, etc. However, we do not have any recommendations specific to ADF.

    Few tips are:
    - you can follow some OOPs design patterns in ADF.
    - Create shareable components as bounded task flows and reuse them using ADF library jar
    - create separate projects for JavaScript, css, images or deploy them to web server virtual directory.
    - MDS can help you in many areas for customization and personalization
    - Over use of CSS and javascript could slow the performance as well.
    - Don't play with oracle internal libraries ( i have seen many cases causing bugs in productions later)
    and last not least...........don't re-invent the wheel if declarative solution is available use it ;)
    hope it helps
    Baig

  • Best coding practice

    Not a big deal here but I'm curious what others think about
    this. A fellow programmer and I were talking about this and
    couldn't come to a conclusion.
    Basically is it better to use a NOT EQUAL TO or an EQUAL TO?
    For instance if you have a list of names and you want all
    "BOB"s to be treated one way and all others to be treated another.
    Would it be better to say
    <cfif FNAME EQ "BOB">
    blah blah
    <cfelse>
    woo woo
    </cfif>
    or
    <cfif FNAME neq "BOB">
    woo woo
    <cfelse>
    blah blah
    </cfif>

    quote:
    Originally posted by:
    MaryJo
    quote:
    Originally posted by:
    MikerRoo
    Good grief, you are ALL wrong --
    especially Mary Jo for introducing a barely relevant tangent
    to the thread and getting it wrong to boot!
    First of all, when someone asks what is best for a string
    comparison, mentioning Compare and CompareNoCase is *hardly*
    irrelevant. Second, I was NOT wrong. Since the discussion was
    revolving around performance that was just what I mentioned. That
    doesn't make me
    wrong just because there are reasons to use it other than
    just that. If you want to debate if there's any performance gains,
    well that comes right out of the CFMX coding guidelines at
    Livedocs, which say it is "significantly faster". I'm assuming Sean
    is correct in stating this, I'm not really in the mood to test it
    myself, but feel free to add your comments there and tell him he's
    wrong if you disagree.
    http://livedocs.macromedia.com/wtg/public/coding_standards/performance.html
    Of course, you can debate if the gain is that big a
    deal...which is why I phrased it the way I did (i.e. "If it's
    processing time you care about....") Again, that's what the bulk of
    the debate was on, so that was what I was addressing.
    No one asked what was the best for string comparison. YOU
    raised that issue.
    Your stated reason, (for performance) has not been true since
    CF5.
    Up until then, the question seems to be as much about style
    as anything else.
    That page you linked says that
    CompareNoCase() is "faster" than "is not".
    (1) If you actually run the tests, you'll see that the
    difference is less than the test variation (but statistically
    real).
    (2) This says nothing about compare() vs "IS". Here the
    performance is the same.
    (3) CompareNoCase is not functionally the same as the most
    commonly needed string comparison (case tolerant), so that is
    irrelevant for most uses anyway.
    Run the tests yourself and see that I'm right.
    In fact,
    Sean even admits, that the real reason to use compare() is
    accuracy, at the bottom of that page!
    So, my assessment was right. You were right mostly for the
    wrong reason and the post was barely relevant.
    Ironically, if you had found and linked that page to begin
    with, it would have made one more case for avoiding negative logic
    ("IS NOT").

  • Abap coding  standards

    hi  can u tell me the standards that are followed in a company  for ABAP CODE.

    There are some coding guidelines need to be followed during coding . here are a few ones
    Avoid dead-code
    Remove unnecessary code and redundant processing
    Spend time documenting and adopt good change control practices
    Spend adequate time anayzing business requirements, process flows, data-structures and data-model
    ensure careful usage of  "OR", "NOT"  and value range tables (INTTAB) that are used inappropriately in Open SQL statements.
    f you are interested in exactly one row of a database table or view, use the SELECT SINGLE statement instead of a SELECT * statement.  SELECT SINGLE requires one
    communication with the database system whereas SELECT * requires two.
    It is usually faster to use the INTO TABLE version of a SELECT statement than to use APPEND statements
    f you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates within the program.   The RDBMS is responsible for aggregated computations instead of transferring large amount of data to the application. Overall Network, Application-server and Database load is also considerably less.
    If you process your data only once, use a SELECT-ENDSELECT loop instead of collecting data in an internal table with SELECT ... INTO TABLE.  Internal table handling takes up much more space
    Using nested selects is a technique with low performance. The inner select statement is executed several times which might be an overhead. In addition, fewer data must be transferred if another technique would be used eg. join implemented as a view in ABAP/4 Repository.
    Whenever possible, use array operations instead of single-row operations to modify the database tables.
    Frequent communication between the application program and database system produces considerable overhead.
    some best practices are :
    1. Use of local variables instead of global variables - will save memory. Use global variables ony when absolutely necessary!
    2. (a.) Do not change variables in the "using", use the "changing" parameters instead for this purpose
        (b.)        "tables" parameter is now obsolete - do NOT use
    3. Inside subroutines (forms), the using and changing parameters should have reference to a "TYPE"
    4. NO literals, instead use constants / text elements - as the case may be.
    5. All constants should be defined globally.
    6. Query on database tables within: loop.... endloop - to be strictly avoided
    7. Internal table definition technique - using DDIC Structures and DDIC Table Types. Avoid defining local types in programs. Do not  define internal tables with header line.
    8. Initialize, clear variables/work areas before internal table reads.
    9. Sort internal tables before using "delete adjacent duplicates".
    10. Use the "binary search" option while reading internal tables, and sort the internal table prior to read.
    11. Check that the internal table has entries (not initial) before using "for all entries" option in select statements.
    12. sy-ucomm = 'ONLI'?? Is this to check if program executed online or in background? Use the sy-batch variable instead
    13. Use function modules to read: Customizing and Master tables. Only Transaction tables to be directly queried.
    14. SY-SUBRC check is a MUST after all function calls; and please handle the exception suitably.
    15. Use of field symbols with internal tables [LOOP at itab ASSIGNING <fs>] is always a preferred/better option, as against loop at itab  into <WORK_AREA>.
    16. Use of too many includes ?? (We could use: one include for global data declarations, one include for class methods, one include for  subroutines and probably one more include for Application logs)
    17. No dead code please - remove if not required.
    18. Use of case.... endcase, is preferred instead of: if.. elseif.. endif.
    19. Try NOT to use "into corresponding fields of" or "move corresponding" - these are detrimental from a performance perspective
    20. Instead of "select single", it is better to use "*_SINGLE_READ" function modules if available. Check always for availability of  standard function modules for data retrieval from Master / Customizing tables.
    21. Use of Memory ID's to be strictly avoided, as these could be overwritten globally.. Please write explicit GET, SET function modules  for this purpose.
    22. Locking the database before direct table updates is mandatory, database updates should always be in -> 'Update task' function  modules.
    23. After BAPI calls, use BAPI_TRANSACTION_COMMIT. Do NOT call BAPI_TRANSACTION_COMMIT in a loop.
    24. Case 'X'. when <variable> ???? - refrain from using in this manner
    25. Provide adequate inline comments, explaining what the piece of code is supposed to do / intended to achieve.
    Message was edited by:
            Sridhar Srirama

  • XQuery Coding Standards

    Are there any XQuery coding standards defined for use in OSM?
    Or does Oracle provide any such standards for naming conventions, variable names, the case-sensitivity etc?
    Or are the standards similar to what we follow for Java?
    Please help.
    Thanks in advance!

    OSM does not dictate a specific set of coding guidelines for XQuery, just as it does not for Java. Normally coding guidelines (whether for Java, XQuery or other technologies) would be defined for a given project based on the best practices and experiences of the System Integrator or Service Provider that is implementing OSM.
    Given that XQuery is an industry standard language, we would encourage you to follow best practices established in the industry.
    Generally, for XQuery code that the OSM product team writes we follow Java style naming conventions and style wherever applicable. This is a convention we find reasonable given our team routinely writes and reviews both XQuery and Java code so having the same naming convention makes sense.
    If there are are additional more specific questions you have on this topic feel free to ask them and we'll do our best to help you.
    Regards,
    Brian Dueck
    VP - Product Strategy and Design
    Oracle Communications
    Edited by: brian.dueck on Jul 4, 2011 1:59 PM

  • Reg: vacancy for LabVIEW developer in Bangalore, Chennai and Delhi with (1-6) years experience

    Recruitment Process for LABVIEW: Tele Interview in case of outstation candidates. Bangalore candidates will have to first come for a Written Test (Technical + Analytical), 1-2 rounds of direct technical interview.
    Degree/Branches:  B.E / B.Tech in Electronics / EEE / E&C / E& Instrumentation .
    ROLES AND RESPONSIBILTIES OF ASSOCIATE ENGINEER-SEG:
    Development
    1. Responsible for developing software for the project/module allotted to you with smooth coordination and smooth handing over of the work executed by one to another member in case of change of projects.
    2. Expected to work on multiple projects, project dead line, adhere to coding guidelines and update your progress on the project on a weekly basis to your immediate supervisor.
    3. Developing the software strictly as per the requirement specification, design and Bug free.
    4. Responsible for building a trouble-free system to the satisfaction of the customer.
    Installation
    1. Responsible for installation of hardware and software at customer site for coordinating with the vendor and Manager – Sourcing to see that works done by the vendor is as per requirement specification
    Customer Support
    1. Responsible for providing support to the customer on the system supplied by the Captronic Systems in the past as well as present.
    2. Attends to the support case within 48hrs(local) / 96hrs(outstation ) / 96hrs(out of warranty) of reporting and collecting the Support Closure Report from the customer and submit it to the SBU-HEAD
    3. Informs Support executive with Support Status, Action Taken and Support Closed On
    Training
    1. Responsible for providing training to customer on the systems supplied by Captronic Systems.
    2. Responsible for in-house training to newly recruited engineers.
    Testing
    1. Responsible for testing code developed by you, by another developer and testing entire system at the customer site.  
    2. Responsible for testing hardware supplied by Captronic System and log the test report on the hardware test register.
    Sales Support
    1. Expected to travel with sales team to provide support to sales-team in proposal making at short notice and perform flawless pre-sales system and requirement study.
    General
    1. Expected to take part in technical sessions and keep yourself abreast with the recent product released and technical advancement made
    2. Expected to become domain expert is at least one field and to constantly improve coding style and knowledge.
    Quality
    Responsible for implementing the project methodology and quality policy of the company for all activities under your purview
     Interested candidates may forward your resumes witheir current CTC and notice period to [email protected] . Salary is never the Constraint.

    SANDU SUNITHA
    D/o.S. Venkateshwarlu,
    H.No:11/57, Kothapeta,
    Maruthi Nagar,Dhone,
    Kurnool (Dt.),
    Andhra Pradesh.
    E-Mail:[email protected]
    Mobile : 91-9963586292/08884822259
    Date: 09/ 05/ 2013
    Respected Sir/Madam,
    I have done my masters in  Control Systems Engineering in Electrical
    branch from Malla Reddy College of  Engineering. I am a well organized
    person, with good knowledge about the subject, able to do
    multitasking, able to work within a team and have excellent
    communication skills. As a good Engineer and excellent team player I
    can handle the responsibilities and challenges of the post of an good
    engineer to its fullest.
    I have worked for 6 Months as Project Trainee in CSR INDIA PVT LTD. My
    responsibilities in that institute include Testing, Reporting and
    Debugging, Updating the bugs as a trainee fresher. I was a part of the
    team that designed MERCURY TESTING TOOL, world's Best Automation tool
    today. I tested the model and executed the changes.And i had worked as
    Project Engineer in FUSION ELECTRONICS on Wonder ware SCADA. Presently
    working as Project Scientist in NAL (National Aerospace Laborateries)
    under Research and Development of IVHM(INTEGRATED VEHICLE HEALTH
    MANAGEMENT) Project on MATLAB/SIMULINK ,Labview ,Wireless Sensor
    Networks,WatchDog and Testing.
    Here is the list of the documents enclosed with this cover letter.
     1. Resume
    I hope that you find these of worth. I assure you that if selected; I
    will not let you down and would prove to be an asset for your reputed
    industry.
    Sincerely yours,
    SANDU SUNITHA
    Attachments:
    SANDU_SUNITHA(29_Apr_2013).doc ‏176 KB

  • During synthesis(Xilinx-spartan 6) i am getting below given warnings how can i resolve these warning?

    WARNING: unable to clean up previous run data file: N:/verilog program/aps8july2015/p.xst: error renaming "N:/verilog program/aps8july2015/p.xst" to "N:/verilog program/aps8july2015/p.xst.old": permission denied
    WARNING: unable to clean up previous run data file: N:/verilog program/aps8july2015/p.syr: error renaming "N:/verilog program/aps8july2015/p.syr" to "N:/verilog program/aps8july2015/p.syr.old": permission denied
    WARNING:Xst:3035 - Index value(s) does not match array range for signal <mem_g>, simulation mismatch.
    WARNING:Xst:3035 - Index value(s) does not match array range for signal <mem_e>, simulation mismatch.
    WARNING:Xst:1336 -  (*) More than 100% of Device resources are used.
    along with the warning i am getting some infomation as given below, what does it mean plzz explain me-
    Xst:3218 - HDL ADVISOR - The RAM <Mram_mem_g> will be implemented on LUTs either because you have described an asynchronous read or because of currently unsupported block RAM features. If you have described an asynchronous read, making it synchronous would allow you to take advantage of available block RAM resources, for optimized device usage and improved timings. Please refer to your documentation for coding guidelines.
    The code in which i am getting problem is-
    `timescale 10ns / 1ns
    module p (
    clk       , // Clock Input
    addr     , // address Input
    data_t_in , // data input
    data_g_in , // data input
    data_t_out, // data output
    data_g_out, // data output
    data_e_in , // Episode input
    data_e_out, // Episode output
    reset,
    cs        , // Chip Select
    re
    parameter data_WIDTH = 9;
    parameter ADDR_WIDTH = 335;
    parameter data_t_WIDTH = 12;
    parameter data_e_WIDTH = 1;
    parameter RAM_DEPTH = 1 << ADDR_WIDTH;
    //--------------Input Ports-----------------------
    input [ADDR_WIDTH:0] addr;
    input [data_t_WIDTH:0] data_t_in;
    input [data_WIDTH:0] data_g_in;
    input [data_e_WIDTH:0] data_e_in;
    input  cs;
    input re;
    input clk;
    input reset;
    //--------------Output Ports-----------------------
    output [data_WIDTH:0] data_g_out;
    reg [data_WIDTH:0] data_g_out;
    output [data_t_WIDTH:0] data_t_out;
    reg [data_t_WIDTH:0] data_t_out;
    output [data_e_WIDTH:0] data_e_out;
    reg [data_e_WIDTH:0] data_e_out;
    //--------------Internal variables----------------
     reg [data_WIDTH:0] mem_g [0:ADDR_WIDTH]; //
    reg [data_t_WIDTH:0] mem_t [0:ADDR_WIDTH]; //
    reg [data_e_WIDTH:0] mem_e [0:ADDR_WIDTH]; //
    integer i;
    //--------------Code Starts Here------------------
    // Memory Write Block
    // Write Operation
    always @(posedge clk)
    begin
    if (reset == 1) begin
        for (i = 0; i < 336 ; i = i + 1) begin
           mem_t[i] <= 2800;
         end
      end
      else if (cs && !re) begin
         mem_g[addr] <= data_g_in;
         mem_t[addr] <= data_t_in;
         mem_e[addr] <= data_e_in;
      end
     else if (cs && re) begin
        data_g_out <= mem_g[addr];
        data_t_out <= mem_t[addr];
        data_e_out <= mem_e[addr];
      end
    end
    endmodule
     

    Hello ,
    The Warning "Xst:3218 - HDL ADVISOR" is self explanatory which mentions that your RAM has asynchronous read which is unsupported. 
    You can check the following UG at page number 204 for RAM coding guidelines:
    http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/xst_v6s6.pdf
    You can also use Block Memory generator core to generate RAM. Check the below doc for more details. 
    http://www.xilinx.com/support/documentation/ip_documentation/blk_mem_gen/v7_2/pg058-blk-mem-gen.pdf
    check  the Spartan 6 Block Ram user guide:
    http://www.xilinx.com/support/documentation/user_guides/ug383.pdf
    --Syed
    Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
    Give Kudos to a post which you think is helpful and reply oriented.
    ----------------------------------------------------------------------------------------------

  • Using the Security Manager to restrict access to a single package

    After reading up on the Security Manager, the package.access property and the use of the [accessClassInPackage RuntimePermission|http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html#RuntimePermission] , it seemed to me that it would possible to set up the following: I have a security-sensitive code base packaged in a jar, and I want to make sure that only one client code base that I specify is permitted to access it. The idea here is to prevent malicious code from executing anything in the sensitive code base; the sensitive code is only accessible to one client that I name in a security policy file. Perhaps rather foolishly, I advised a client to consider this before testing out a sample myself, because much to my surprise, it appears to me that it isn't possible to get the Security Manager to do this at all. Am I missing something? I'm a bit startled by this conclusion -- it seems like such an obvious use for the Security Manager, I'm hard-pressed to be believe that it can't be done, and more inclined to suspect that I'm going about it wrong.
    Here's what I thought I could do: set up the package.access property so that it denies access to any package; then in the policy file, grant the RuntimePermission/accessClassInPackage to the client code base that is permitted to access the sensitive code.
    Of course, you wouldn't want the package.access property to exclude all packages in the global java.security file, because then no code could be accessed at all. It would be necessary to use the trick of resetting the package.access property within the code, as [illustrated in the secure coding guidelines|http://java.sun.com/security/seccodeguide.html#1-1a] .
    But the problem lies in the idea of "use the package.access property to deny access to +any+ package". There doesn't seem to be any way to use wildcards or the like with the property -- it has to specifically name packages (or package prefixes) to which access is forbidden. It wouldn't do to try to name the packages to which I'm trying to prevent access, since we're trying to prevent access from malicious code -- the attacker could just choose package names that aren't on the list. I'd really need to say that access is denied to all packages, except for those in the permitted code base, but the security mechanisms for package access don't seem to allow that.
    Moreover, the trick of changing the value of package.access can't be done within the client code -- otherwise, the attacker client would just set the property to his own purposes. But it can't really be done within the sensitive package either, because the whole idea is to prevent access to that package, and by the time it's busy setting the property, it's already too late, because the package has to have been accessed by a client to get there at all.
    It seems to me that this a symptom of something I've never really understood about the design of the Security Manager -- you can grant permissions to specific code bases, but you can't revoke permissions from specific code bases, let alone all code bases. What I want to do here is grant access permission to one specific code base and revoke it from all others. There doesn't seem to be any way to express that with the mechanisms of the Security Manager.
    The more I look at it, the more it seems that there's just no way to use the Security Manager this way -- set up package access so that a specific code base can only be accessed by one specific client code base. There are surely other ways to get the effect that I'm looking for, but as far as I can tell, none of them involve restricting package access (for example: define a custom permission, grant it only to the permitted client. and check against that permission within the sensitive code base; meaning that the sensitive code has to be accessible to anyone in the first place). This conclusion really surprises me (not to mention my bit of embarrassment with the client); wouldn't this be precisely the sort of thing the Security Manager ought to be good for?

    You're looking at this back to front. The security policy file is there for the client to decide how much access he is going to give this application, not for to application to restrict who can use it. If you want to control what used to be called 'state orientation' you can do that directly by looking down the stack trace inside your code.

  • Audit and Standard Javadoc applied to all Jdeveloper project java classes

    Hi,
    I want to apply standard Javadoc to all the java classes I have written. Is there a quick way of doing it in 11.1.1.3
    I have already done the following but the code editor rules are not getting enforced.
    1) Go to 'Tools' and then choose 'Preferences
    2) Go to the 'Code Editor' and under it 'Java' and then 'Javadoc'
    3) Select all the tags like @author @version @param etc and modify the Tag properties to be required and then click OK
    4) Next I create a new Java class but the code editor rules are not enforced.
    Questions:
    a) How to enforce the code editor preferences?
    b) How to automatically generate the missing javadocs in the existing classes in Jdeveloper?
    c) How to audit and setup a coding standard, so that it's easier to monitor what everybody in the project does and adheres to the coding guidelines.
    Bottomline - Are these possible in JDeveloper 11.1.1.3
    Thanks

    Have a look at the JDeveloper code audit feature.
    Under tools->preferences->audit->profiles
    You can either modify or add a new profile and check the JavaDoc Comments rules.
    You can switch the Missing Comment rule to have a more serious severity.
    Then you can audit your file (or the complete project).
    In the audit window you'll see an option to automatically fix error that the Audit flagged - this can include adding the missing Javadoc.

Maybe you are looking for

  • Mac OS 10.7 and Premiere Pro CS5 not reading AVI and DV files, not rendering to Media Encoder

    Hi Folks, I've been wrestling with these problems since I bought my Macbook Pro running Lion (currently v10.7.3). I've had video editing and DVD authoring workflows that have worked perfectly for both CS3 and CS4 with Premiere Pro and Encore. I used

  • If no data, no report file. How to?

    Hi, I have the following problem: When my report is empty (no data returned in my ref cursor), the report header section is displayed with an empty page from the main section. I tried to apply formatting triggers on the fields/frames in order to hide

  • How can I forward a request from to another servlet?

    If I would like to forward a request from a servlet to another one, but they are not located in the same machine. Could I use the following code to do it? getServletConfig().getServletContext().getRequestDispatcher("XXXXX").forward(request, response)

  • Resize-partition PowerShell - using a variable for size

    Hello. I'm trying to user the PowerShell command resize-partition as part of a RunBook task so I need to be able to specify the size as a variable. The -size element requires that you also add on the size type (e.g. kb, mb, gb, tb etc.) but this make

  • WHT & APP

    Hi Experts, - In APP, Bank determination-->available amounts. when this field gets updated, I think it does not update after each payment run. Pl correct me? - What significance of WHT Key & Business place in WHT? please send your thoughts and assign