Skip to content

Check S1451 copyright rule #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 22 additions & 31 deletions src/main/java/com/mycompany/app/App.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
/**
2 * COPYRIGHT: Comviva Technologies Pvt. Ltd.
3 * This software is the sole property of Comviva
4 * and is protected by copyright law and international
5 * treaty provisions. Unauthorized reproduction or
6 * redistribution of this program, or any portion of
7 * it may result in severe civil and criminal penalties
8 * and will be prosecuted to the maximum extent possible
9 * under the law. Comviva reserves all rights not
10 * expressly granted. You may not reverse engineer, decompile,
11 * or disassemble the software, except and only to the
12 * extent that such activity is expressly permitted
13 * by applicable law notwithstanding this limitation.
14 * THIS SOFTWARE IS PROVIDED TO YOU “AS IS” WITHOUT
15 * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
16 * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
18 * YOU ASSUME THE ENTIRE RISK AS TO THE ACCURACY
19 * AND THE USE OF THIS SOFTWARE. Comviva SHALL NOT BE LIABLE FOR
20 * ANY DAMAGES WHATSOEVER ARISING OUT OF THE USE OF OR INABILITY TO
21 * USE THIS SOFTWARE, EVEN IF Comviva HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 **/
package com.mycompany.app;

/**
* Hello world!
*/
public class App
{

private final String message = "Hello World!";

public App() {}
Expand All @@ -17,34 +38,4 @@ public static void main(String[] args) {
private final String getMessage() {
return message;
}

private class S2259FalsePositive {
private enum Valid {
OK, NOT_OK;
}

public String test(String s) {
Valid valid = Valid.OK;
if (s == null) {
valid = Valid.NOT_OK;
}

if (valid == Valid.OK) {
return s.toLowerCase(); // FP
}
return "";
}

public String test2(String s) {
boolean valid = true;
if (s == null) {
valid = false;
}

if (valid) {
return s.toLowerCase(); // No FP
}
return "";
}
}
}