JDeveloper 11 ignores @SuppressWarnings at method level

Seems that this only works at class level.
If you add it at a method level, JDev simply ignores it and continues to display warnings.
Has anyone found how to get it to work?

Hi,
This is the code:
<snip>
@SuppressWarnings("unchecked")
public List<T> findAll(final int... rowStartIdxAndCount)
return commonPersistence.findAll(getClassName(), rowStartIdxAndCount);
<snip>
If I add this annotation to the line just before declaration of the class, it actually works, but becomes reasonably useless as I don't see any other warnings for the class.
Thanks
Jonny

Similar Messages

  • How to implement method level authorisation in JSF

    Hi all,
    I am new to JSF 2. I have been able to implement authorization on my web pages, but I also want to implement it at the bean level. Does JSF 2 provide an in-built functionality to implement role-based authorization on bean methods? Or, I need to use some security frameworks (i.e. ACEGI)?
    Thanks in advance,
    Neeraj

    I am curious: can you explain WHY you want method level security? It seems woefully overkill and paranoid to me - server level security should be enough to keep out rogue code.
    Anyway for that level of security, the security measures built into the JVM should be used.
    [Java Security documentation|http://java.sun.com/javase/technologies/security/]
    You can also look into a security API like Spring security - be warned though, it has a steep learning curve.

  • Method-level Locking

    (Here's another one):
    I'm unable to find a way to enable method-level locking in WebLogic.
    This kind of lock has the same semantics as a simple "synchronized" on the
    method level (which you cannot write as a bean developer). The advantage is
    that you've got thread-safe access to a method without expensively
    interfering with the transaction manager.
    So is this possible in WLS v6.1/v7.0?
    Regards,
    Pieter Van Gorp.

    I assume you are talking about entity beans. You can use the "Exclusive"
    concurrency strategy. Here is the link:
    http://e-docs.bea.com/wls/docs61/ejb/reference.html#1139340
    "Pieter Van Gorp" <[email protected]> wrote in message
    news:[email protected]..
    (Here's another one):
    I'm unable to find a way to enable method-level locking in WebLogic.
    This kind of lock has the same semantics as a simple "synchronized" on the
    method level (which you cannot write as a bean developer). The advantageis
    that you've got thread-safe access to a method without expensively
    interfering with the transaction manager.
    So is this possible in WLS v6.1/v7.0?
    Regards,
    Pieter Van Gorp.

  • RE.PaperSource and PrinterDuplex properties are ignored by PrintOut method

    There is a thread with the title, PaperSource and PrinterDuplex properties are ignored by PrintOut method, which I have left a message on. This was last week.
    My question is, does anyone on the SAP support staff monitor new posts on existing threads?
    Please let me know as soon as possible. My company is having an issue exactly like the
    one described in this thread and I need a reply positive or negative to my question, so
    I can report to my project leader.
    Thank you for any help. You can get to the 'PaperSource and PrinterDuplex properties are ignored by PrintOut method' thread by searching for "papersource".
    Thanks again,
    Joe

    1) This is only community forum, so while we try, you may or may not get an answer. If you want to be sure of getting hold of support, you'll need to obtain a support contract here:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
    2) I searched this forum (Legacy Application Development SDKs) for PaperSource and PrinterDuplex, but was not able to find the thread. Do you have a link to this? If not, please restate your issue ensuring that you provide the following information:
    version of CR used
    development language used
    is this a web or win app?
    is this behavior happening on your development computer or after the application is distributed?
    what service pack has been applied to your version of CR?
    Ludek

  • "method level" serializable ServerSockets

    i don't understand why this code block can be serialized:
    public class Foo extends Thread implements Serializable {
      public void run() {
        ServerSocket servSok = new ServerSocket(9876);
        Socket sok = servSok.accept();
    }compare with this code block. as expected it cannot serialize (unless transient is used):
    exception code = " +NotSerializableException: java.net.ServerSocket+ "
    public class Foo extends Thread implements Serializable {
      private ServerSocket servSok = null;  // <-- add "transient" and ok.
      public void run() {
        this.servSok = new ServerSocket(9876);
        Socket sok = servSok.accept();
    note: both are live, running, threads when serialized.
    one is an instance level object, the other a method level. but i cannot take my understanding
    beyond that. can someone talk me through what is going on?
    both are bound ServerSockets . neither can pop-up, after de-serialization, bound to a port
    on a remote jvm.

    pdFrog wrote:
    Your misunderstanding is that methods do not get serializedok. i did not know that.
    i think this is why we need the class loaders.Mneh, in a roundabout way, but probably not the way you're thinking. Technically speaking, methods are already serialized, in that their bytecode exists as a stream. But if you're trying to serialize code, not just data, you've probably misunderstood why we serialize. In particular, serializing a Socket connection of any kind is a bit pointless.

  • Method-level ACLs

    Can anyone provide me with an example web.xml file that has acl protection at the method level? There is documentation saying that you can protect down to the method level, but I am having trouble finding anything on how...

    I assume you are talking about entity beans. You can use the "Exclusive"
    concurrency strategy. Here is the link:
    http://e-docs.bea.com/wls/docs61/ejb/reference.html#1139340
    "Pieter Van Gorp" <[email protected]> wrote in message
    news:[email protected]..
    (Here's another one):
    I'm unable to find a way to enable method-level locking in WebLogic.
    This kind of lock has the same semantics as a simple "synchronized" on the
    method level (which you cannot write as a bean developer). The advantageis
    that you've got thread-safe access to a method without expensively
    interfering with the transaction manager.
    So is this possible in WLS v6.1/v7.0?
    Regards,
    Pieter Van Gorp.

  • Generics at method level

    As we all know, in Java5.0, Sun introduced Generics. Now I used this at class level and at field method. However I tried using them at method level, but could not succeced.
    I did a search on the internet and I found a very good article about generics. The url is the following: http://www-128.ibm.com/developerworks/java/library/j-djc02113.html
    Scrolling to the bottom, I found out what I needed. the example on that website shows the following:class Utilities {
       <T extends Object> public static List<T> make(T first) {
         return new List<T>(first);
    }However I tried to do this code in a method inside my project, but did not work at all.
    Does any one know how I can do generics at method level. What I want to achieve is that you pass the class type you want to be returned as a generic at the method level.
    regards,
    sim085

    Please before you check my code, check the example that there is in the article, that is the code I posted in my first post. I based all this on the information I read from the website, and since the source looks very reliable,, there is no need for me to doubt that it works!
    I did a simple example, I am just using generics to get used to them ... Here comes the exampleimport java.util.*;
    public class Test{
         private List<String> myList;
         public Test(){
              myList = new ArrayList<String>();
              <List>normalMethod();
         <T>public T normalMethod(){
              return null;
         <T>public static void staticMethod(){
         public static void main(String... args){
              <List>staticMethod();
              new Test();
    }The exception throws is an exception you would see when the syntax is incorrect. However I do have Java5.0 and if you delete the methods and the method calls, but you leave the generics at the field level , the code would compile.
    The exception throws are the following:C:\Documents and Settings\saquilina\My Documents\Test.java:21: illegal start of type
         <T>public static void staticMethod(){
               ^
    C:\Documents and Settings\saquilina\My Documents\Test.java:32: <identifier> expected
    }Now since in the example in that website they use a static method, I tried it also with a static method, but it did not work all the same :(
    regards,
    sim085

  • JAAS method level authorisation

    Hi
    Is it possible to do method level authorisation in java.
    I was under the impression you grant permission at the class level. Can you please inform as to
    how we can grant permissions at method level.
    example :
    class A {
    method1();
    method2();
    can I grant permissions to A.method1() to execute, without having to create an actions class
    with run implemented as required , that is :
    class actionMethod1() implements PrivilegedAction {
    run(){
    A.method1();
    because then I will have to create too many action classes !

    Hi, try this:
    Within method 1 of Class A, do a permission check at the beginning of the method.
    Class A {
    1. public void method1() {
    2. SecurityManger sm = System.getSecurityManager();
    3. if(sm!= null ) {
    4. sm.checkPermission( new XXXPermission() );
    5. }
    6. }
    where XXXPermission is the type of permission that your checking for. If the current thread doesn't have this (XXXPermission) permission, then a SecurityException will be thrown and the rest of the method will not be executed. Alternatively, I believe that the above code (line 2-4) can be replaced with :
    1. AccessController.checkPermission(new XXXPermission());
    I hope this helps. You can also try referring to: http://java.sun.com/j2se/1.4/docs/api/java/security/AccessController.html
    >
    Hi
    Is it possible to do method level authorisation in
    java.
    I was under the impression you grant permission at the
    class level. Can you please inform as to
    how we can grant permissions at method level.
    example :
    class A {
    method1();
    method2();
    can I grant permissions to A.method1() to execute,
    without having to create an actions class
    with run implemented as required , that is :
    class actionMethod1() implements PrivilegedAction {
    run(){
    A.method1();
    because then I will have to create too many action
    classes !

  • JDeveloper-Is it suitable for enterprise-level systems?

    I develop 'traditional' Oracle forms/reports applications in
    client-server systems and I am considering using Java for future
    application development. Such applications are usually
    keyboard-intensive, having screens capable of rapid data entry as
    well as providing MIS reporting functions via crystal reports
    /oracle reports/SqlPLus. My questions are:
    o Is JDeveloper designed to build such applications (e.g. having
    menus, hot keys, menu shortcuts, function key re-definition & the
    ability to 'tab' a user thru fields)?
    o Does JDeveloper have any in-built reporting tools and if not,
    which reporting product do you recommend for use alongside a Java
    application built using JDeveloper?
    o Are there any reference sites having any major multi-user
    applications built using JDeveloper?
    o I've had my fingers burnt trying to develop using Power
    Objects - I'd rather not make that mistake again
    Is anyone else in the developer community doing this stuff - I'd
    love to hear your views ... Thanks in advance for any info you
    can provide ...
    chris
    null

    Hi Keith,
    the Remote Support Component is currently only working for Enterprise installations. We already got another request for Edge support, but it is not yet decided about it.
    Best Regards,
    Christian

  • Throtting or Work Managers - OSB @ method level

    Would it be possible to throttle a BS or set a work manager for the PS at the WSDL operation level?

    Work-manager setup and throttling are two different concepts. Throttling is used to restrict the message flow to a business service however work managers are used to prioritize service work. Remember that in case of throttling there is possibility of message loss however with work manager setup there is no such possibility.
    To give an example, suppose you are routing PO ACK's to target system. Given that, latest PO ACK is sufficient to provide the status of PO, it is not mandatory to deliver all the PO ACKs to the target system. So if I have to restrict the flow to target system here, I will use throttling.
    If there are two type of messages being processed in your OSB, suppose PO and PO ACK, you will always prefer that PO gets processed on priority and PO ACK processing must not affect the PO processing. Hence here I will use work-manager to prioritize the processing of PO.
    Regards,
    Anuj

  • PaperSource and PrinterDuplex properties are ignored by PrintOut method

    Hi,
    I use the RDC in my Delphi application, to print reports with Crystal Report XI R2.
    (Crystal Reports ActiveX Designer Run Time Library 11.5).
    I'd like to change duplex and source settings, specifying PaperSource and PaperDuplex parameters, but the printer  always print using the default settings.
    Here is the used code :
    FCrpeApp11 : TCRApplication;
    FCrpe11 : IReport;
    FCrpeApp11.OpenReport(zNomEtat);
    FCrpe11.SelectPrinter('', EdImprimante.Text, '');
    FCrpe11.PaperOrientation := crPortrait;
    FCrpe11.PaperSource := crPRBinManual;
    FCrpe11.PrinterDuplex := crPRDPVertical;
    FCrpe11.PrintOut(False, 1, False, 1, 9999);
    There aren't any problems to specify those settings using FCrpe11.PrinterSetup. The problem occurs when we want to specify PaperSource and PrinterDuplex properties. Could you explain us why it happens?

    Unfortunately, CR 10 has been retired for well over 5 years now. If it does not work, for your printer, try another printer driver. If this is a CR issue it will not be fixed.
    One other option is to call sales, see if they can still set you ups with CR XI R2 (v. 11.5.x). Note that this version is also retired (has been for over 3 years), but perhaps it will work better. One more note; CR XI R2 was the last version of CR to ship the RDC.
    Ph for sales: 866-681-3435
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Using criteria on date ranges and ignoring times, best method

    Where col.date is a date and time datatype, I know that by using:
    trunc(col.date) between trunc(sysdate-10) and trunc(sysdate)
    or
    to_char(col.dat,'YYYYMMDD') between to_char(sysdate-10,'YYYYMMDD') and to_char(sysdate,'YYYYMMDD')
    the results will include rows where col.date is between and including sysdate less 10 days and sysdate.
    However, this means Oracle will not use any ordinary (ie not function based) index on the table.
    I do not want to add another index (it's a transaction table with many transactions per second) and I would like to improve the speed of the query.
    I know that it is close to use
    col.date between sysdate-10 and sysdate+ (1-1/(60*60*24)) but this will cause missed data.
    select sysdate-10 from dual
    2007-01-20-14.03.44
    But I want to include any transaction on 2007-01-20, before, during and after the time of 14.03.44.
    Perhaps I have to either live with the speed problem or create a function based index on trunc(col.dated).
    Any comments, thanks?

    If you worry about index using why not to use <<datecolumn>> >= trunc(sysdate-10) and <<datecolumn>> < trunc(sysdate+1) ?
    SQL> create table t (dt) as select sysdate+10-rownum from dict where rownum <=30;
    Table created.
    SQL> alter table t add primary key (dt);
    Table altered.
    SQL> set autotrace on
    SQL> select dt from t where trunc(dt) between trunc(sysdate-10) and trunc(sysdate);
    DT
    20-JAN-07
    21-JAN-07
    22-JAN-07
    23-JAN-07
    24-JAN-07
    25-JAN-07
    26-JAN-07
    27-JAN-07
    28-JAN-07
    29-JAN-07
    30-JAN-07
    11 rows selected.
    Execution Plan
    Plan hash value: 209346666
    | Id  | Operation        | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |             |    11 |    99 |     1   (0)| 00:00:01 |
    |*  1 |  FILTER          |             |       |       |            |          |
    |*  2 |   INDEX FULL SCAN| SYS_C005970 |    11 |    99 |     1   (0)| 00:00:01 |
    SQL> select dt from t where dt >= trunc(sysdate-10) and dt < trunc(sysdate+1);
    DT
    20-JAN-07
    21-JAN-07
    22-JAN-07
    23-JAN-07
    24-JAN-07
    25-JAN-07
    26-JAN-07
    27-JAN-07
    28-JAN-07
    29-JAN-07
    30-JAN-07
    11 rows selected.
    Execution Plan
    Plan hash value: 114909756
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time
    |
    |   0 | SELECT STATEMENT  |             |    11 |    99 |     1   (0)| 00:00:01
    |
    |*  1 |  FILTER           |             |       |       |            |
    |
    |*  2 |   INDEX RANGE SCAN| SYS_C005970 |    11 |    99 |     1   (0)| 00:00:01
    |
    --------------------------------------------------------------------------------Rgds.

  • Transaction Isolation Level for EJB methods

    L.S.
    I just found out the in OC4J one can not set the transaction isolation level on ejb methods. Moreover one needs to revert to bean managed transaction (manual coding of the ALL transaction logic) to set the isolation level.
    On entity beans one can only set the isolation level for the whole bean (not on individual methods), and in session beans there is no way at all to set the isolation level.
    This is on shear contract to all other application servers I used before (there one can declaratively set the isolation level for a ejb method, both in session and in entitybean deployment descriptors)
    Is it foreseen in a future release to include such a valuable feature will be provided by oc4j?
    Note that I was VERY surprised that OC4J could not handle this (I checked the j2ee spec, but admittedly the spec is a little vague about this support and makes it vendor dependent. the j2ee spec does not mandate this, except for CMP entity beans, but includes some suggestions on this ability. But most other application servers implemented the ability)
    Regadrs,
    Erik

    Hello Erik --
    I think we met in Perth recently?
    Anyway, your information is correct.
    We can set the transaction isolation level for each entity bean, at the bean level. We don't have for the specification of method level isolation settings -- I'd be interested to hear how you would like/do use this. What behaviour do you expect to see when a transaction is started that spans multiple methods on a bean with different declared isolation levels.
    For session beans, we do not currently have the ability to declaratively specify the isolation level to use for the bean. I know this is not in the forthcoming 904 release, and will to check what is beyond that.
    As you point out, this can be done programatically using the Connection.setIsolationLevel() method on any connections you are using from within the session bean.
    I'd would like to log an enhancement request for you for this functionality. Can you send me an email at [email protected] and we'll take it offline.
    -steve-

  • Compiler cannot find method that is there (Oracle 9i JDeveloper)

    Hi
    In one of my OA Framework classes Im doing some XML validation.
    In 1 class I do this:
    import oracle.xml.parser.v2.SAXParser;
    SAXParser parser = new SAXParser();
    parser.setValidationMode(SAXParser.SCHEMA_STRICT_VALIDATION);
    <or Alternatively>
    parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
    The compiler complains that it cannot find these methods in SAXParser class.
    However, in the editing window, if I hit CTRL+Space for autocompletion JDeveloper can 'see' both these methods (setFeature() is actually defined in SAXParser and setValidationMode is inherited from parent class XMLParser).
    It seems the editor can access the resources but the compiler cannot.
    Ive tried both the XSQL Runtime and Oracle XML Parser 2 libraries in my project configuration and have even tried them in different positions in the 'Selected Libraries' window.
    Im using XDK 9.0.3.0.0 with JDeveloper 9i.
    Any help appreciated
    Jon

    Have you checked the ApJServLogFile? You might find some clues there.
    I'm curious as to why you are getting 'display' errors. Is your display environment set up properly?
    Alison

  • JDeveloper tags action method as error

    I have a JSF backing bean - tvApplicationDetail - whose class - TVApplicationDetail - is derived from another class - ApplicationDetail. ApplicationDetail has several action methods - e.g., discardChanges. When I use the following EL expression:
    <af:commandButton .... action="#{tvApplicationDetail.discardChanges}" ... />
    JDeveloper thinks discardChanges() is not a valid method in tvApplicationDetail, so it underscores the EL expression in red, and displays an error indicator on the status bar.
    Although the page works fine, the (incorrect) error indication is kind of annoying. It would be nice if JDeveloper looked up the action method in the entire class hierarchy.

    What is the message of this PropertyNotFoundException?

Maybe you are looking for

  • How to solve "this type of file is not supported, or the required codec is not installed"?

    Hi all, I've just started using a new computer with WIndows 8.1 within the last week and have loaded my Adobe Premiere Elements 11.0 software into it. In trying to view and edit a video I created on my old computer, I got "Media Pending" and "Media O

  • Muse, Transferring from Vista, no Longer supported by adobe to windows 7

    My laptop has window 7, my PC with the designed website on it has Vista.  I can no longer open vista. THe files for Muse have been found but do not transfer to my PC I have tried drop box and memory stick.  MOst of the files do not show a size, IE as

  • Problem with Session

    Hi all, i am performing BDC recording as part of my report,i am passing the session name and one check boxon selection screen.when this check box is checked i have to submit the session with the name passed on selection screen. what i am doing is in

  • Removing a movieClip from another movieClip

    Hey,  How do I make visible a movie clip in the main movie from another movie clip when it loads? Not using addchild since the movie clip is on stage. thanks in advance...mesa Main timeline ---- a simple timeline with two movie clips named aMovie bMo

  • One model for several tables

    Hello! I want to use one model in two tables.That's why within Model(in getModel method) I must know what table request my Model. How can I do that?