Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ && containsRule(((Parser) recognizer).getExpectedTokens(), recognizer.getVocabul
parser.setErrors(true);
}

private static List<String> extractNoKeywordTokens(Recognizer<?, ?> recognizer, Set<Map.Entry<Integer, String>> epsilonRules) {
protected static List<String> extractNoKeywordTokens(Recognizer<?, ?> recognizer, Set<Map.Entry<Integer, String>> epsilonRules) {
Pattern nokeywordPattern = Pattern.compile("nokeyword_(.*)_[0-9]*");
// Turn the next expected rules into a human readable format:
List<String> noKeywordRules = epsilonRules.stream().map(r -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
*/
// STATE SMELL PN
public class SimpleHashFactory {

private static SimpleHashFactory theInstance;

private SimpleHashFactory() {

SimpleHashFactory() {
theInstance = this;
// use empty logger to suppress default free marker log behaviour
System.setProperty(Logger.SYSTEM_PROPERTY_NAME_LOGGER_LIBRARY, Logger.LIBRARY_NAME_NONE);
}

public static SimpleHashFactory getInstance() {
if (theInstance == null) {
synchronized (SimpleHashFactory.class) {
theInstance = new SimpleHashFactory();
}
new SimpleHashFactory();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?
theInstance = ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually moved the assignment into the constructor (to allow extending the singleton)

}
return theInstance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ReportingNameHelper {
/**
* Constructor for de.monticore.generating.templateengine.reporting.artifacts.ReportingNameHelper.
*/
private ReportingNameHelper() {
ReportingNameHelper() {
}

public static Path getPath(String outputDir, String qualifiedFilename, String fileextension) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static ExecutorService getReportSendingExecutorService() {
return _reportSendingExecutorService;
}

private static void sendRequest(URI url, String data, String type) throws IOException, InterruptedException {
static void sendRequest(URI url, String data, String type) throws IOException, InterruptedException {
HttpURLConnection connection = (HttpURLConnection) url.toURL().openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("STAT_TYPE", type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ protected static String calculateLine(String value) {
ReportingConstants.REPORTING_ROW_LENGTH);
}

private void reportTemplateAction(ASTNode astNode, String templatename,
void reportTemplateAction(ASTNode astNode, String templatename,
String actionType) {
String startString = actionType + getLineStart(astNode);
String line = startString + Layouter.getSpaceString(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void flush(ASTNode ast) {
closeFile();
}

private void putVersion() {
void putVersion() {
try {
Properties properties = new Properties();
properties.load(this.getClass().getResourceAsStream("/buildInfo.properties"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class MontiCoreClassLoader extends URLClassLoader {

private final ClassLoader parent;
protected final ClassLoader parent;

public MontiCoreClassLoader(URL[] urls) {
super(urls);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ void invalidateCaches() {
}

// A List of all file systems opened for jars.
private static Map<File, FileSystem> openedJarFileSystems = new HashMap<>();
final static Map<File, FileSystem> openedJarFileSystems = new HashMap<>();

public static FileSystem getJarFS(File jar) {
if(openedJarFileSystems.containsKey(jar)){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
public class SymbolWithScopeOfUnknownKindDeSer implements ISymbolDeSer<SymbolWithScopeOfUnknownKind, Object> {

private final IDeSer<?, ?, ?> parent;
private final Supplier<IScope> scopeFactory;
protected final IDeSer<?, ?, ?> parent;
protected final Supplier<IScope> scopeFactory;

/**
* Creates a new {@code SymbolWithScopeOfUnknownKindDeSer}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ else if (!currElements.isEmpty() && currElements.peek().isJsonObject()) {
}
}

private JsonObject getParentObject() {
protected JsonObject getParentObject() {
if (currElements.isEmpty()) {
Log.error("0xA0613 JsonPrinter detected an invalid nesting of Json. "
+ "Cannot add a member as the first element of a Json String!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class ValueComparator implements Comparator<String> {

private Map<String, Integer> data = null;
protected Map<String, Integer> data = null;

public ValueComparator(Map<String, Integer> data) {
this.data = data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class ModelTraversal<E extends ITraverser> {
protected Map<ASTNode, ASTNode> parents= new HashMap<>();
protected Stack<ASTNode> currentparents = new Stack<>();

private final E traverser;
protected final E traverser;

protected ModelTraversal(E traverser) {
this.traverser = traverser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class ModelTraversalVisitor implements IVisitor {

private final ModelTraversal<?> modelTraversal;
protected final ModelTraversal<?> modelTraversal;

protected ModelTraversalVisitor(
ModelTraversal<?> modelTraversal) {
Expand Down
Loading