-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for nulls for timestamps and logfiles , validate config and eve…
…nt formats (#61) * Should fix potential Null pointer dereference when parsing timestamps * Fixes situations where logfile might be null * Move logfile null check to more correct location * Move validation to the config object * Adds full config validation for configs * Try/catch Instant.parse instead of nullcheck * Adds validator for appname and hostname while handling messages * appname -> appName refactor * Adds missing exception constructors * Change all ints to integeres in AppConfig objects, check for null where necessary
- Loading branch information
1 parent
e3a47f4
commit f2a2f20
Showing
12 changed files
with
337 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/teragrep/k8s_01/InvalidConfigurationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Kubernetes log forwarder k8s_01 | ||
Copyright (C) 2023 Suomen Kanuuna Oy | ||
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.teragrep.k8s_01; | ||
|
||
public class InvalidConfigurationException extends Exception { | ||
public InvalidConfigurationException() { | ||
super(); | ||
} | ||
|
||
public InvalidConfigurationException(String message) { | ||
super(message); | ||
} | ||
|
||
public InvalidConfigurationException(String message, Throwable throwable) { | ||
super(message, throwable); | ||
} | ||
|
||
public InvalidConfigurationException(Throwable throwable) { | ||
super(throwable); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.