Skip to content

Commit

Permalink
Do not detect false positive license in Java
Browse files Browse the repository at this point in the history
Reference: #2865
Reported-by: Patrick Kutter @PatteSI
Reported-by: Sebastian Schuberth @sschuberth
Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne committed Feb 15, 2022
1 parent 24aae22 commit dade204
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/licensedcode/data/rules/false-positive_48.RULE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mutable but may not be modified by the user
2 changes: 2 additions & 0 deletions src/licensedcode/data/rules/false-positive_48.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
is_false_positive: yes
notes: See in https://raw.githubusercontent.com/google/guava/v31.0.1/guava/src/com/google/common/graph/StandardValueGraph.java
41 changes: 41 additions & 0 deletions tests/licensedcode/data/datadriven/lic4/StandardValueGraph.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (C) 2016 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.common.graph;

import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.graph.GraphConstants.DEFAULT_NODE_COUNT;
import static com.google.common.graph.Graphs.checkNonNegative;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import javax.annotation.CheckForNull;

/**
* Standard implementation of {@link ValueGraph} that supports the options supplied by {@link
* AbstractGraphBuilder}.
*
* <p>This class maintains a map of nodes to {@link GraphConnections}.
*
* <p>Collection-returning accessors return unmodifiable views: the view returned will reflect
* changes to the graph (if the graph is mutable) but may not be modified by the user.
*
* <p>The time complexity of all collection-returning accessors is O(1), since views are returned.
*
*/

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
license_expressions:
- apache-2.0
notes: there was some false positive detected before this

0 comments on commit dade204

Please sign in to comment.