Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
0f18a719
Commit
0f18a719
authored
Oct 22, 2010
by
Nicolas Tachker
Browse files
remove unused.
parent
fca692c2
Changes
1
Show whitespace changes
Inline
Side-by-side
joram/joram/shared/src/main/java/org/objectweb/joram/shared/stream/MetaData.java
View file @
0f18a719
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2009 ScalAgent Distributed Technologies
* Copyright (C) 2009
- 2010
ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -62,27 +62,6 @@ public class MetaData {
joramMagic
[
7
]
=
(
byte
)
protocol
;
}
private
static
void
getVersion
()
{
// Read version from the package
Package
pkg
=
MetaData
.
class
.
getPackage
();
if
(
pkg
!=
null
)
{
try
{
String
implVersion
=
pkg
.
getImplementationVersion
();
if
(
implVersion
!=
null
)
{
version
=
implVersion
;
StringTokenizer
st
=
new
StringTokenizer
(
implVersion
,
"."
);
major
=
Integer
.
parseInt
(
st
.
nextToken
());
minor
=
Integer
.
parseInt
(
st
.
nextToken
());
build
=
Integer
.
parseInt
(
st
.
nextToken
());
protocol
=
Integer
.
parseInt
(
st
.
nextToken
(
"-"
).
substring
(
1
));
}
}
catch
(
Exception
e
)
{
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
"MetaData.getVersion:: EXCEPTION"
,
e
);
}
}
}
private
static
void
getVersionInResource
()
{
String
implVersion
=
null
;
// Read version from joram.version file in bundle.
...
...
@@ -107,45 +86,6 @@ public class MetaData {
if
(
logger
.
isLoggable
(
BasicLevel
.
DEBUG
))
logger
.
log
(
BasicLevel
.
DEBUG
,
"MetaData.getVersionInResource:: EXCEPTION"
,
e
);
}
}
else
{
getVersion
();
}
}
// static {
// int idx1 = 0;
// int idx2 = 0;
//
// try {
// idx2 = version.indexOf('.');
// if (idx2 != -1) {
// joramMagic[5] = Byte.parseByte(version.substring(idx1, idx2));
// } else {
// throw new IllegalArgumentException();
// }
//
// idx1 = idx2 +1;
// idx2 = version.indexOf('.', idx1);
// if (idx2 != -1) {
// joramMagic[6] = Byte.parseByte(version.substring(idx1, idx2));
// } else {
// throw new IllegalArgumentException();
// }
//
// idx1 = idx2 +1;
// idx2 = version.indexOf('.', idx1);
// if (idx2 != -1) {
// joramMagic[7] = Byte.parseByte(version.substring(idx1 +1, idx2));
// } else {
// throw new IllegalArgumentException();
// }
// } catch (Exception exc) {
// // Should never happen
// }
//
// joramMagic[5] = (byte) major;
// joramMagic[6] = (byte) minor;
// joramMagic[7] = (byte) protocol;
// }
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment