javacore-analyser 2.2.0.dev91__py3-none-any.whl → 2.2.0.dev95__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,12 @@
1
1
  #
2
- # Copyright IBM Corp. 2024 - 2024
2
+ # Copyright IBM Corp. 2024 - 2025
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
  #
5
5
 
6
6
  import logging
7
7
  import ntpath
8
8
  from datetime import datetime
9
+ from pathlib import Path
9
10
  from xml.dom.minidom import Element, parseString
10
11
 
11
12
  from tqdm import tqdm
@@ -110,22 +111,11 @@ class VerboseGcFile:
110
111
  self.__parse()
111
112
 
112
113
  def __parse(self):
113
- # read in the file as collection of lines
114
- file = None
115
114
  try:
116
- xml_text = ""
117
- root_closing_tag_available = False
118
- file = open(self.__path, 'r+')
119
- lines = file.readlines()
120
- # find the last non-empty line
121
- for line in lines:
122
- line = line.strip()
123
- # workaround for https://github.com/eclipse-openj9/openj9/issues/17978
124
- line = line.replace("", "?")
125
- xml_text = xml_text + line
126
- if line == ROOT_CLOSING_TAG: root_closing_tag_available = True
127
-
128
- if not root_closing_tag_available:
115
+ file = Path(self.__path)
116
+ xml_text = file.read_text()
117
+ xml_text = xml_text.replace("", "?")
118
+ if ROOT_CLOSING_TAG not in xml_text:
129
119
  xml_text = xml_text + ROOT_CLOSING_TAG
130
120
  logging.debug("adding closing tag")
131
121
 
@@ -133,8 +123,6 @@ class VerboseGcFile:
133
123
  self.__root = self.__doc.documentElement
134
124
  except Exception as ex:
135
125
  raise GcVerboseProcessingException() from ex
136
- finally:
137
- if not file.closed: file.close()
138
126
 
139
127
  def get_file_name(self):
140
128
  head, tail = ntpath.split(self.__path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: javacore_analyser
3
- Version: 2.2.0.dev91
3
+ Version: 2.2.0.dev95
4
4
  Summary: The tool to review IBM Javacore files
5
5
  Project-URL: Homepage, https://github.com/IBM/javacore-analyser
6
6
  Project-URL: Issues, https://github.com/IBM/javacore-analyser/issues
@@ -17,7 +17,7 @@ javacore_analyser/stack_trace_element.py,sha256=pZPrK1ACBUDE7YsVOFhTfewXequ1m5P-
17
17
  javacore_analyser/stack_trace_kind.py,sha256=lOdfb_F3XrwDLciPk_ZgM_fmMn5JoXsIUjr7pjvmU4M,157
18
18
  javacore_analyser/thread_snapshot.py,sha256=2Do8NPBXdpUezQrUI_9nyGbtU4b2s5euPnHqcuuKq7U,13255
19
19
  javacore_analyser/tips.py,sha256=EhwLUAha0FvFJtO5kmvba9a1nKXGdqNHFa2jFbHZr4U,8655
20
- javacore_analyser/verbose_gc.py,sha256=L2hu-yUxPoEKy53AJ60Jz4FWz3glNq7AUHtr0Xgcvag,6870
20
+ javacore_analyser/verbose_gc.py,sha256=FdSzj9bB9GrJVM8qzkvjNm0LsJZRvKWpd2oMQ8G8eEE,6373
21
21
  javacore_analyser/data/expand.js,sha256=KwqvNUoO7yMDeQKcnLDywfMdR3Zsjan5L8QoPsQQLGo,956
22
22
  javacore_analyser/data/style.css,sha256=HSKPajW3EItHjye6mSGNMRPEzfE2r7o1Gq-BEAI54Ts,2879
23
23
  javacore_analyser/data/html/error.html,sha256=dJI5RdeNL1E4Y-zaU7NTBqrsxCuAovVc1Cebrk5GcYA,520
@@ -41,8 +41,8 @@ javacore_analyser/data/xml/javacores/javacore.xsl,sha256=5cnIp08Q9FccljHH8duoJQY
41
41
  javacore_analyser/data/xml/threads/thread.xml,sha256=6dG89Whx1_kpEYVS_F6Upa2XuXnXorlQATFc8kD5Mfc,280
42
42
  javacore_analyser/data/xml/threads/thread.xsl,sha256=rkqr5GQ2aZ_xrdhUjl2QZDCZ-09zxqUmtV8DFZVjTAA,13927
43
43
  javacore_analyser/templates/index.html,sha256=aEuyry-HZ9HlQNwfbugugvqbSxwlo7LrQnrDmqO34YE,1682
44
- javacore_analyser-2.2.0.dev91.dist-info/METADATA,sha256=A3pzRyIHATTe3IMydCxi4E5qGBA9_wswiCemZ1xY3Vs,22214
45
- javacore_analyser-2.2.0.dev91.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
46
- javacore_analyser-2.2.0.dev91.dist-info/entry_points.txt,sha256=W3S799zI58g5-jWMsC3wY9xksz21LPEMYOILv8sayfM,160
47
- javacore_analyser-2.2.0.dev91.dist-info/licenses/LICENSE,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
48
- javacore_analyser-2.2.0.dev91.dist-info/RECORD,,
44
+ javacore_analyser-2.2.0.dev95.dist-info/METADATA,sha256=xl3rKZCRJM09aOAiqdpkD3dJoOagtO7nnfog6MIYLcg,22214
45
+ javacore_analyser-2.2.0.dev95.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
46
+ javacore_analyser-2.2.0.dev95.dist-info/entry_points.txt,sha256=W3S799zI58g5-jWMsC3wY9xksz21LPEMYOILv8sayfM,160
47
+ javacore_analyser-2.2.0.dev95.dist-info/licenses/LICENSE,sha256=xllut76FgcGL5zbIRvuRc7aezPbvlMUTWJPsVr2Sugg,11358
48
+ javacore_analyser-2.2.0.dev95.dist-info/RECORD,,