Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

XMLSerializer ignores value of parameters

オープン
#70 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java
領域
tooling

調査の方向性

まず、lemsParameter.setDoubleValue(...) で値を変更した後に XMLSerializer.serialize(lems) を実行して問題を再現し、次に XMLAttribute の値がコンポーネントパラメータとともにどのように使用されているかを調べます。シリアライズされた遅延、持続時間、振幅が、古い XMLAttribute データを使わずに更新後のパラメータ値を反映すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

The following is inside a component:

ParamValue: delay(time, svalue = null, dvalue = NaN) = 2.2E-4
ParamValue: duration(time, svalue = null, dvalue = NaN) = 4.0E8
ParamValue: amplitude(current, svalue = null, dvalue = NaN) = 7.300000000000001E-10

however when doing

String serialisedModel = XMLSerializer.serialize(lems)

the file shows

<pulseGenerator id="pulseGen1" delay="0ms" duration="100000000s" amplitude="0.08nA"/>

I suspect the problem is caused by the following objects which are also inside the LEMS component model:

XMLAttribute(delay, 0ms) 
XMLAttribute(duration, 100000000s) 
XMLAttribute(amplitude, 0.08nA) 

which I suspect is what is getting used during serialization.
The same information seems to be stored in two places, if XMLAttribute are necessary for whatever reason then the library should reconcile them if the user changes the value of a parameter through the API

lemsParameter.setDoubleValue(...)

which is what we are doing to let the user change the parameters in the model.
Either that or there should be some method that can be called to update the XMLAttributes.
However ideally redundant information should probably be best avoided altogether.

主要言語
Java
スター
13
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

LEMS/jLEMS のほかの issue

LEMS/jLEMS の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。