Skip to content
Snippets Groups Projects
Commit dc694db1 authored by Sebastian Krings's avatar Sebastian Krings
Browse files

use exists() instead of != null when checking for variable / constant

parent 33d84332
Branches
Tags
No related merge requests found
......@@ -44,7 +44,7 @@ public class ContextAttributeProcessor extends SCProcessorModule {
.getIdentifierString());
// might have been filtered out by previous modules
if (scConstant != null) {
if (scConstant.exists()) {
// original might not contain the attribute
if (constant.hasAttribute(UnitPragmaAttribute.ATTRIBUTE)) {
String attribute = constant
......
......@@ -44,7 +44,7 @@ public class MachineAttributeProcessor extends SCProcessorModule {
.getIdentifierString());
// might have been filtered out by previous modules
if (scVar != null) {
if (scVar.exists()) {
// original might not contain the attribute
if (var.hasAttribute(UnitPragmaAttribute.ATTRIBUTE)) {
String attribute = var
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment