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?
java sonarqube suppress-warnings
marked as duplicate by Henry
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 |
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?
java sonarqube suppress-warnings
marked as duplicate by Henry
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// NOSONARto 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,// NOSONARseems 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 |
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?
java sonarqube suppress-warnings
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
java sonarqube suppress-warnings
asked Nov 12 at 6:26
Andremoniy
21.7k673154
21.7k673154
marked as duplicate by Henry
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
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// NOSONARto 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,// NOSONARseems 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 |
Add a comment// NOSONARto 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,// NOSONARseems 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
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Can you please try:
import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR
add a comment |
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 lineDeactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines
add a comment |
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
add a comment |
up vote
1
down vote
accepted
Can you please try:
import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Can you please try:
import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR
Can you please try:
import com.sun.xml.ws.developer.JAXWSProperties; // NOSONAR
answered Nov 12 at 7:03
Raheela Aslam
36210
36210
add a comment |
add a comment |
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 lineDeactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines
add a comment |
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 lineDeactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines
add a comment |
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 lineDeactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines
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 lineDeactivate rule squid:S1191 (available in Eclipse) - if you have multiple lines
answered Nov 12 at 7:00
user7294900
19.6k93157
19.6k93157
add a comment |
add a comment |
Add a comment
// NOSONARto 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,
// NOSONARseems 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