Suppress Sonar's warning on import [duplicate]











up vote
1
down vote

favorite













This question already has an answer here:




  • Turning Sonar off for certain code

    5 answers




Disclaimer: I am not asking about alternative imports. While this information may be useful, feel free to leave a comment; but any answer containing something like use another import will be downvoted. I am asking about how to suppress the warning. Thanks!



Here is the import I use:



import com.sun.xml.ws.developer.JAXWSProperties;


Sonar complains about it saying:




Use classes from the Java API instead of Sun classes. (squid:S1191)




How can I suppress this warning?










share|improve this question













marked as duplicate by Henry java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 10:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Add a comment // NOSONAR to the line.
    – Henry
    Nov 12 at 6:31










  • Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
    – Raheela Aslam
    Nov 12 at 6:31










  • In eclipse you can deactivate the rule
    – user7294900
    Nov 12 at 6:41






  • 2




    thanks, guys, // NOSONAR seems to be working. This should be an answer!
    – Andremoniy
    Nov 12 at 6:41










  • @user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
    – Andremoniy
    Nov 12 at 6:44















up vote
1
down vote

favorite













This question already has an answer here:




  • Turning Sonar off for certain code

    5 answers




Disclaimer: I am not asking about alternative imports. While this information may be useful, feel free to leave a comment; but any answer containing something like use another import will be downvoted. I am asking about how to suppress the warning. Thanks!



Here is the import I use:



import com.sun.xml.ws.developer.JAXWSProperties;


Sonar complains about it saying:




Use classes from the Java API instead of Sun classes. (squid:S1191)




How can I suppress this warning?










share|improve this question













marked as duplicate by Henry java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 10:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Add a comment // NOSONAR to the line.
    – Henry
    Nov 12 at 6:31










  • Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
    – Raheela Aslam
    Nov 12 at 6:31










  • In eclipse you can deactivate the rule
    – user7294900
    Nov 12 at 6:41






  • 2




    thanks, guys, // NOSONAR seems to be working. This should be an answer!
    – Andremoniy
    Nov 12 at 6:41










  • @user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
    – Andremoniy
    Nov 12 at 6:44













up vote
1
down vote

favorite









up vote
1
down vote

favorite












This question already has an answer here:




  • Turning Sonar off for certain code

    5 answers




Disclaimer: I am not asking about alternative imports. While this information may be useful, feel free to leave a comment; but any answer containing something like use another import will be downvoted. I am asking about how to suppress the warning. Thanks!



Here is the import I use:



import com.sun.xml.ws.developer.JAXWSProperties;


Sonar complains about it saying:




Use classes from the Java API instead of Sun classes. (squid:S1191)




How can I suppress this warning?










share|improve this question














This question already has an answer here:




  • Turning Sonar off for certain code

    5 answers




Disclaimer: I am not asking about alternative imports. While this information may be useful, feel free to leave a comment; but any answer containing something like use another import will be downvoted. I am asking about how to suppress the warning. Thanks!



Here is the import I use:



import com.sun.xml.ws.developer.JAXWSProperties;


Sonar complains about it saying:




Use classes from the Java API instead of Sun classes. (squid:S1191)




How can I suppress this warning?





This question already has an answer here:




  • Turning Sonar off for certain code

    5 answers








java sonarqube suppress-warnings






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 at 6:26









Andremoniy

21.7k673154




21.7k673154




marked as duplicate by Henry java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 10:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Henry java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 12 at 10:22


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Add a comment // NOSONAR to the line.
    – Henry
    Nov 12 at 6:31










  • Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
    – Raheela Aslam
    Nov 12 at 6:31










  • In eclipse you can deactivate the rule
    – user7294900
    Nov 12 at 6:41






  • 2




    thanks, guys, // NOSONAR seems to be working. This should be an answer!
    – Andremoniy
    Nov 12 at 6:41










  • @user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
    – Andremoniy
    Nov 12 at 6:44


















  • Add a comment // NOSONAR to the line.
    – Henry
    Nov 12 at 6:31










  • Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
    – Raheela Aslam
    Nov 12 at 6:31










  • In eclipse you can deactivate the rule
    – user7294900
    Nov 12 at 6:41






  • 2




    thanks, guys, // NOSONAR seems to be working. This should be an answer!
    – Andremoniy
    Nov 12 at 6:41










  • @user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
    – Andremoniy
    Nov 12 at 6:44
















Add a comment // NOSONAR to the line.
– Henry
Nov 12 at 6:31




Add a comment // NOSONAR to the line.
– Henry
Nov 12 at 6:31












Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
– Raheela Aslam
Nov 12 at 6:31




Can you please try import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR .
– Raheela Aslam
Nov 12 at 6:31












In eclipse you can deactivate the rule
– user7294900
Nov 12 at 6:41




In eclipse you can deactivate the rule
– user7294900
Nov 12 at 6:41




2




2




thanks, guys, // NOSONAR seems to be working. This should be an answer!
– Andremoniy
Nov 12 at 6:41




thanks, guys, // NOSONAR seems to be working. This should be an answer!
– Andremoniy
Nov 12 at 6:41












@user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
– Andremoniy
Nov 12 at 6:44




@user7294900 yes and no. The import section is quite tricky where you can't use the SupressWarning. So it is natural to raise a particular question about import
– Andremoniy
Nov 12 at 6:44












2 Answers
2






active

oldest

votes

















up vote
1
down vote



accepted










Can you please try:



import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR 





share|improve this answer




























    up vote
    1
    down vote













    As per comments, this is related to turn sonar off



    But adding @SupressWarning isn't possible in import statements, so your options:




    • Add at the end of the line //NOSONAR - for specific line


    • Deactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines







    share|improve this answer




























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote



      accepted










      Can you please try:



      import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR 





      share|improve this answer

























        up vote
        1
        down vote



        accepted










        Can you please try:



        import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR 





        share|improve this answer























          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Can you please try:



          import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR 





          share|improve this answer












          Can you please try:



          import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR 






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 12 at 7:03









          Raheela Aslam

          36210




          36210
























              up vote
              1
              down vote













              As per comments, this is related to turn sonar off



              But adding @SupressWarning isn't possible in import statements, so your options:




              • Add at the end of the line //NOSONAR - for specific line


              • Deactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines







              share|improve this answer

























                up vote
                1
                down vote













                As per comments, this is related to turn sonar off



                But adding @SupressWarning isn't possible in import statements, so your options:




                • Add at the end of the line //NOSONAR - for specific line


                • Deactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines







                share|improve this answer























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  As per comments, this is related to turn sonar off



                  But adding @SupressWarning isn't possible in import statements, so your options:




                  • Add at the end of the line //NOSONAR - for specific line


                  • Deactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines







                  share|improve this answer












                  As per comments, this is related to turn sonar off



                  But adding @SupressWarning isn't possible in import statements, so your options:




                  • Add at the end of the line //NOSONAR - for specific line


                  • Deactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 12 at 7:00









                  user7294900

                  19.6k93157




                  19.6k93157















                      Popular posts from this blog

                      How to pass form data using jquery Ajax to insert data in database?

                      革兰氏阴性菌

                      Ruby: hitting read_timeout even when changed