|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2013, 2014 GK Software AG and others. |
2 |
* Copyright (c) 2013, 2014 GK Software AG, IBM and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 128-134
public class NullAnnotationMatching {
Link Here
|
| 128 |
if (requiredType.dimensions() == providedType.dimensions()) { |
128 |
if (requiredType.dimensions() == providedType.dimensions()) { |
| 129 |
long[] providedDimsTagBits = ((ArrayBinding)providedType).nullTagBitsPerDimension; |
129 |
long[] providedDimsTagBits = ((ArrayBinding)providedType).nullTagBitsPerDimension; |
| 130 |
if (providedDimsTagBits == null) { |
130 |
if (providedDimsTagBits == null) { |
| 131 |
severity = 1; // required is annotated, provided not, need unchecked conversion |
131 |
for (int i=0; i <=dims; i++) { |
|
|
132 |
long requiredBits = validNullTagBits(requiredDimsTagBits[i]); |
| 133 |
if (i > 0) |
| 134 |
nullStatus = -1; |
| 135 |
severity = Math.max(severity, computeNullProblemSeverity(requiredBits, 0, nullStatus, strict)); |
| 136 |
if (severity == 2) |
| 137 |
return NullAnnotationMatching.NULL_ANNOTATIONS_MISMATCH; |
| 138 |
} |
| 132 |
} else { |
139 |
} else { |
| 133 |
for (int i=0; i<=dims; i++) { |
140 |
for (int i=0; i<=dims; i++) { |
| 134 |
long requiredBits = validNullTagBits(requiredDimsTagBits[i]); |
141 |
long requiredBits = validNullTagBits(requiredDimsTagBits[i]); |