Skip to content

Commit 8f1c09d

Browse files
author
Faisal Hameed
committed
Fixing squid:ClassVariableVisibilityCheck - Class variable fields should not have public accessibility.
1 parent 11a910e commit 8f1c09d

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

replay-sail/src/main/java/net/fortytwo/sesametools/replay/RecorderSailConnection.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public RecorderSailConnection(final AbstractSail sail,
5252
super(sail);
5353
this.queryHandler = queryHandler;
5454
this.config = config;
55-
if (config.logTransactions) {
55+
if (config.LOG_TRANSACTIONS) {
5656
queryHandler.handle(new ConstructorCall(id));
5757
}
5858
this.baseSailConnection = baseSail.getConnection();
@@ -64,7 +64,7 @@ protected void addStatementInternal(final Resource subj,
6464
final IRI pred,
6565
final Value obj,
6666
final Resource... contexts) throws SailException {
67-
if (config.logWriteOperations) {
67+
if (config.LOG_WRITE_OPERATIONS) {
6868
queryHandler.handle(new AddStatementCall(id, subj, pred, obj, contexts));
6969
}
7070
baseSailConnection.addStatement(subj, pred, obj, contexts);
@@ -73,28 +73,28 @@ protected void addStatementInternal(final Resource subj,
7373
// Note: clearing statements does not change the configuration of cached
7474
// values.
7575
protected void clearInternal(final Resource... contexts) throws SailException {
76-
if (config.logWriteOperations) {
76+
if (config.LOG_WRITE_OPERATIONS) {
7777
queryHandler.handle(new ClearCall(id, contexts));
7878
}
7979
baseSailConnection.clear(contexts);
8080
}
8181

8282
protected void clearNamespacesInternal() throws SailException {
83-
if (config.logWriteOperations) {
83+
if (config.LOG_WRITE_OPERATIONS) {
8484
queryHandler.handle(new ClearNamespacesCall(id));
8585
}
8686
baseSailConnection.clearNamespaces();
8787
}
8888

8989
protected void closeInternal() throws SailException {
90-
if (config.logTransactions) {
90+
if (config.LOG_TRANSACTIONS) {
9191
queryHandler.handle(new CloseConnectionCall(id));
9292
}
9393
baseSailConnection.close();
9494
}
9595

9696
protected void commitInternal() throws SailException {
97-
if (config.logTransactions) {
97+
if (config.LOG_TRANSACTIONS) {
9898
queryHandler.handle(new CommitCall(id));
9999
}
100100
baseSailConnection.commit();
@@ -104,15 +104,15 @@ protected CloseableIteration<? extends BindingSet, QueryEvaluationException> eva
104104
final TupleExpr tupleExpr, final Dataset dataSet, final BindingSet bindingSet, final boolean includeInferred)
105105
throws SailException {
106106
// Note: there is no recording iterator for evaluate() results
107-
if (config.logReadOperations) {
107+
if (config.LOG_READ_OPERATIONS) {
108108
queryHandler.handle(new EvaluateCall(id, includeInferred));
109109
}
110110
return baseSailConnection.evaluate(tupleExpr, dataSet, bindingSet, includeInferred);
111111
}
112112

113113
protected CloseableIteration<? extends Resource, SailException> getContextIDsInternal()
114114
throws SailException {
115-
if (config.logReadOperations) {
115+
if (config.LOG_READ_OPERATIONS) {
116116
queryHandler.handle(new GetContextIDsCall(id));
117117
return new RecorderIteration<>(
118118
(CloseableIteration<Resource, SailException>) baseSailConnection.getContextIDs(),
@@ -129,15 +129,15 @@ private String nextIterationId() {
129129
}
130130

131131
protected String getNamespaceInternal(final String prefix) throws SailException {
132-
if (config.logReadOperations) {
132+
if (config.LOG_READ_OPERATIONS) {
133133
queryHandler.handle(new GetNamespaceCall(id, prefix));
134134
}
135135
return baseSailConnection.getNamespace(prefix);
136136
}
137137

138138
protected CloseableIteration<? extends Namespace, SailException> getNamespacesInternal()
139139
throws SailException {
140-
if (config.logReadOperations) {
140+
if (config.LOG_READ_OPERATIONS) {
141141
queryHandler.handle(new GetNamespacesCall(id));
142142
return new RecorderIteration<>(
143143
(CloseableIteration<Namespace, SailException>) baseSailConnection.getNamespaces(),
@@ -152,7 +152,7 @@ protected CloseableIteration<? extends Statement, SailException> getStatementsIn
152152
final Resource subj, final IRI pred, final Value obj, final boolean includeInferred,
153153
final Resource... contexts) throws SailException {
154154

155-
if (config.logReadOperations) {
155+
if (config.LOG_READ_OPERATIONS) {
156156
queryHandler.handle(new GetStatementsCall(id, subj, pred, obj, includeInferred, contexts));
157157
return new RecorderIteration<>(
158158
(CloseableIteration<Statement, SailException>) baseSailConnection.getStatements(
@@ -165,7 +165,7 @@ protected CloseableIteration<? extends Statement, SailException> getStatementsIn
165165
}
166166

167167
protected void removeNamespaceInternal(final String prefix) throws SailException {
168-
if (config.logWriteOperations) {
168+
if (config.LOG_WRITE_OPERATIONS) {
169169
queryHandler.handle(new RemoveNamespaceCall(id, prefix));
170170
}
171171
baseSailConnection.removeNamespace(prefix);
@@ -175,35 +175,35 @@ protected void removeStatementsInternal(final Resource subj,
175175
final IRI pred,
176176
final Value obj,
177177
final Resource... contexts) throws SailException {
178-
if (config.logWriteOperations) {
178+
if (config.LOG_WRITE_OPERATIONS) {
179179
queryHandler.handle(new RemoveStatementsCall(id, subj, pred, obj, contexts));
180180
}
181181
baseSailConnection.removeStatements(subj, pred, obj, contexts);
182182
}
183183

184184
protected void rollbackInternal() throws SailException {
185-
if (config.logTransactions) {
185+
if (config.LOG_TRANSACTIONS) {
186186
queryHandler.handle(new RollbackCall(id));
187187
}
188188
baseSailConnection.rollback();
189189
}
190190

191191
protected void setNamespaceInternal(final String prefix, final String name) throws SailException {
192-
if (config.logWriteOperations) {
192+
if (config.LOG_WRITE_OPERATIONS) {
193193
queryHandler.handle(new SetNamespaceCall(id, prefix, name));
194194
}
195195
baseSailConnection.setNamespace(prefix, name);
196196
}
197197

198198
protected long sizeInternal(final Resource... contexts) throws SailException {
199-
if (config.logReadOperations) {
199+
if (config.LOG_READ_OPERATIONS) {
200200
queryHandler.handle(new SizeCall(id, contexts));
201201
}
202202
return baseSailConnection.size(contexts);
203203
}
204204

205205
protected void startTransactionInternal() throws SailException {
206-
if (config.logTransactions) {
206+
if (config.LOG_TRANSACTIONS) {
207207
queryHandler.handle(new BeginCall(id));
208208
}
209209
baseSailConnection.begin();

replay-sail/src/main/java/net/fortytwo/sesametools/replay/ReplayConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @author Joshua Shinavier (http://fortytwo.net).
55
*/
66
public class ReplayConfiguration {
7-
public boolean logTransactions = true;
8-
public boolean logReadOperations = true;
9-
public boolean logWriteOperations = true;
7+
public static final boolean LOG_TRANSACTIONS = true;
8+
public static final boolean LOG_READ_OPERATIONS = true;
9+
public static final boolean LOG_WRITE_OPERATIONS = true;
1010
}

0 commit comments

Comments
 (0)